/* TemaDepo — Modal Sistemi · v20260601-1
   Tüm vitrin sayfalarında yüklenir.
   Prefix: .tdm- (çakışma yok)
*/

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.tdm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    box-sizing: border-box;
}
.tdm-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* ── Temel kutu ──────────────────────────────────────────────────────────── */
.tdm-box {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease, opacity 0.22s ease;
    opacity: 0;
    width: 100%;
    position: relative;
}
.tdm-overlay.is-open .tdm-box {
    transform: none;
    opacity: 1;
}

/* ── Stil varyantları ────────────────────────────────────────────────────── */
/* Küçük */
.tdm-box--center-sm  { max-width: 420px; }
/* Orta (varsayılan) */
.tdm-box--center-md  { max-width: 580px; }
/* Büyük */
.tdm-box--center-lg  { max-width: 860px; }
/* Tam ekran */
.tdm-box--fullscreen {
    max-width: 100%;
    width: 100%;
    height: calc(100vh - 40px);
    border-radius: 12px;
}
/* Sağ panel */
.tdm-overlay--panel-right {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
}
.tdm-box--panel-right {
    max-width: 480px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 16px 0 0 16px;
    transform: translateX(40px);
}
.tdm-overlay.is-open .tdm-box--panel-right { transform: none; }

/* Sol panel */
.tdm-overlay--panel-left {
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}
.tdm-box--panel-left {
    max-width: 480px;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0 16px 16px 0;
    transform: translateX(-40px);
}
.tdm-overlay.is-open .tdm-box--panel-left { transform: none; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.tdm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #f0eff6;
    flex-shrink: 0;
}
.tdm-title {
    font-family: 'Syne', 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #14122b;
    margin: 0;
    line-height: 1.3;
}
.tdm-close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e8e7f0;
    background: #f8f7fc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6d6a85;
    transition: background 0.15s, color 0.15s;
    font-size: 1.2rem;
    line-height: 1;
}
.tdm-close:hover { background: #eeedf6; color: #14122b; }
.tdm-close svg { width: 16px; height: 16px; display: block; }

/* ── Gövde ───────────────────────────────────────────────────────────────── */
.tdm-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

/* İçerik tipografisi */
.tdm-body p   { margin: 0 0 0.8rem; font-size: 0.93rem; color: #3a3660; line-height: 1.6; }
.tdm-body p:last-child { margin-bottom: 0; }
.tdm-body h2  { font-size: 1.05rem; font-weight: 800; color: #14122b; margin: 0 0 0.5rem; }
.tdm-body h3  { font-size: 0.95rem; font-weight: 700; color: #14122b; margin: 0 0 0.4rem; }
.tdm-body ul, .tdm-body ol { padding-left: 1.4rem; margin: 0 0 0.8rem; }
.tdm-body li  { font-size: 0.91rem; color: #3a3660; line-height: 1.55; margin-bottom: 0.3rem; }
.tdm-body a   { color: #5558df; text-decoration: underline; }
.tdm-body a:hover { color: #3a3db0; }
.tdm-body strong { font-weight: 700; color: #14122b; }
.tdm-body em  { font-style: italic; }
.tdm-body img { max-width: 100%; border-radius: 8px; display: block; margin: 0.5rem 0; }
.tdm-body figure { margin: 0.8rem 0; }
.tdm-body figure img { width: 100%; height: auto; }
.tdm-body figcaption { font-size: 0.8rem; color: #9390aa; margin-top: 4px; text-align: center; }
.tdm-body hr  { border: none; border-top: 1px solid #f0eff6; margin: 1rem 0; }

/* Lightbox varyantı */
.tdm-body--lightbox { padding: 0; }
.tdm-body--lightbox img { border-radius: 0 0 16px 16px; width: 100%; height: auto; display: block; }

/* ── Mobil ───────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .tdm-overlay { padding: 12px; align-items: flex-end; }
    .tdm-box { border-radius: 16px 16px 0 0; max-height: 85vh; }
    .tdm-box--center-sm,
    .tdm-box--center-md,
    .tdm-box--center-lg { max-width: 100%; }
    .tdm-overlay--panel-right,
    .tdm-overlay--panel-left { align-items: flex-end; justify-content: stretch; }
    .tdm-box--panel-right,
    .tdm-box--panel-left { max-width: 100%; width: 100%; height: 85vh; border-radius: 16px 16px 0 0; }
}
