/**
 * GPC override confirmation prompt (Component B) styles
 *
 * Scoped to gpc-enforcement.js's modal. All selectors are prefixed `ank-gpc-`
 * to avoid collisions with the theme, the CookieYes banner, or the
 * sfc-health-consent pop-up.
 *
 * Theme-agnostic in the same way as health-consent.css: colors and fonts
 * reference CSS custom properties (--text, --dark-blue, --proximanova,
 * --yellow) WITH hard-coded fallbacks. Sizes use rem, so the modal is legible
 * whether the theme uses a 62.5% (1rem = 10px) base or the browser default.
 *
 * Accessibility: buttons use the same dark blue (--dark-blue #1B4486) that
 * meets WCAG AA contrast (>= 4.5:1) against white.
 *
 * Stacking: this sits one below the health-data pop-up. The two never render
 * at the same time — the health prompt fires after a commit, this one before —
 * but the ordering is fixed deliberately rather than left to chance.
 */

.ank-gpc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147482999; /* above the CookieYes preference center */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

.ank-gpc-dialog {
    background: #fff;
    width: 100%;
    max-width: 640px;
    padding: 40px;
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    color: var(--text, #071C2C);
    font-family: var(--proximanova, sans-serif);
    box-sizing: border-box;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.ank-gpc-heading {
    margin: 0 0 20px 0;
    font-size: 2.6rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text, #071C2C);
    text-align: left;
}

.ank-gpc-intro {
    margin: 0;
    font-size: 1.6rem;
    line-height: 2.4rem;
    color: var(--text, #071C2C);
    text-align: left;
}

/* Radio group. The legend duplicates the heading for screen readers, so it is
   visually hidden rather than removed. */
.ank-gpc-choices {
    margin: 25px 0 0 0;
    padding: 0;
    border: 0;
}

.ank-gpc-legend {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.ank-gpc-choice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.ank-gpc-radio {
    flex: 0 0 auto;
    width: 1.8rem;
    height: 1.8rem;
    margin: 0.3rem 0 0 0;
    accent-color: var(--dark-blue, #1B4486);
    cursor: pointer;
}

.ank-gpc-label {
    flex: 1 1 auto;
    font-size: 1.5rem;
    line-height: 2.2rem;
    color: var(--text, #071C2C);
    cursor: pointer;
}

.ank-gpc-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.ank-gpc-btn {
    font-family: inherit;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 0;
    padding: 1.4rem 3rem 1.5rem;
    border: 2px solid var(--dark-blue, #1B4486);
    cursor: pointer;
    transition: all 0.2s ease-out;
    -webkit-appearance: none;
    appearance: none;
}

/* Primary: dark-blue fill, white text (AA-compliant contrast). */
.ank-gpc-btn--confirm {
    background-color: var(--dark-blue, #1B4486);
    color: #fff;
}

.ank-gpc-btn--confirm:hover:not(:disabled),
.ank-gpc-btn--confirm:focus:not(:disabled) {
    background-color: #123163;
    border-color: #123163;
}

/* Confirm stays disabled until the visitor picks an option — the choice has
   to be affirmative, so there is no preselected default to fall through on. */
.ank-gpc-btn--confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Secondary: outlined, dark-blue text on white (AA-compliant). */
.ank-gpc-btn--cancel {
    background-color: #fff;
    color: var(--dark-blue, #1B4486);
}

.ank-gpc-btn--cancel:hover,
.ank-gpc-btn--cancel:focus {
    background-color: var(--dark-blue, #1B4486);
    color: #fff;
}

.ank-gpc-btn:focus-visible,
.ank-gpc-radio:focus-visible {
    outline: 3px solid var(--yellow, #FFB743);
    outline-offset: 2px;
}

.ank-gpc-footer {
    margin: 25px 0 0 0;
    font-size: 1.4rem;
    line-height: 2.1rem;
    color: var(--text, #071C2C);
}

.ank-gpc-link {
    color: var(--dark-blue, #1B4486);
    text-decoration: underline;
}

@media screen and (max-width: 640px) {
    .ank-gpc-dialog {
        padding: 30px 20px;
    }

    .ank-gpc-heading {
        font-size: 2.2rem;
    }

    .ank-gpc-intro {
        font-size: 1.5rem;
        line-height: 2.2rem;
    }

    .ank-gpc-btn-group {
        flex-direction: column;
    }

    .ank-gpc-btn {
        width: 100%;
        text-align: center;
    }
}
