/*!
 * Yalniz — sepet sonrası ödeme akışı (checkout)
 * css/yalniz.css + css/yalniz-order.css üzerine yüklenir; sepet düzeninin temeli (iki sütun, kartlar,
 * özet kartı) yalniz-order.css 08–12'dedir. Bu dosya akışı "konsol" görünümünde cilalar.
 * Yalnızca açık tema. Her kural body.yz altında.
 *
 * Sayfalar (body sınıfı = $hoptions["page"])
 *  basket.php              → body.yz-page-basket
 *  basket-account.php      → body.yz-page-basket-payment  (içerikte .orderuserlogin)
 *  basket-payment.php      → body.yz-page-basket-payment  (içerikte .faturabilgisi)
 *  payment-successful.php  → body.yz-page-payment-successful
 *  payment-failed.php      → body.yz-page-payment-failed
 *
 * Bölümler
 *  01 Adım göstergesi (yalnız CSS: Sepet → Hesap → Ödeme → Tamamlandı)
 *  02 Ortak: kart başlıkları, onay kutusu etiketleri, telefon alanı
 *  03 Sepet (basket.php)
 *  04 Hesap (basket-account.php)
 *  05 Ödeme: fatura adresi (basket-payment.php)
 *  06 Ödeme: yöntem kartları + sözleşmeler + özet
 *  07 Ödeme sonucu (payment-successful / payment-failed)
 *  08 Duyarlı (≤1024 / ≤640)
 */

/* 01 ─ Adım göstergesi ───────────────────────────────────────────
 * Şablonlarda adım çubuğu için yer yok; işaretleme eklemeden .yz-page-body::before ile çizilir.
 * Metin + sağda 4 parçalı ilerleme çubuğu (--yz-co-fill = tamamlanan oran).                    */
body.yz:is(.yz-page-basket, .yz-page-basket-payment, .yz-page-payment-successful, .yz-page-payment-failed) .yz-page-body::before{
    --yz-co-fill: 25%;
    --yz-co-color: var(--yz-brand);
    content: "Adım 1 / 4  ·  Sepet";
    display: block; margin: 0 0 18px; padding: 11px 16px; min-height: 42px;
    font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--yz-muted); white-space: pre;
    border: 1px solid var(--yz-line); border-radius: var(--yz-r); box-shadow: var(--yz-shadow-xs);
    background:
        repeating-linear-gradient(90deg, transparent 0 calc(25% - 4px), var(--yz-surface) calc(25% - 4px) 25%) right 16px center / 240px 6px no-repeat,
        linear-gradient(90deg, var(--yz-co-color) 0 var(--yz-co-fill), var(--yz-line) var(--yz-co-fill)) right 16px center / 240px 6px no-repeat,
        var(--yz-surface);
}
body.yz.yz-page-basket-payment .yz-page-body:has(.orderuserlogin)::before{ --yz-co-fill: 50%; content: "Adım 2 / 4  ·  Hesap"; }
body.yz.yz-page-basket-payment .yz-page-body:has(.faturabilgisi)::before{ --yz-co-fill: 75%; content: "Adım 3 / 4  ·  Ödeme"; }
body.yz.yz-page-payment-successful .yz-page-body::before{ --yz-co-fill: 100%; --yz-co-color: var(--yz-ok); content: "Adım 4 / 4  ·  Tamamlandı"; }
body.yz.yz-page-payment-failed .yz-page-body::before{ --yz-co-fill: 75%; --yz-co-color: var(--yz-danger); content: "Adım 3 / 4  ·  Ödeme tamamlanamadı"; }
/* basket-pay ve benzeri ara sayfalar aynı page sınıfını taşımadığı sürece gösterge çıkmaz */
html[lang|="en"] body.yz.yz-page-basket .yz-page-body::before{ content: "Step 1 / 4  ·  Cart"; }
html[lang|="en"] body.yz.yz-page-basket-payment .yz-page-body:has(.orderuserlogin)::before{ content: "Step 2 / 4  ·  Account"; }
html[lang|="en"] body.yz.yz-page-basket-payment .yz-page-body:has(.faturabilgisi)::before{ content: "Step 3 / 4  ·  Payment"; }
html[lang|="en"] body.yz.yz-page-payment-successful .yz-page-body::before{ content: "Step 4 / 4  ·  Completed"; }
html[lang|="en"] body.yz.yz-page-payment-failed .yz-page-body::before{ content: "Step 3 / 4  ·  Payment failed"; }
/* Sonuç sayfalarında gösterge kartla aynı genişlikte */
body.yz:is(.yz-page-payment-successful, .yz-page-payment-failed) .yz-page-body::before{ max-width: 560px; margin: 8px auto 0; }

