/* ==========================================================================
   Ürün sayfası: Taksit Seçenekleri (rozet + pencere)
   ========================================================================== */

/* Rozet artık tıklanabilir bir düğme */
html body button.moli-installment-trigger {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
html body button.moli-installment-trigger:hover,
html body button.moli-installment-trigger:focus-visible {
    border-color: #ff9800 !important;
    box-shadow: 0 4px 14px rgba(255, 152, 0, 0.18) !important;
    outline: none;
}
.moli-installment-trigger > span {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-width: 0;
}
.moli-installment-trigger strong { white-space: nowrap; }
.moli-installment-trigger em {
    font-style: normal;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}
.moli-installment-trigger em .woocommerce-Price-amount { font-weight: 700; color: #0f172a; }
.moli-installment-more {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    color: #ff4103;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
html body .moli-installment-more i { color: inherit !important; font-size: 0.7rem !important; }

/* Pencere */
.moli-taksit {
    position: fixed;
    inset: 0;
    z-index: 10000010; /* çerez bandının (9999999) üstünde */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.moli-taksit[hidden] { display: none; }
.moli-taksit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 18, 0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.moli-taksit-dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
    outline: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.moli-taksit.is-open .moli-taksit-backdrop { opacity: 1; }
.moli-taksit.is-open .moli-taksit-dialog { opacity: 1; transform: none; }

.moli-taksit-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid #eef0f3;
}
html body .moli-taksit .moli-taksit-title {
    margin: 0;
    color: #0f172a;
    font-size: 1.25rem !important;
    font-weight: 800;
    line-height: 1.3;
}
html body .moli-taksit p.moli-taksit-product {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
}
.moli-taksit-x {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: #0f172a;
    cursor: pointer;
}
.moli-taksit-x:hover { background: #e5e7eb; }

.moli-taksit-body {
    padding: 18px 22px 22px;
    overflow-y: auto;
}
.moli-taksit-card {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}
.moli-taksit-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 700;
}
.moli-taksit-card-head i { color: #ff9800; }

html body .moli-taksit-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 0.88rem;
}
html body .moli-taksit-table th,
html body .moli-taksit-table td {
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid #f0f1f3;
    color: #1e293b;
    text-align: center;
    vertical-align: middle;
}
html body .moli-taksit-table th {
    background: #f8fafc;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 700;
}
html body .moli-taksit-table tbody tr:last-child td { border-bottom: 0; }
html body .moli-taksit-table tr.is-free td { background: #fff8f0; }
.moli-taksit-n { font-weight: 600; }
.moli-taksit-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: #ff4103;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}
.moli-taksit-none { color: #16a34a; font-weight: 600; }
html body .moli-taksit p.moli-taksit-note {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 0.78rem !important;
    line-height: 1.55 !important;
}

html.moli-taksit-lock,
html.moli-taksit-lock body { overflow: hidden !important; }

/* Mobil: alttan açılan panel; rozette yalnızca ok kalır */
@media (max-width: 767px) {
    .moli-installment-more span { display: none; }
    html body .moli-installment-more i { font-size: 0.85rem !important; }
    .moli-taksit { align-items: flex-end; padding: 0; }
    .moli-taksit-dialog {
        max-height: 88vh;
        max-height: 88dvh;
        border-radius: 18px 18px 0 0;
        transform: translateY(40px);
    }
    .moli-taksit-head { padding: 16px 16px 12px; }
    .moli-taksit-body { padding: 14px 12px 18px; }
    html body .moli-taksit-table { font-size: 0.8rem; }
    html body .moli-taksit-table th,
    html body .moli-taksit-table td { padding: 10px 6px; }
    html body .moli-taksit-table th { font-size: 0.72rem; }
    .moli-taksit-tag { display: table; margin: 4px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
    .moli-taksit-backdrop, .moli-taksit-dialog { transition: none; }
}
