/* ==================== YASAL SAYFALAR (/yasal) ====================
 * Renk degiskenleri ve metin govdesi legal-doc.css'te; bu dosyadan once yuklenir.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.legal-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--lg-bg);
    color: var(--lg-text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

/* ---------- Header (Qodi ekranindaki .chat-header ile ayni gorunum) ---------- */
.legal-header {
    position: sticky;
    top: 10px;
    z-index: 10;
    margin: 10px 12px 6px;
    background: var(--lg-header-bg);
    border: 1px solid var(--lg-header-border);
    border-radius: 14px;
    box-shadow: var(--lg-header-glow);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    backdrop-filter: blur(24px) saturate(1.5);
}

.legal-header-inner {
    height: 56px;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--lg-brand);
}

.legal-brand-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    line-height: 0;
}

.legal-brand-frame img {
    width: 100%;
    height: 100%;
    max-width: 46px;
    max-height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.legal-brand-name {
    font-size: 2.1rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.legal-beta-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.15rem;
    padding: 0.12rem 0.6rem 0.1rem;
    border-radius: 4px;
    border: 1px solid rgba(90, 185, 234, 0.35);
    background:
        linear-gradient(90deg, rgba(90, 185, 234, 0.14) 0%, rgba(86, 128, 233, 0.14) 100%),
        linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #60a5fa 100%);
    -webkit-background-clip: padding-box, text;
    background-clip: padding-box, text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
}

.legal-header-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-header-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--lg-header-border);
    background: transparent;
    color: var(--lg-text-strong);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.legal-header-btn:hover {
    background: rgba(128, 128, 128, 0.12);
}

.legal-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 0.95rem;
    border-radius: 10px;
    border: 1.5px solid var(--lg-border);
    background: transparent;
    color: var(--lg-text);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.legal-back-btn:hover,
.legal-back-btn:focus-visible {
    border-color: var(--lg-accent);
    color: var(--lg-accent);
}

/* ---------- Icerik ---------- */
.legal-main {
    flex: 1;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.legal-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--lg-muted);
}

.legal-breadcrumb a {
    color: var(--lg-muted);
    text-decoration: none;
}

.legal-breadcrumb a:hover {
    color: var(--lg-accent);
    text-decoration: underline;
}

.legal-breadcrumb i {
    font-size: 10px;
}


/* ---------- Dizin (/yasal) ---------- */
.legal-index-title {
    margin: 4px 0 20px;
    font-size: 26px;
    line-height: 1.3;
    color: var(--lg-text-strong);
}

.legal-index-group {
    margin-bottom: 22px;
    scroll-margin-top: 80px;
}

.legal-index-group h2 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lg-accent);
}

.legal-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--lg-surface);
    border: 1px solid var(--lg-border);
    border-radius: 12px;
    overflow: hidden;
}

.legal-index-list li + li {
    border-top: 1px solid var(--lg-border);
}

.legal-index-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 10px 16px;
    color: var(--lg-text-strong);
    text-decoration: none;
    line-height: 1.4;
}

.legal-index-list a:hover,
.legal-index-list a:focus-visible {
    background: var(--lg-table-head);
}

.legal-index-list i {
    flex: none;
    font-size: 12px;
    color: var(--lg-muted);
}

.legal-contact-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    margin: 0;
    padding: 16px;
    background: var(--lg-surface);
    border: 1px solid var(--lg-border);
    border-radius: 12px;
}

.legal-contact-list dt {
    color: var(--lg-muted);
    font-size: 13px;
}

.legal-contact-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.legal-contact-list a {
    color: var(--lg-accent);
}

/* ---------- 404 ---------- */
.legal-notfound {
    text-align: center;
    padding: 48px 16px;
}

.legal-notfound-icon {
    font-size: 44px;
    color: var(--lg-muted);
}

.legal-notfound h1 {
    margin: 16px 0 8px;
    font-size: 24px;
    color: var(--lg-text-strong);
}

.legal-notfound p {
    max-width: 460px;
    margin: 0 auto 24px;
    color: var(--lg-muted);
}

.legal-notfound-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ---------- Sayfa footer'i ---------- */
.legal-site-footer {
    border-top: 1px solid var(--lg-border);
    background: var(--lg-surface);
}

.legal-site-footer-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px 16px 24px;
}

@media (max-width: 640px) {
    body.legal-body {
        font-size: 14.5px;
    }

    .legal-main {
        padding: 16px 12px 36px;
    }

    .legal-header-inner {
        height: 52px;
        padding: 0 0.75rem;
    }

    .legal-brand-frame {
        width: 40px;
        height: 40px;
    }

    .legal-brand-frame img {
        max-width: 38px;
        max-height: 38px;
        filter: none;
    }

    /* Qodi'nin mobil header'i gibi: logo + BETA, "Qodi" yazisi gizli */
    .legal-brand-name {
        display: none;
    }

    .legal-contact-list {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .legal-contact-list dd + dt {
        margin-top: 10px;
    }
}

@media print {
    .legal-header,
    .legal-site-footer,
    .legal-breadcrumb {
        display: none;
    }

    .legal-doc {
        border: 0;
        padding: 0;
    }
}