/* 02 ─ Ortak ──────────────────────────────────────────────────── */
/* Kart başlıkları: "Ödeme Yöntemi" / "Sözleşmeler" .uhinfo içinde geldiği için sepet sütun başlığı kurallarından ayrılır */
body.yz .sepetbaslik:has(+ .sepetlist) .uhinfo{ font-size: 15px; font-weight: 600; letter-spacing: -.005em; text-transform: none; color: var(--yz-ink); }

/* Karışık içerikli onay kutusu etiketleri (bağlantı + metin, <strong> + tutar): flex boşlukları
 * metni parçalara bölüyordu → blok etiket, kutu solda mutlak konumda. */
body.yz .sepet .checkbox-custom + .checkbox-custom-label{ display: block; position: relative; min-height: 20px; padding: 1px 0 1px 28px; line-height: 1.5; }
body.yz .sepet .checkbox-custom + .checkbox-custom-label::before{ position: absolute; left: 0; top: 2px; }
body.yz .sepet .checkbox-custom + .checkbox-custom-label a{ font-weight: 500; }
body.yz .sepet .checkbox-custom + .checkbox-custom-label strong{ font-weight: 600; color: var(--yz-ink); }

/* intl-tel-input (ayrık alan kodu). Gerçek sitede eklentinin CSS'i de yüklenir; bu kurallar onunla uyumludur. */
body.yz .sepet .intl-tel-input{ position: relative; display: block; width: 100%; }
body.yz .sepet .intl-tel-input .flag-container{ position: absolute; top: 0; bottom: 0; left: 0; padding: 1px; z-index: 1; }
body.yz .sepet .intl-tel-input .selected-flag{
    display: flex; align-items: center; gap: 6px; height: 100%; width: auto !important; padding: 0 10px 0 12px;
    background: var(--yz-surface-2); border-right: 1px solid var(--yz-line); border-radius: 9px 0 0 9px;
    font-size: 13.5px; font-weight: 500; color: var(--yz-ink-2); cursor: pointer;
}
body.yz .sepet .intl-tel-input .selected-dial-code{ padding: 0; }
body.yz .sepet .intl-tel-input .iti-arrow{ position: static; margin: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid var(--yz-faint); }
body.yz .sepet .intl-tel-input input[type=text]{ padding-left: 92px !important; }

/* 03 ─ Sepet ──────────────────────────────────────────────────── */
body.yz.yz-page-basket #item_list .sepetlist{ transition: border-color .15s, box-shadow .15s; }
body.yz.yz-page-basket #item_list .sepetlist:hover{ border-color: #d3dce6; box-shadow: var(--yz-shadow); }
body.yz.yz-page-basket #item_list .sepetlist:has(.row-label){ margin-top: 18px; }
body.yz.yz-page-basket .sepetlistcon .uhinfo p{ margin: 8px 0 0; padding: 8px 10px; font-size: 12.5px; line-height: 1.7; color: var(--yz-muted); background: var(--yz-surface-2); border: 1px solid var(--yz-line-2); border-radius: var(--yz-r-sm); }
body.yz.yz-page-basket .sepetlistcon .uhinfo p span{ font-weight: 500; color: var(--yz-ink-2); }
body.yz.yz-page-basket .cart-additional-details .checkbox-custom-label strong{ margin: 0 1px; }
body.yz.yz-page-basket .uhtutar h4{ font-size: 17px; letter-spacing: -.01em; }
body.yz.yz-page-basket .sepetright > .gonderbtn{ box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--yz-brand) 70%, transparent); }
body.yz.yz-page-basket #continue_go::after{ content: "\f061"; font: var(--fa-font-solid); font-size: 13px; margin-left: 8px; }

/* Özet kartı ortak cila (sepet / hesap / ödeme) */
body.yz .sepetsipinfo .amount_spot_view i, body.yz .uhtutar .amount_spot_view i{ font-style: normal; font-size: .82em; font-weight: 500; color: var(--yz-muted); margin-right: 1px; }
body.yz .sepetsipinfo .totalamountinfo h5 .amount_spot_view i{ font-size: 18px; vertical-align: 3px; }
body.yz .sepetright > .lbtn{ display: inline-flex; }

