/* --------------------------------------------------------------------------
   SOZLESME PENCERESI — ortak kabuk (Plan 58c36697, 11.11.2026)

   /odeme sozlesme okuyucusunun gorunumu (odeme.css .pay-redesign.odm .readerDialog,
   .odmOkuyucuAlt); token degerleri odeme.css'teki koyu / acik tema ile birebir.
   Ilk uygulama Ilan Alim Sozlesmesi (Plan 796e1738, eski ilan-sozlesme-modal.css);
   burada siniflara cevrildi ki tum sozlesme pencereleri ayni kabugu kullansin.

   Isaretleme (Bootstrap modal kabugu korunur):
     .modal.spnPencere > .modal-dialog.spnDialog > .modal-content.spnIcerik
       .spnBas     : h2.spnBaslik + [.spnSekmeler] + [.spnIkon yazdir]
       .spnGovde   : iframe (belge) | .spnMetin (HTML govde)
       .spnAlt     : .spnDugme.kapat + [.spnDugme.onayla]
   Davranis: js/sozlesme-pencere.js (perde, belge adresi eki, sekmeler, yazdir).
   Not: .szMetin sozlesme metninin madde numarasi sinifi (sozlesme-numara-css),
   bu yuzden kabuk "spn" onekli.
   -------------------------------------------------------------------------- */
.spnPencere {
    --spnSurf: #20212B;
    --spnSurf2: #272834;
    --spnSurf3: #1C1D26;
    --spnLine: #333444;
    --spnLine2: #4E4F5C;
    --spnTx: #EDEEF2;
    --spnTx2: #C8C9D8;
    --spnTx3: #ABACB5;
    --spnGrn: #80F1B1;
    --spnInk: #181820;
    --spnRed: #F0908A;
    --spnGolge: 0 30px 70px rgba(4, 5, 6, 0.55);
    font-family: "Wix Madefor Display", system-ui, sans-serif;
}
body.light .spnPencere {
    --spnSurf: #FFFFFF;
    --spnSurf2: #F5F4EE;
    --spnSurf3: #F0EEE6;
    --spnLine: #E3E1D9;
    --spnLine2: #C7C5BC;
    --spnTx: #1F1E1D;
    --spnTx2: #1F1E1D;
    --spnTx3: #6B6A65;
    --spnGrn: #137E4C;
    --spnInk: #FFFFFF;
    --spnRed: #B3402C;
    --spnGolge: 0 30px 70px rgba(31, 30, 29, 0.16);
}
body.spnAcik .modal-backdrop.show { background: rgb(12, 12, 16); opacity: .74; }
body.light.spnAcik .modal-backdrop.show { background: rgb(31, 30, 29); opacity: .24; }

.spnPencere .spnDialog { max-width: min(640px, calc(100vw - 32px)); margin-left: auto; margin-right: auto; }
.spnPencere.spnGenis .spnDialog { max-width: min(760px, calc(100vw - 32px)); }
.spnPencere .spnIcerik {
    display: flex; flex-direction: column;
    max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
    background: var(--spnSurf);
    border: 1px solid var(--spnLine2);
    border-radius: 16px;
    box-shadow: var(--spnGolge);
    overflow: hidden;
    color: var(--spnTx2);
}

/* baslik satiri */
.spnPencere .spnBas {
    flex: none;
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--spnLine);
}
.spnPencere .spnBaslik {
    flex: 1 1 auto; min-width: 0; margin: 0;
    font-family: inherit; font-size: 15.5px; font-weight: 800; line-height: 1.3;
    color: var(--spnTx);
}
.spnPencere .spnIkon {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; padding: 0;
    border-radius: 9px;
    border: 1px solid var(--spnLine2);
    background: var(--spnSurf);
    color: var(--spnTx2);
    cursor: pointer;
    text-decoration: none;
}
.spnPencere .spnIkon:hover { border-color: var(--spnGrn); color: var(--spnGrn); }
.spnPencere .spnIkon svg { display: block; }

/* iki belgeli pencere: belge sekmeleri (baslik satirinin altinda, tam genislik) */
.spnPencere .spnSekmeler {
    order: 3; flex: 1 1 100%;
    display: flex; gap: 4px;
    padding: 3px;
    border-radius: 10px;
    background: var(--spnSurf3);
    border: 1px solid var(--spnLine);
}
.spnPencere .spnSekmeler[hidden] { display: none; }
.spnPencere .spnSekme {
    flex: 1 1 0; min-width: 0;
    height: 32px; padding: 0 10px;
    border: 0; border-radius: 8px;
    background: transparent;
    font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--spnTx3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    cursor: pointer;
}
.spnPencere .spnSekme:hover { color: var(--spnTx); }
.spnPencere .spnSekme[aria-selected="true"] { background: var(--spnSurf2); color: var(--spnTx); font-weight: 800; }
.spnPencere .spnSekme[hidden] { display: none; }

