/* Shared premium theme layer for JayLex legal pages. */
html {
    color-scheme: dark light;
}

body.legal-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 14% 8%, rgba(120, 78, 255, .12), transparent 32rem),
        radial-gradient(circle at 86% 16%, rgba(229, 62, 158, .08), transparent 28rem),
        #090712 !important;
    color: #f7f5fb;
    transition: background-color .25s ease, color .25s ease;
}

body.legal-page .navbar {
    background: rgba(9, 7, 18, .84);
    border-bottom-color: rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    backdrop-filter: blur(22px) saturate(145%);
}

body.legal-page .legal-content {
    width: min(860px, calc(100% - 32px));
    max-width: 860px;
    margin: 0 auto 56px;
    padding: 144px clamp(24px, 5vw, 56px) 58px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0 0 30px 30px;
    background: linear-gradient(155deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018));
    box-shadow: 0 32px 80px rgba(0, 0, 0, .28);
}

body.legal-page .legal-content h1 {
    letter-spacing: -.045em;
}

body.legal-page .legal-content h2 {
    letter-spacing: -.022em;
}

body.legal-page .legal-content p,
body.legal-page .legal-content li,
body.legal-page .legal-content small,
body.legal-page .discreet-legal {
    color: #aaa4b8 !important;
    opacity: 1;
}

body.legal-page .legal-content a {
    color: #b79cff;
    text-underline-offset: 3px;
}

body.legal-page .footer {
    background: rgba(7, 5, 14, .72);
    border-top-color: rgba(255, 255, 255, .08);
}

body.legal-page .landing-theme-toggle {
    flex: 0 0 44px;
}

html[data-landing-theme="light"] body.legal-page {
    background:
        radial-gradient(circle at 14% 8%, rgba(112, 71, 235, .10), transparent 32rem),
        radial-gradient(circle at 86% 16%, rgba(229, 62, 158, .07), transparent 28rem),
        #f7f5fb !important;
    color: #171428;
}

html[data-landing-theme="light"] body.legal-page .navbar {
    background: rgba(250, 249, 253, .88);
    border-bottom-color: rgba(46, 33, 80, .10);
}

html[data-landing-theme="light"] body.legal-page .legal-content {
    background: rgba(255, 255, 255, .82);
    border-color: rgba(64, 45, 110, .11);
    box-shadow: 0 28px 70px rgba(58, 39, 104, .10);
}

html[data-landing-theme="light"] body.legal-page .legal-content p,
html[data-landing-theme="light"] body.legal-page .legal-content li,
html[data-landing-theme="light"] body.legal-page .legal-content small,
html[data-landing-theme="light"] body.legal-page .discreet-legal {
    color: #625d70 !important;
}

html[data-landing-theme="light"] body.legal-page .legal-content a {
    color: #6440d8;
}

html[data-landing-theme="light"] body.legal-page .footer {
    background: rgba(246, 244, 251, .78);
    border-top-color: rgba(46, 33, 80, .10);
}

/* Standalone withdrawal page */
body.withdrawal-page {
    --legal-bg: #090712;
    --legal-card: rgba(20, 16, 31, .94);
    --legal-text: #f7f4ff;
    --legal-muted: #b3adbf;
    --legal-line: #342d49;
    --legal-soft: #211a31;
    --legal-accent: #a886ff;
    margin: 0;
    min-height: 100vh;
    font: 16px/1.65 Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--legal-text);
    background:
        radial-gradient(circle at 10% 0, rgba(112, 71, 235, .15), transparent 30rem),
        radial-gradient(circle at 90% 12%, rgba(211, 59, 183, .10), transparent 28rem),
        var(--legal-bg);
    transition: background-color .25s ease, color .25s ease;
}

html[data-landing-theme="light"] body.withdrawal-page {
    --legal-bg: #f7f5ff;
    --legal-card: rgba(255, 255, 255, .94);
    --legal-text: #18152b;
    --legal-muted: #625e73;
    --legal-line: #ded9ef;
    --legal-soft: #f2edff;
    --legal-accent: #7047eb;
}

.withdrawal-page .withdrawal-header,
.withdrawal-page main,
.withdrawal-page footer {
    width: min(860px, calc(100% - 32px));
    margin-inline: auto;
}

.withdrawal-page .withdrawal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 0 14px;
}

.withdrawal-page .legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--legal-text);
    font-size: 1.15rem;
    font-weight: 850;
    letter-spacing: -.035em;
    text-decoration: none;
}

.withdrawal-page .legal-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 7px 16px rgba(191, 64, 190, .24));
}

.withdrawal-page .withdrawal-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.withdrawal-page .legal-back {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    border: 1px solid var(--legal-line);
    border-radius: 13px;
    color: var(--legal-muted);
    font-weight: 720;
    text-decoration: none;
    background: color-mix(in srgb, var(--legal-card) 85%, transparent);
}

