/* Окно 18+. Без приставки — прежнее окно (игры, переадресации: нет tokens.css); с приставкой — вид сайта.
   README «Цвета», CHANGES Т32, Т36 */
html.age-gate-lock,
html.age-gate-lock body {
    overflow: hidden;
}

.age-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 10, 18, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Окно берёт фокус само при открытии (ТИ3): рамка фокуса вокруг всего экрана не нужна, у кнопок она своя */
.age-gate-overlay:focus {
    outline: none;
}

.age-gate-box {
    background: #161821;
    color: #f4f5f7;
    max-width: 440px;
    width: 100%;
    border-radius: 16px;
    padding: 28px 24px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    text-align: center;
    box-sizing: border-box;
}

.age-gate-mark {
    display: inline-block;
    background: #d9342b;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.age-gate-title {
    font-size: 22px;
    line-height: 1.25;
    margin: 0 0 12px;
    font-weight: 700;
}

.age-gate-text {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 22px;
    color: #c7cad3;
}

.age-gate-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.age-gate-btn {
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    font-family: inherit;
}

.age-gate-btn:active {
    transform: translateY(1px);
}

.age-gate-btn--yes {
    background: #2bb673;
    color: #fff;
}

.age-gate-btn--yes:hover {
    background: #24a165;
}

.age-gate-btn--no {
    background: transparent;
    color: #c7cad3;
    border: 1px solid #2d3142;
}

.age-gate-btn--no:hover {
    background: #1f2230;
    color: #fff;
}

.age-gate-note {
    font-size: 12px;
    color: #8a8f9c;
    margin: 0;
    line-height: 1.45;
}

@media (min-width: 480px) {
    .age-gate-buttons {
        flex-direction: row;
    }
    .age-gate-btn {
        flex: 1;
    }
}

/* Вид сайта (Т32): размеры прежние, заголовок свой (h2 из site.css не протекает) */
:root:has(link[href*="/assets/css/tokens."]) .age-gate-overlay {
    background: var(--d8-overlay);
    font-family: "Inter V", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: normal;
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-box {
    background: var(--d8-surface-card), var(--d8-bg);
    color: var(--d8-text-1);
    box-shadow: inset 0 0 0 1px var(--d8-line-3), 0 24px 60px rgba(0, 0, 0, 0.5);
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-title {
    font-family: "AeonikPro", "Inter V", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--d8-text-1);
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-text {
    color: var(--d8-text-2);
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn {
    font-weight: 500;
    transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.05s ease;
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn:focus-visible {
    outline: 2px solid var(--d8-focus);
    outline-offset: 3px;
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn--yes {
    background: var(--d8-gradient);
    color: var(--d8-on-accent);
    font-weight: 700;
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn--yes:hover {
    background: var(--d8-gradient);
    box-shadow: 0 12px 30px var(--d8-accent-line);
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn--no {
    color: var(--d8-text-2);
    border-color: var(--d8-line-3);
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn--no:hover {
    background: var(--d8-surface-5);
    color: var(--d8-text-1);
    border-color: var(--d8-accent-line);
}

:root:has(link[href*="/assets/css/tokens."]) .age-gate-note {
    color: var(--d8-text-3);
}

/* Размер текста — от настройки браузера (ТИ4): те же размеры в rem (при 16 px по умолчанию — те же пиксели); прежнее окно игр — как было */
:root:has(link[href*="/assets/css/tokens."]) .age-gate-mark { font-size: 1.125rem; }
:root:has(link[href*="/assets/css/tokens."]) .age-gate-title { font-size: 1.375rem; }
:root:has(link[href*="/assets/css/tokens."]) .age-gate-text,
:root:has(link[href*="/assets/css/tokens."]) .age-gate-btn { font-size: .9375rem; }
:root:has(link[href*="/assets/css/tokens."]) .age-gate-note { font-size: .75rem; }