/* govde: belge iframe ile (sozlesmeKabugu ?zemin=kart) ya da dogrudan HTML */
.spnPencere .spnGovde { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--spnSurf); }
.spnPencere .spnGovde iframe {
    display: block; width: 100%;
    height: min(62vh, 560px);
    border: 0;
    background: var(--spnSurf);
}
.spnPencere .spnGovde iframe.spnArka { display: none !important; }
.spnPencere .spnMetin {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
    padding: 16px;
    font-size: 12.5px; line-height: 1.75; color: var(--spnTx3);
    scrollbar-width: thin; scrollbar-color: var(--spnLine2) transparent;
}
.spnPencere .spnMetin::-webkit-scrollbar { width: 8px; }
.spnPencere .spnMetin::-webkit-scrollbar-thumb { background: var(--spnLine2); border-radius: 6px; }
.spnPencere .spnMetin b, .spnPencere .spnMetin strong, .spnPencere .spnMetin h1, .spnPencere .spnMetin h2,
.spnPencere .spnMetin h3, .spnPencere .spnMetin h4, .spnPencere .spnMetin h5 { color: var(--spnTx2); }
.spnPencere .spnMetin a { color: var(--spnGrn); }
.spnPencere .spnMetin table { max-width: 100%; }
.spnPencere .spnMetin td, .spnPencere .spnMetin th { border-color: var(--spnLine) !important; }

/* belgenin altinda tek satir not / baglanti (ilan ekle: Alim Talebi Hukumleri -> tam metin; 12.11.2026) */
.spnPencere .spnNot {
    flex: none; margin: 0;
    padding: 10px 16px;
    border-top: 1px solid var(--spnLine);
    font-size: 12.5px; line-height: 1.5; color: var(--spnTx3);
}
.spnPencere .spnNot a { color: var(--spnGrn); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* alt serit: Kapat + Okudum, onayliyorum */
.spnPencere .spnAlt {
    flex: none;
    display: flex; gap: 8px;
    padding: 12px 16px 16px;
    border-top: 1px solid var(--spnLine);
    background: var(--spnSurf3);
}
.spnPencere .spnDugme {
    flex: 1 1 0; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center;
    height: 44px; padding: 0 10px;
    border-radius: 11px;
    font-family: inherit; font-size: 13px; font-weight: 800;
    white-space: nowrap; cursor: pointer; text-decoration: none;
}
.spnPencere .spnDugme.kapat { background: var(--spnSurf); color: var(--spnTx2); border: 1px solid var(--spnLine2); }
.spnPencere .spnDugme.kapat:hover { border-color: var(--spnRed); color: var(--spnRed); }
.spnPencere .spnDugme.onayla { background: var(--spnGrn); color: var(--spnInk); border: 1px solid var(--spnGrn); }
.spnPencere .spnDugme.onayla:hover { filter: brightness(1.05); color: var(--spnInk); }
.spnPencere button:focus-visible, .spnPencere a:focus-visible { outline: 2px solid var(--spnGrn); outline-offset: 2px; }

/* GOMULU kip (.spnGomulu, 12.11.2026): kendi modal'i olmayan kabuk, baska bir pencerenin
   icini doldurur (giris modalindaki sozlesme adimi, auth/sozlesme-okuyucu.blade.php).
   Kenarlik / golge / kose / yukseklik siniri dis pencereye ait; mobil tutamac yok. */
.spnPencere.spnGomulu .spnIcerik {
    flex: 1 1 auto;
    max-height: none;
    border: 0; border-radius: 0; box-shadow: none;
}
.spnPencere.spnGomulu .spnBaslik { text-align: center; }

/* mobil: alttan acilan sayfa (odeme.css ≤767 ile ayni) */
@media (max-width: 767.98px) {
    .spnPencere .spnDialog, .spnPencere.spnGenis .spnDialog {
        max-width: none; width: 100%;
        margin: 0;
        min-height: 100%;
        align-items: flex-end;
    }
    .spnPencere.fade .spnDialog { transform: translateY(24px); }
    .spnPencere.show .spnDialog { transform: none; }
    .spnPencere .spnIcerik {
        max-height: 86vh; max-height: 86dvh;
        border-radius: 20px 20px 0 0;
        border-left: 0; border-right: 0; border-bottom: 0;
        box-shadow: 0 -18px 40px rgba(0, 0, 0, .45);
    }
    .spnPencere .spnIcerik::before {
        content: ""; display: block; flex: none;
        width: 44px; height: 4px; margin: 8px auto 2px;
        border-radius: 999px;
        background: var(--spnLine2);
    }
    .spnPencere .spnBas { padding: 8px 14px 12px; }
    .spnPencere .spnIkon { width: 44px; height: 44px; }
    .spnPencere .spnSekme { height: 38px; }
    .spnPencere .spnGovde iframe { height: 60vh; height: 60dvh; }
    .spnPencere .spnMetin { max-height: 60vh; max-height: 60dvh; }
    .spnPencere .spnAlt { padding: 12px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
    .spnPencere .spnDugme { height: 48px; }
    .spnPencere.spnGomulu .spnIcerik { max-height: none; border-radius: 0; box-shadow: none; }
    .spnPencere.spnGomulu .spnIcerik::before { display: none; }
    .spnPencere.spnGomulu .spnBas { padding: 10px 12px; }
    .spnPencere.spnGomulu .spnGovde iframe { flex: 1 1 auto; height: auto; min-height: 55vh; min-height: 55dvh; }
}
@media (prefers-reduced-motion: reduce) {
    .spnPencere.fade .spnDialog { transition: none; }
}
