:root {
    --eca-navy: #0a1e50;
    --eca-red: #dc0046;
    --eca-ink: #17233d;
    --eca-muted: #65718a;
    --eca-border: #dfe4ed;
    --eca-surface: #ffffff;
}

body.eca-consent-open {
    overflow: hidden !important;
}

.eca-facebook-social-fallback {
    margin: 16px auto;
    max-width: 680px;
    padding: 16px;
    text-align: center;
}

.eca-facebook-social-fallback p {
    margin: 0 0 8px;
}

.eca-consent,
.eca-consent-settings {
    font-family: inherit;
}

.eca-consent[hidden],
.eca-consent__panel[hidden],
.eca-consent-settings[hidden] {
    display: none;
}

.eca-consent {
    inset: 0;
    position: fixed;
    z-index: 2147483000;
}

.eca-consent__backdrop {
    background: rgb(10 30 80 / 42%);
    inset: 0;
    position: absolute;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.eca-consent__modal {
    background: var(--eca-surface);
    border-radius: 18px;
    box-shadow: 0 24px 80px rgb(10 30 80 / 28%);
    color: var(--eca-ink);
    left: 50%;
    max-height: 90vh;
    max-width: 540px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(540px, calc(100% - 32px));
}

.eca-consent__modal:has(.eca-consent__panel--preferences:not([hidden])) {
    max-width: 640px;
    width: min(640px, calc(100% - 32px));
}

.eca-consent__panel {
    max-height: 90vh;
    overflow: auto;
    padding: 24px;
}

.eca-consent__panel--preferences {
    overscroll-behavior: contain;
    padding-bottom: 24px;
}

.eca-consent__close {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--eca-muted);
    cursor: pointer;
    display: flex;
    font-size: 24px;
    height: 32px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: 10px;
    top: 10px;
    width: 32px;
    z-index: 1;
}

#eca-consent-banner .eca-consent__eyebrow {
    color: var(--eca-red);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.eca-consent h2 {
    color: var(--eca-navy);
    font-size: 20px;
    line-height: 1.2;
    margin: 0 48px 20px 0;
}

#eca-consent-banner .eca-consent__lead,
#eca-consent-banner .eca-consent__category p,
#eca-consent-banner .eca-consent__category-copy > span:last-child,
#eca-consent-banner .eca-consent__footnote {
    font-size: 13px;
    line-height: 1.55;
}

.eca-consent__lead {
    margin: 0;
}

#eca-consent-banner .eca-consent__links {
    font-size: 12px;
    margin: 14px 0 18px;
}

