/**
 * Health-Data "Second Consent" pop-up styles
 *
 * Scoped modal styling for health-consent.js. All selectors are prefixed
 * `sfc-hdc-` to avoid collisions with the theme, the primary consent banner,
 * or any existing interstitials. Presented as a centered white card with a
 * soft shadow, but this is a real accessible dialog.
 *
 * Theme-agnostic: colors and fonts reference CSS custom properties
 * (--text, --dark-blue, --proximanova, --yellow) WITH hard-coded fallbacks, so
 * the modal styles cleanly on any theme. Sizes use rem; the modal is legible
 * whether the theme uses a 62.5% (1rem = 10px) base or the browser default.
 *
 * Accessibility: the primary/secondary buttons use a dark blue
 * (--dark-blue #1B4486) to meet WCAG AA contrast (>= 4.5:1) for white text.
 */

/* Overlay / backdrop — above the primary consent banner. */
.sfc-hdc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000; /* above the consent banner + preference center */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

/* Suspended state: while the preference center is open on top (triggered by
   the settings button), hide our overlay without unmounting it so the visitor
   still returns to the Accept/Reject decision afterward. */
.sfc-hdc-overlay--suspended {
    opacity: 0;
    pointer-events: none;
}

.sfc-hdc-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;
}

.sfc-hdc-heading {
    margin: 0 0 20px 0;
    font-size: 2.6rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text, #071C2C);
    text-align: left;
}

.sfc-hdc-body {
    margin: 0;
    font-size: 1.6rem;
    line-height: 2.4rem;
    color: var(--text, #071C2C);
    text-align: left;
}

.sfc-hdc-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.sfc-hdc-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). */
.sfc-hdc-btn--accept {
    background-color: var(--dark-blue, #1B4486);
    color: #fff;
}

.sfc-hdc-btn--accept:hover,
.sfc-hdc-btn--accept:focus {
    background-color: #123163;
    border-color: #123163;
}

/* Secondary buttons: outlined, dark-blue text on white (AA-compliant). */
.sfc-hdc-btn--reject,
.sfc-hdc-btn--settings {
    background-color: #fff;
    color: var(--dark-blue, #1B4486);
}

.sfc-hdc-btn--reject:hover,
.sfc-hdc-btn--reject:focus,
.sfc-hdc-btn--settings:hover,
.sfc-hdc-btn--settings:focus {
    background-color: var(--dark-blue, #1B4486);
    color: #fff;
}

/* Visible keyboard focus ring for accessibility. */
.sfc-hdc-btn:focus-visible {
    outline: 3px solid var(--yellow, #FFB743);
    outline-offset: 2px;
}

@media screen and (max-width: 640px) {
    .sfc-hdc-dialog {
        padding: 30px 20px;
    }

    .sfc-hdc-heading {
        font-size: 2.2rem;
    }

    .sfc-hdc-body {
        font-size: 1.5rem;
        line-height: 2.2rem;
    }

    .sfc-hdc-btn-group {
        flex-direction: column;
    }

    .sfc-hdc-btn {
        width: 100%;
        text-align: center;
    }
}