/* 04 ─ Hesap (basket-account.php) ─────────────────────────────── */
body.yz .orderuserlogin{ max-width: none; }
body.yz .orderuserlogin h2{ padding: 10px 12px; margin-bottom: 18px; background: var(--yz-info-bg); border: 1px solid #cfe4f3; border-radius: var(--yz-r-sm); color: var(--yz-ink-2); font-size: 13.5px; line-height: 1.55; }
body.yz .orderuserlogin table tr td:first-child{ width: 30%; }
body.yz .orderuserlogin table td[colspan] .checkbox-custom + .checkbox-custom-label{ margin: 4px 0 !important; }
body.yz #SubmitStepAccount > .radio-custom + .radio-custom-label{ display: inline-flex; padding: 0 12px; }
body.yz #SubmitStepAccount > .radio-custom + .radio-custom-label::before{ position: static; }
body.yz .orderuserlogin .yesilbtn strong{ font-weight: 600; }
body.yz .orderuserlogin .yesilbtn::after{ content: "\f061"; font: var(--fa-font-solid); font-size: 13px; margin-left: 8px; }

/* 05 ─ Ödeme: fatura adresi ───────────────────────────────────── */
/* #haveAddress görünürlüğü jQuery ile (inline display) yönetilir → blok düzen korunur, bağlantı sağa yüzer */
body.yz #haveAddress > a[style*="float"]{ display: inline-flex; align-items: center; height: 28px; padding: 0 10px; margin: -4px 0 0 12px; border-radius: 8px; background: var(--yz-brand-50); }
body.yz #haveAddress > a[style*="float"]:hover{ background: var(--yz-brand-100); }
body.yz #haveAddress h5{ margin-bottom: 10px; }
body.yz #address_list{ display: block; clear: both; width: 100%; max-width: none; height: 42px; text-overflow: ellipsis; }
body.yz #noAddress h5{ font-weight: 500; color: var(--yz-ink-2); }
body.yz #noAddress > br, body.yz #sendbta > br, body.yz #newAddress > br{ display: none; }
body.yz #newAddress h3{ margin-bottom: 4px; }
body.yz #newAddress .line{ height: 1px; margin: 10px 0 4px; background: var(--yz-line); }
body.yz #newAddress :is(.yuzde30, .yuzde25, .yuzde15) > strong, body.yz #newAddress #address > strong{ display: block; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--yz-ink); }
body.yz #sendbta{ margin-top: 16px; padding-top: 16px; }
body.yz #sendbta-checkbox + .checkbox-custom-label strong{ font-weight: 500 !important; color: var(--yz-ink-2) !important; }
body.yz #sendbta_amount{ font-weight: 600; color: var(--yz-ink); white-space: nowrap; }

/* 06 ─ Ödeme yöntemleri ───────────────────────────────────────────
 * İşaretleme JS ile gelir: <input class="checkbox-custom" value="{modül}"> + <label><strong>Ad</strong> (ücret)</label>.
 * Sıra: seçim halkası, ikon (::after, modül adına göre), ad, ücret.                            */
body.yz #payment_methods .checkbox-custom + .checkbox-custom-label{ display: flex; min-height: 62px; padding: 12px 16px; gap: 12px; text-align: left; margin: 0 0 8px !important; }
body.yz #payment_methods .checkbox-custom-label:last-child{ margin-bottom: 0 !important; } /* fadeIn() satır içi display:block verir; grid boşluğu yerine margin */
body.yz #payment_methods .checkbox-custom + .checkbox-custom-label::before{ position: static; order: -2; }
body.yz #payment_methods .checkbox-custom + .checkbox-custom-label::after{
    content: "\f09d"; order: -1; flex-shrink: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
    font: var(--fa-font-solid); font-size: 15px; background: var(--yz-surface-2); border: 1px solid var(--yz-line); color: var(--yz-muted);
    transition: background-color .15s, color .15s, border-color .15s;
}
body.yz #payment_methods .checkbox-custom:is([value="BankTransfer"], [value*="Transfer" i], [value*="Havale" i]) + .checkbox-custom-label::after{ content: "\f19c"; }
body.yz #payment_methods .checkbox-custom[value="Balance"] + .checkbox-custom-label::after{ content: "\f555"; }
body.yz #payment_methods .checkbox-custom:checked + .checkbox-custom-label::after{ background: var(--yz-surface); border-color: var(--yz-brand-200); color: var(--yz-brand); }
body.yz #payment_methods .checkbox-custom + .checkbox-custom-label strong{ min-width: 0; text-align: left !important; }
body.yz #payment_methods .checkbox-custom + .checkbox-custom-label{ font-variant-numeric: tabular-nums; }
body.yz #payment_methods .checkbox-custom:focus-visible + .checkbox-custom-label{ box-shadow: 0 0 0 3px var(--yz-ring); }

/* Sözleşmeler */
body.yz .sepetlistcon > .checkbox-custom + .checkbox-custom-label{ margin: 0 0 12px !important; color: var(--yz-ink-2); }
body.yz .sepetlistcon > .checkbox-custom + .checkbox-custom-label:last-of-type{ margin-bottom: 0 !important; }

