/* ==========================================================================
   Legal sections — stadium shell (aligned with Contact / Social)
   Used by: terms, privacy, claims, about
   ========================================================================== */

.legal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 1950;
    display: none;
    overflow: hidden;
    opacity: 0;
    background: rgba(6, 10, 18, 0.55);
}

.legal-overlay.is-active {
    display: block;
    opacity: 1;
}

.legal-overlay .legal-stadium {
    z-index: 0;
}

.legal-shell {
    position: relative;
    z-index: 1;
    height: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 28px 40px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.legal-shell::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.legal-close-btn {
    position: absolute;
    top: 22px;
    right: 28px;
    background: none;
    border: none;
    font-family: "Sora", sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    color: var(--sf-muted, #9aa8bc);
    transition: color 0.25s ease;
    z-index: 2;
    padding: 6px 0;
}

.legal-close-btn:hover,
.legal-close-btn:focus-visible {
    color: var(--sf-chrome, #eef4ff);
    outline: none;
}

.legal-hero {
    position: relative;
    padding: 56px 0 28px;
    width: 100%;
    pointer-events: none;
}

.legal-hero .broadcast-title {
    pointer-events: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.legal-hero-lead {
    margin: 16px 0 0;
    max-width: 42rem;
    font-family: "Sora", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: rgba(238, 244, 255, 0.78);
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(300px, 1.4fr);
    gap: 20px;
    align-items: stretch;
    padding-bottom: 24px;
}

.legal-meta,
.legal-doc-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(165deg, rgba(255, 77, 0, 0.05) 0%, transparent 40%),
        linear-gradient(180deg, rgba(12, 20, 34, 0.94) 0%, rgba(4, 8, 14, 0.96) 100%);
    border: 1px solid rgba(34, 232, 144, 0.18);
    border-left: 3px solid var(--sf-primary, #ff4d00);
    border-radius: var(--radius-overlay, 12px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 28px 26px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.legal-meta::before,
.legal-doc-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 36% at 50% 0%, rgba(255, 120, 40, 0.12) 0%, transparent 65%);
    z-index: 0;
}

.legal-meta > *,
.legal-doc-panel > * {
    position: relative;
    z-index: 1;
}

body.is-low-power .legal-meta,
body.is-low-power .legal-doc-panel {
    background: rgba(12, 20, 34, 0.96);
}

.legal-section-label {
    margin: 0 0 18px;
    font-family: "Sora", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sf-primary-bright, #ffb000);
}

.legal-meta-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.legal-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(34, 232, 144, 0.12);
}

.legal-meta-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.legal-meta-key {
    font-family: "Sora", sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(168, 240, 200, 0.9);
}

.legal-meta-value {
    font-family: "Sora", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--sf-chrome, #eef4ff);
    text-decoration: none;
    word-break: break-word;
}

a.legal-meta-value {
    color: var(--sf-secondary, #22e890);
    transition: color 0.2s ease;
}

a.legal-meta-value:hover,
a.legal-meta-value:focus-visible {
    color: var(--sf-primary-bright, #ffb000);
    outline: none;
}

.legal-meta-note {
    margin: 18px 0 0;
    font-family: "Sora", sans-serif;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 244, 200, 0.85);
    padding: 12px 14px;
    border: 1px solid rgba(255, 212, 0, 0.28);
    border-left: 3px solid #ffd400;
    background: rgba(255, 212, 0, 0.07);
}

.legal-lang-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
}

.legal-lang-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(34, 232, 144, 0.28);
    background: rgba(8, 14, 24, 0.55);
    color: var(--sf-chrome, #eef4ff);
    font-family: "Sora", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 10px 14px;
    border-radius: var(--radius-button, 6px);
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.legal-lang-chip:hover,
.legal-lang-chip:focus-visible {
    border-color: var(--sf-primary-bright, #ffb000);
    background: rgba(255, 176, 0, 0.12);
    color: var(--sf-primary-bright, #ffb000);
    outline: none;
}

.legal-lang-chip.is-active {
    border-color: var(--sf-primary-bright, #ffb000);
    background: rgba(255, 176, 0, 0.16);
    color: var(--sf-primary-bright, #ffb000);
}

.legal-meta-cta {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legal-meta-cta .product-buy-now-btn,
.legal-meta-cta .legal-cta-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 18px;
    font-family: "Sora", sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-button, 6px);
    box-sizing: border-box;
    cursor: pointer;
}

.legal-cta-secondary {
    color: var(--sf-chrome, #eef4ff);
    background: transparent;
    border: 1px solid rgba(34, 232, 144, 0.35);
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.legal-cta-secondary:hover,
.legal-cta-secondary:focus-visible {
    border-color: var(--sf-primary-bright, #ffb000);
    color: var(--sf-primary-bright, #ffb000);
    background: rgba(255, 176, 0, 0.12);
    outline: none;
}

.legal-doc-panel {
    min-height: 420px;
    max-height: none;
    padding: 0;
    overflow: hidden;
}

.legal-doc-panel .legal-section-label {
    margin: 0;
    padding: 22px 26px 0;
}

.legal-doc-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 26px 28px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(34, 232, 144, 0.35) transparent;
    max-height: min(58vh, 640px);
}

.legal-doc-scroll .legal-banner {
    display: none; /* banner lives in meta panel */
}

.legal-doc-scroll .legal-divider {
    display: none;
}

.legal-doc-scroll .legal-lang {
    display: none;
}

.legal-doc-scroll .legal-lang.is-visible {
    display: block;
}

.legal-doc-scroll .legal-lang-label {
    display: none;
}

.legal-doc-scroll h3 {
    margin: 22px 0 8px;
    font-family: var(--font-display, "Bebas Neue", sans-serif);
    font-size: clamp(18px, 3.2vw, 22px);
    letter-spacing: 1px;
    color: var(--sf-chrome, #eef4ff);
    font-weight: 400;
}

.legal-doc-scroll h3:first-child {
    margin-top: 4px;
}

.legal-doc-scroll h4 {
    margin: 16px 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(238, 244, 255, 0.88);
}

.legal-doc-scroll p {
    margin: 0 0 10px;
    font-family: "Sora", sans-serif;
    font-size: 13px;
    line-height: 1.7;
    color: rgba(244, 246, 248, 0.78);
}

.legal-doc-scroll ul,
.legal-doc-scroll ol {
    margin: 0 0 12px;
    padding-left: 1.2em;
    font-family: "Sora", sans-serif;
    font-size: 13px;
    line-height: 1.65;
    color: rgba(244, 246, 248, 0.78);
}

.legal-doc-scroll li {
    margin: 0 0 6px;
}

.legal-doc-scroll a {
    color: var(--sf-secondary, #22e890);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-doc-scroll a:hover {
    color: #ffb000;
}

.legal-doc-scroll code {
    font-size: 0.92em;
    color: #ffd400;
    background: rgba(255, 212, 0, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
}

.legal-doc-scroll strong {
    color: rgba(238, 244, 255, 0.95);
    font-weight: 700;
}

@media (max-width: 860px) {
    .legal-shell {
        padding: 20px 18px 32px;
    }

    .legal-close-btn {
        top: 16px;
        right: 18px;
    }

    .legal-hero {
        padding: 48px 0 22px;
        padding-right: 64px;
    }

    .legal-hero .broadcast-title {
        flex-wrap: wrap;
        white-space: normal;
    }

    .legal-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .legal-doc-scroll {
        max-height: min(52vh, 520px);
    }
}