.eca-consent a {
    color: var(--eca-navy);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.eca-consent__actions {
    display: flex;
    gap: 10px;
}

.eca-consent__actions--intro,
.eca-consent__actions--preferences {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.eca-consent__actions--intro {
    border-top: 1px solid var(--eca-border);
    margin-top: 20px;
    padding-top: 16px;
}

.eca-button {
    border: 2px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    min-height: 40px;
    padding: 9px 12px;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
    width: 100%;
}

.eca-button--primary {
    background: var(--eca-red);
    color: #fff;
}

.eca-button--secondary {
    background: #fff;
    border-color: var(--eca-navy);
    color: var(--eca-navy);
}

.eca-button:focus-visible,
.eca-consent__close:focus-visible,
.eca-consent-settings:focus-visible,
.eca-consent__category--toggle:has(input:focus-visible) {
    outline: 3px solid rgb(220 0 70 / 35%);
    outline-offset: 3px;
}

.eca-consent__categories {
    border-top: 1px solid var(--eca-border);
}

.eca-consent__category {
    border-bottom: 1px solid var(--eca-border);
    padding: 20px 0;
}

.eca-consent__category p {
    margin: 10px 0 0;
}

.eca-consent__category-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.eca-consent__category-heading h3,
.eca-consent__category-heading strong {
    color: var(--eca-navy);
    font-size: 15px;
    margin: 0;
}

.eca-consent__always-on {
    color: var(--eca-muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.eca-consent__category--toggle {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 12px;
}

.eca-consent__category-copy {
    display: grid;
    gap: 8px;
    flex: 1;
}

.eca-consent__category-copy > span:last-child {
    color: var(--eca-muted);
}

.eca-consent__category--toggle input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.eca-consent__switch {
    background: #c8cfdb;
    border-radius: 99px;
    flex: 0 0 auto;
    height: 24px;
    margin-top: 2px;
    position: relative;
    transition: background-color .2s ease;
    width: 44px;
}

.eca-consent__switch::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgb(10 30 80 / 25%);
    content: '';
    height: 18px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform .2s ease;
    width: 18px;
}

.eca-consent__category--toggle input:checked + .eca-consent__switch {
    background: var(--eca-red);
}

.eca-consent__category--toggle input:checked + .eca-consent__switch::after {
    transform: translateX(20px);
}

.eca-consent__footnote {
    color: var(--eca-muted);
    margin: 16px 0 0;
}

.eca-consent__actions--preferences {
    background: var(--eca-surface);
    border-top: 1px solid var(--eca-border);
    bottom: 0;
    margin: 16px -24px 0;
    padding: 16px 24px 0;
    position: sticky;
}

.eca-consent-settings {
    align-items: center;
    background: var(--eca-navy);
    border: 3px solid #fff;
    border-radius: 50%;
    bottom: 22px;
    box-shadow: 0 8px 24px rgb(10 30 80 / 26%);
    color: #fff;
    cursor: pointer;
    display: flex;
    height: 48px;
    justify-content: center;
    left: 22px;
    padding: 0;
    position: fixed;
    width: 48px;
    z-index: 2147482999;
}

.eca-consent-settings svg {
    fill: none;
    height: 23px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 23px;
}

@media (max-width: 620px) {
    .eca-consent__modal {
        border-radius: 16px;
        width: min(90%, 520px);
    }

    .eca-consent__panel {
        padding: 18px;
    }

    .eca-consent__actions--intro,
    .eca-consent__actions--preferences {
        align-items: stretch;
        display: grid;
        gap: 10px;
        grid-template-columns: 1fr 1fr;
    }

    .eca-consent__actions--intro .eca-button:last-child,
    .eca-consent__actions--preferences .eca-button:last-child {
        grid-column: 1 / -1;
    }

    .eca-consent__actions--preferences {
        margin: 16px -18px 0;
        padding: 14px 18px 18px;
    }

    .eca-button {
        min-height: 44px;
        padding-inline: 12px;
    }

    body.fsr-page.fsr-has-mobile-contact.fsr-contact-visible .eca-consent-settings {
        bottom: calc(88px + env(safe-area-inset-bottom));
    }
}


/* Keep the dialog independent from Enfold and the standalone training template. */
#eca-consent-banner *, #eca-consent-settings { box-sizing: border-box; }
#eca-consent-banner h2 { color: var(--eca-navy); font-size: 20px; line-height: 1.2; font-weight: 700; margin: 0 40px 14px 0; text-transform: none; letter-spacing: -.025em; }
#eca-consent-banner .eca-consent__actions--preferences { padding-bottom: 24px; }
#eca-consent-banner button.eca-button { font-size: 12px; font-weight: 700; line-height: 1.2; min-height: 40px; padding: 9px 12px; text-decoration: none; }
#eca-consent-banner button.eca-button--primary { background: var(--eca-red); color: #fff !important; }
#eca-consent-banner button.eca-button--secondary { background: #fff; color: var(--eca-navy) !important; }
#eca-consent-banner button.eca-consent__close { color: var(--eca-navy) !important; font-size: 24px !important; font-weight: 700; line-height: 1 !important; min-height: 30px; padding: 0 !important; text-align: center; }
#eca-consent-banner .eca-consent__panel--preferences { padding-bottom: 0; }
#eca-consent-banner .eca-consent__actions--preferences { margin-bottom: 0; }
.eca-consent-settings { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 760px) {
    .eca-consent-settings { width: 44px; height: 44px; left: 16px; }
    #eca-consent-banner h2 { font-size: 18px; }
    #eca-consent-banner .eca-consent__lead,
    #eca-consent-banner .eca-consent__category p,
    #eca-consent-banner .eca-consent__category-copy > span:last-child,
    #eca-consent-banner .eca-consent__footnote { font-size: 13px; line-height: 1.55; }
    #eca-consent-banner .eca-consent__links { font-size: 12px; }
    #eca-consent-banner button.eca-button { font-size: 13px; min-height: 44px; padding-inline: 12px; }
    .fsr-has-mobile-contact.fsr-contact-visible .eca-consent-settings { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
    .eca-consent *, .eca-consent-settings { transition: none !important; animation: none !important; }
}