/* Özet: yöntem komisyonu satırı */
body.yz #pmethod_select td strong{ color: var(--yz-muted); }
body.yz #pay_button::before{ content: "\f023"; font: var(--fa-font-solid); font-size: 13px; margin-right: 8px; opacity: .9; }

/* 07 ─ Ödeme sonucu ───────────────────────────────────────────── */
body.yz:is(.yz-page-payment-successful, .yz-page-payment-failed) .progresspayment{ max-width: 560px; margin: 16px auto 24px !important; padding: 40px 32px 32px !important; }
body.yz:is(.yz-page-payment-successful, .yz-page-payment-failed) .progresspayment h3{ font-size: 20px; letter-spacing: -.015em; }
body.yz:is(.yz-page-payment-successful, .yz-page-payment-failed) .progresspayment h4{ max-width: 440px; margin-bottom: 18px; }
body.yz .yz-result-note{
    width: 100%; margin: 0 0 22px; padding: 12px 14px 12px 40px; position: relative; text-align: left;
    font-size: 13px; line-height: 1.55; color: var(--yz-ink-2); background: var(--yz-surface-2); border: 1px solid var(--yz-line); border-radius: var(--yz-r);
}
body.yz .yz-result-note::before{ content: "\f05a"; position: absolute; left: 14px; top: 12px; font: var(--fa-font-solid); font-size: 14px; line-height: 20px; color: var(--yz-info); }
body.yz.yz-page-payment-failed .yz-result-note{ background: var(--yz-warn-bg); border-color: #f3e2bf; }
body.yz.yz-page-payment-failed .yz-result-note::before{ content: "\f071"; color: var(--yz-warn); }
body.yz .yz-result-actions{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
body.yz .yz-result-actions .lbtn{ margin: 0; height: 40px; padding: 0 18px; font-size: 14px; }
body.yz .progresspayment .yz-result-actions .lbtn.yz-result-alt{ background: var(--yz-surface); border-color: var(--yz-line); color: var(--yz-ink-2) !important; box-shadow: var(--yz-shadow-xs); }
body.yz .progresspayment .yz-result-actions .lbtn.yz-result-alt:hover{ background: var(--yz-surface-2); border-color: #cfd8e2; color: var(--yz-ink) !important; }
body.yz .yz-result-actions .lbtn:first-child::before{ font: var(--fa-font-solid); font-size: 13px; margin-right: 8px; }
body.yz.yz-page-payment-successful .yz-result-actions .lbtn:first-child::before{ content: "\f233"; }
body.yz.yz-page-payment-failed .yz-result-actions .lbtn:first-child::before{ content: "\f2f9"; }

/* 08 ─ Duyarlı ────────────────────────────────────────────────── */
@media (max-width: 640px){
    body.yz:is(.yz-page-basket, .yz-page-basket-payment, .yz-page-payment-successful, .yz-page-payment-failed) .yz-page-body::before{
        padding: 10px 14px 24px; margin-bottom: 14px;
        background-position: left 14px bottom 10px, left 14px bottom 10px, 0 0;
        background-size: calc(100% - 28px) 5px, calc(100% - 28px) 5px, auto;
    }
    body.yz:is(.yz-page-payment-successful, .yz-page-payment-failed) .yz-page-body::before{ margin: 0 0 12px; }

    body.yz .sepetbaslik:has(+ .sepetlist) .uhinfo{ font-size: 15px; }
    body.yz .orderuserlogin table tr td:first-child{ width: 100%; }
    body.yz .orderuserlogin table tr td[style*="border-bottom"] + td[style*="border-bottom"]{ display: none; }
    body.yz #SubmitStepAccount > .radio-custom + .radio-custom-label{ font-size: 13.5px; }


    body.yz #payment_methods .checkbox-custom + .checkbox-custom-label{ gap: 10px; padding: 12px 14px; font-size: 12.5px; white-space: nowrap; }
    body.yz #payment_methods .checkbox-custom + .checkbox-custom-label strong{ flex: 1 1 auto; white-space: normal; font-size: 13.5px; }
    body.yz #payment_methods .checkbox-custom + .checkbox-custom-label::after{ width: 32px; height: 32px; font-size: 14px; }

    body.yz:is(.yz-page-payment-successful, .yz-page-payment-failed) .progresspayment{ margin: 0 auto !important; padding: 28px 18px 20px !important; }
    body.yz .yz-result-actions{ flex-direction: column; }
    body.yz .yz-result-actions .lbtn{ width: 100%; justify-content: center; }
}
