/* Ödeme sayfası (CheckoutPage, UpgradePage, ConfirmationPage, PayTrPaymentPage; AppLayout / Duralux, index.html yükler).
   Kart, form, checkbox, rozet, alert ve butonlar Duralux bileşenleri; burada yalnızca Duralux'ta karşılığı olmayanlar var.
   Kaynak: themes/checkout/css/style.css (sayfa genişliği, yapışkan özet, bireysel / kurumsal anahtarı, kart marka ikonları,
   PayTR 3D penceresi); checkout dosyası değiştirilmedi. Tüm kurallar .checkout-page altında.
   Dark mode Duralux'un html.app-skin-dark sınıfıyla. */

.checkout-page {
    --cp-accent: var(--bs-primary);
    --cp-accent-dark: #8f1a1a;
    --cp-surface: #fff;
    --cp-ink-soft: #6b7280;
    --cp-line: #e5e7eb;
    --cp-toggle-bg: #e8eaee;
    --cp-header-h: 80px; /* Duralux header yüksekliği (sipariş özeti bunun altına yapışır) */
    padding: 30px 0 72px;
}

html.app-skin-dark .checkout-page {
    --cp-surface: #0f172a;
    --cp-ink-soft: #b1b4c0;
    --cp-line: #1b2436;
    --cp-toggle-bg: #1c2438;
}

/* Sayfa genişliği (checkout .wrap.checkout-grid ile aynı: 1140px, ortalı) */
.checkout-page .wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

/* Dar sayfalar (onay, PayTR sonucu): checkout .done-card ile aynı 560px */
.checkout-page .wrap.wrap-sm { max-width: 624px; }

/* Onay ikonu: halka ve tik çizilerek gelir (checkout .success-icon; Duralux'ta yok) */
.checkout-page .success-icon { width: 76px; height: 76px; margin: 0 auto 20px; color: var(--bs-success); }
.checkout-page .success-icon svg { width: 100%; height: 100%; }
.checkout-page .success-icon .ring { stroke-dasharray: 176; stroke-dashoffset: 176; animation: cp-draw .7s cubic-bezier(.65, 0, .35, 1) .15s forwards; }
.checkout-page .success-icon .tick { stroke-dasharray: 36; stroke-dashoffset: 36; animation: cp-draw .4s cubic-bezier(.65, 0, .35, 1) .7s forwards; }
@keyframes cp-draw { to { stroke-dashoffset: 0; } }

/* Sağ sütun: sipariş özeti header'ın altında yapışkan (geniş ekranda) */
@media (min-width: 992px) {
    .checkout-page .col-side { position: sticky; top: calc(var(--cp-header-h) + 20px); }
}

/* Bireysel / Kurumsal anahtarı (gizli radio + label, JS'siz) */
.checkout-page .sr-ctl { position: absolute; width: 1px; height: 1px; margin: -1px; opacity: 0; pointer-events: none; }
.checkout-page .seg { display: inline-flex; gap: 4px; padding: 4px; width: max-content; background: var(--cp-toggle-bg); border: 1px solid var(--cp-line); border-radius: 999px; }
.checkout-page .seg label { display: inline-flex; align-items: center; margin: 0; padding: 8px 24px; border-radius: 999px; background: var(--cp-surface); color: var(--cp-ink-soft); font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; transition: background-color .2s, color .2s, box-shadow .2s; }
.checkout-page #at-ind:checked ~ .seg label[for="at-ind"],
.checkout-page #at-corp:checked ~ .seg label[for="at-corp"] { background: var(--cp-accent); color: #fff; box-shadow: 0 3px 10px rgba(178, 34, 34, .30); }
.checkout-page #at-ind:focus-visible ~ .seg label[for="at-ind"],
.checkout-page #at-corp:focus-visible ~ .seg label[for="at-corp"] { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
@media (hover: hover) {
    .checkout-page #at-ind:checked ~ .seg label[for="at-ind"]:hover,
    .checkout-page #at-corp:checked ~ .seg label[for="at-corp"]:hover { background: var(--cp-accent-dark); }
}

/* Kart marka ikonları (kart numarası alanının sağında) */
.checkout-page .card-brands { display: flex; gap: 4px; align-items: center; }
.checkout-page .cb { width: 31px; height: 21px; border-radius: 4px; }

/* PayTR 3D penceresi (SweetAlert görünümü); iframe aynı DOM üzerinde korunur. Görünürlük paytrThreeD.js'te (style.display). */
.checkout-page .paytr-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(0, 0, 0, .4); align-items: center; justify-content: center; padding: 16px; }
.checkout-page .paytr-popup { position: relative; box-sizing: border-box; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow: auto; background: #fff; color: #545454; border-radius: 8px; padding: 28px 24px 16px; box-shadow: 0 12px 48px rgba(0, 0, 0, .18); text-align: center; }
.checkout-page .paytr-popup .paytr-close { position: absolute; top: 8px; right: 10px; display: flex; align-items: center; justify-content: center; width: 36px; min-width: 36px; height: 36px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #9ca3af; font: 32px/1 Arial, sans-serif; cursor: pointer; }
.checkout-page .paytr-popup .paytr-close:hover { color: #545454; background: #f3f4f6; }
.checkout-page .paytr-popup .paytr-close:focus-visible { outline: 2px solid #7066e0; outline-offset: 2px; }
.checkout-page .paytr-title { margin: 8px 24px 10px; font-size: 20px; line-height: 1.0; font-weight: 600; color: #545454; }
.checkout-page .paytr-description { margin: 0 0 18px; font-size: 13px; line-height: 1.1; color: #737b89; }
.checkout-page .paytr-content { overflow: hidden; border-radius: 6px; background: #fff; }
.checkout-page .paytr-frame { display: block; width: 100%; height: clamp(280px, 55dvh, 420px); border: 0; background: #fff; }
.checkout-page .paytr-waiting { padding: 56px 16px; }
.checkout-page .paytr-waiting-title { margin: 20px 0 8px; font-size: 16px; font-weight: 600; }
.checkout-page .paytr-footer { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: #8b93a1; }

/* Responsive */
@media (max-width: 639.98px) {
    .checkout-page { padding: 20px 0 56px; }
    .checkout-page .seg { width: 100%; }
    .checkout-page .seg label { flex: 1; justify-content: center; }
}
@media (max-width: 480px) {
    .checkout-page .paytr-overlay { padding: 10px; }
    .checkout-page .paytr-popup { padding: 24px 12px 14px; max-height: calc(100dvh - 20px); }
    .checkout-page .paytr-title { font-size: 21px; }
    .checkout-page .paytr-frame { height: 60dvh; }
}
@media (prefers-reduced-motion: reduce) {
    .checkout-page .seg label { transition: none; }
    .checkout-page .success-icon .ring,
    .checkout-page .success-icon .tick { animation: none; stroke-dashoffset: 0; }
}