.withdrawal-page .landing-theme-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--legal-line);
    border-radius: 13px;
    background: color-mix(in srgb, var(--legal-card) 88%, transparent);
    color: var(--legal-text);
    cursor: pointer;
}

.withdrawal-page .landing-theme-toggle svg {
    position: absolute;
    width: 20px;
    height: 20px;
    transition: opacity .2s ease, transform .2s ease;
}

.withdrawal-page .theme-icon-light {
    opacity: 0;
    transform: rotate(-25deg) scale(.7);
}

.withdrawal-page .theme-icon-dark {
    opacity: 1;
    transform: rotate(0) scale(1);
}

html[data-landing-theme="light"] .withdrawal-page .theme-icon-light {
    opacity: 1;
    transform: rotate(0) scale(1);
}

html[data-landing-theme="light"] .withdrawal-page .theme-icon-dark {
    opacity: 0;
    transform: rotate(25deg) scale(.7);
}

.withdrawal-page main {
    margin-bottom: 32px;
    padding: clamp(24px, 5vw, 48px);
    background: var(--legal-card);
    border: 1px solid var(--legal-line);
    border-radius: 28px;
    box-shadow: 0 26px 72px rgba(22, 13, 54, .16);
}

.withdrawal-page h1 {
    color: var(--legal-text);
    font-size: clamp(2.15rem, 7vw, 3.35rem);
    line-height: 1.06;
    letter-spacing: -.05em;
    margin: 0 0 8px;
}

.withdrawal-page h2,
.withdrawal-page h3 {
    color: var(--legal-text);
    letter-spacing: -.025em;
}

.withdrawal-page h2 {
    margin-top: 2rem;
    line-height: 1.25;
}

.withdrawal-page h3 {
    margin-top: 1.5rem;
}

.withdrawal-page p,
.withdrawal-page .updated,
.withdrawal-page .note {
    color: var(--legal-muted);
}

.withdrawal-page strong {
    color: var(--legal-text);
}

.withdrawal-page a {
    color: var(--legal-accent);
    text-underline-offset: 3px;
}

.withdrawal-page .notice {
    margin: 24px 0;
    padding: 20px;
    border-left: 4px solid var(--legal-accent);
    background: var(--legal-soft);
    border-radius: 14px;
}

.withdrawal-page .form {
    padding: 20px;
    border: 1px dashed var(--legal-line);
    border-radius: 16px;
    white-space: normal;
}

.withdrawal-page .online-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.withdrawal-page .online-form label {
    display: grid;
    gap: 6px;
    color: var(--legal-text);
    font-weight: 720;
}

.withdrawal-page .online-form input {
    width: 100%;
    min-height: 50px;
    padding: 11px 13px;
    border: 1px solid var(--legal-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--legal-card) 90%, var(--legal-soft));
    color: var(--legal-text);
    font: inherit;
}

.withdrawal-page .online-form input:focus {
    border-color: var(--legal-accent);
    outline: 3px solid color-mix(in srgb, var(--legal-accent) 18%, transparent);
}

.withdrawal-page .online-form button {
    min-height: 52px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #7047eb, #c33bd1);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(112, 71, 235, .22);
}

.withdrawal-page .online-form button:disabled {
    opacity: .55;
    cursor: wait;
}

.withdrawal-page .form-status {
    display: none;
    padding: 14px;
    border-radius: 12px;
}

.withdrawal-page .form-status.visible {
    display: block;
}

.withdrawal-page .form-status.success {
    background: color-mix(in srgb, #2dcf73 14%, var(--legal-card));
    color: color-mix(in srgb, #2dcf73 78%, var(--legal-text));
}

.withdrawal-page .form-status.error {
    background: color-mix(in srgb, #ff5757 14%, var(--legal-card));
    color: color-mix(in srgb, #ff5757 78%, var(--legal-text));
}

.withdrawal-page .hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.withdrawal-page footer {
    padding: 0 0 38px;
    color: var(--legal-muted);
}

@media (max-width: 640px) {
    body.legal-page .legal-content {
        width: min(100% - 20px, 860px);
        padding: 112px 20px 38px;
        border-radius: 0 0 24px 24px;
    }

    .withdrawal-page .withdrawal-header,
    .withdrawal-page main,
    .withdrawal-page footer {
        width: min(100% - 20px, 860px);
    }

    .withdrawal-page .withdrawal-header {
        gap: 10px;
    }

    .withdrawal-page .legal-back {
        width: 44px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .withdrawal-page .legal-back::before {
        content: "←";
        font-size: 1.1rem;
    }

    .withdrawal-page main {
        padding: 24px 20px 32px;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.legal-page,
    body.withdrawal-page,
    .withdrawal-page .landing-theme-toggle svg {
        transition: none;
    }
}
