/**
 * RWC Exit Notifier — Modal styles.
 *
 * Senior-friendly: large text, high contrast, clear focus rings.
 * Uses CSS custom properties for theming via inline style in JS.
 */

/* ─── Custom properties (defaults, overridden by JS) ─────────── */
:root {
    --rwc-en-primary: #005587;
    --rwc-en-text: #333333;
    --rwc-en-bg: #ffffff;
    --rwc-en-overlay-bg: rgba(0, 0, 0, 0.6);
    --rwc-en-radius: 12px;
}

/* ─── Overlay ────────────────────────────────────────────────── */
.rwc-en-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--rwc-en-overlay-bg);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.rwc-en-overlay.is-open {
    display: flex;
}

/* ─── Body scroll lock ───────────────────────────────────────── */
body.rwc-en-scroll-lock {
    overflow: hidden;
}

/* ─── Modal card ─────────────────────────────────────────────── */
.rwc-en-modal {
    background: var(--rwc-en-bg);
    color: var(--rwc-en-text);
    border-radius: var(--rwc-en-radius);
    max-width: 520px;
    width: 100%;
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
    animation: rwc-en-fade-in 0.2s ease-out;
}

@keyframes rwc-en-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Logo ───────────────────────────────────────────────────── */
.rwc-en-logo {
    max-height: 60px;
    max-width: 200px;
    margin: 0 auto 1.25rem;
    display: block;
}

/* ─── Heading ────────────────────────────────────────────────── */
.rwc-en-heading {
    font-size: 1.625rem; /* ~26px */
    font-weight: 700;
    margin: 0 0 1rem;
    color: var(--rwc-en-text);
    line-height: 1.3;
}

/* ─── Message ────────────────────────────────────────────────── */
.rwc-en-message {
    font-size: 1.25rem; /* 20px */
    line-height: 1.6;
    margin: 0 0 2rem;
    color: var(--rwc-en-text);
}

/* ─── Button row ─────────────────────────────────────────────── */
.rwc-en-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Buttons (shared) ───────────────────────────────────────── */
.rwc-en-btn {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    padding: 1rem 2rem;
    min-height: 48px;
    min-width: 140px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    line-height: 1.2;
}

/* Focus ring — visible on keyboard focus */
.rwc-en-btn:focus-visible {
    outline: 3px solid var(--rwc-en-primary);
    outline-offset: 3px;
}

/* ─── Continue button ────────────────────────────────────────── */
.rwc-en-btn--continue {
    background-color: var(--rwc-en-primary);
    color: #ffffff;
    border-color: var(--rwc-en-primary);
}

.rwc-en-btn--continue:hover:not(:disabled) {
    filter: brightness(1.1);
}

.rwc-en-btn--continue:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─── Cancel button ──────────────────────────────────────────── */
.rwc-en-btn--cancel {
    background-color: transparent;
    color: var(--rwc-en-primary);
    border-color: var(--rwc-en-primary);
}

.rwc-en-btn--cancel:hover {
    background-color: var(--rwc-en-primary);
    color: #ffffff;
}

/* ─── Countdown text ─────────────────────────────────────────── */
.rwc-en-countdown {
    font-size: 0.95rem;
    color: var(--rwc-en-text);
    opacity: 0.7;
    margin-top: 0.75rem;
    min-height: 1.4em;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
    .rwc-en-modal {
        padding: 2rem 1.25rem 1.5rem;
        border-radius: 8px;
    }

    .rwc-en-heading {
        font-size: 1.375rem;
    }

    .rwc-en-message {
        font-size: 1.1rem;
    }

    .rwc-en-actions {
        flex-direction: column;
    }

    .rwc-en-btn {
        width: 100%;
    }
}
