/* Independent of site theme contrast; CookieConsent retains keyboard/focus behavior. */
#cc-main {
    --cc-font-family: inherit;
    --cc-bg: #fff;
    --cc-primary-color: #202c38;
    --cc-secondary-color: #425466;
    --cc-btn-primary-bg: #233c50;
    --cc-btn-primary-color: #fff;
    --cc-btn-primary-border-color: #233c50;
    --cc-btn-primary-hover-bg: #172c3c;
    --cc-btn-primary-hover-color: #fff;
    --cc-btn-secondary-bg: #edf1f4;
    --cc-btn-secondary-color: #202c38;
    --cc-btn-secondary-border-color: #c4cdd5;
    --cc-btn-secondary-hover-bg: #dce4ea;
    --cc-btn-secondary-hover-color: #202c38;
    --cc-toggle-on-bg: #233c50;
    --cc-toggle-off-bg: #677786;
    --cc-modal-border-radius: 12px;
    --cc-btn-border-radius: 6px;
}
#cc-main .cm--bar .cm__body { max-width: 1200px; margin: auto; }
#cc-main .cm__title { font-size: 1rem; }
#cc-main .cm__desc { font-size: .875rem; line-height: 1.5; }
#cc-main .cm__btn { min-height: 42px; font-size: .875rem; }
#cc-main .cm--bar { box-shadow: 0 -3px 20px #152b4014; }
.st-consent-placeholder { padding: 1rem; border: 1px solid #c4cdd5; background: #f4f6f8; color: #202c38; border-radius: 8px; margin: 1rem 0; font: inherit; }
.st-consent-placeholder button, .st-consent-link { cursor: pointer; font: inherit; text-decoration: underline; background: transparent; color: inherit; border: 0; padding: .5rem; }
.st-consent-placeholder button:focus-visible, .st-consent-link:focus-visible { outline: 2px solid #233c50; outline-offset: 2px; }
.st-consent-footer { text-align: center; font-size: .8rem; padding: .25rem; }
.st-consent-editor-warning { padding: .75rem; border: 1px solid #976514; background: #fff7e6; color: #533b13; font: 14px/1.5 system-ui, sans-serif; }
@media (max-width: 640px) {
    #cc-main .cm__btn { padding: .6rem; }
    #cc-main .cm--bar .cm__texts { padding: 1rem; }
}

html[data-st-consent-placement="bottom"] body::after { content: ""; display: block; height: var(--st-consent-space, 0px); }
html[data-st-consent-placement="top"] body::before { content: ""; display: block; height: var(--st-consent-space, 0px); }
@media (max-width: 640px) {
    #cc-main .cm--bar .cm__btn-group { flex-direction: row !important; gap: .4rem; }
    #cc-main .cm--bar .cm__btn-group .cm__btn { flex: 1; margin: 0 !important; }
    #cc-main .cm__btns { padding: .75rem 1rem; gap: .4rem; }
    #cc-main .cm__btn--secondary { min-height: 34px; padding: .35rem; }
}

/* Consent cards belong to the content area and remain readable across site themes. */
.st-consent-placeholder { box-sizing: border-box; padding: clamp(1.25rem, 4vw, 2.5rem); text-align: center; border-radius: 12px; background: linear-gradient(135deg, #f4f7fa, #edf2f6); font: 15px/1.6 system-ui, sans-serif; }
.st-consent-placeholder-icon { display: block; width: 44px; height: 44px; margin: 0 auto .75rem; border-radius: 50%; background: #dce6ee; color: #233c50; font-size: 28px; line-height: 44px; }
.st-consent-placeholder-title { display: block; color: #202c38; font-size: 1.15rem; line-height: 1.4; }
.st-consent-placeholder p { max-width: 44rem; margin: .5rem auto; color: #425466 !important; font: inherit; }
.st-consent-placeholder small { display: block; max-width: 40rem; margin: .75rem auto 0; color: #425466; font-size: .8rem; }
.st-consent-placeholder-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1rem; }
.st-consent-placeholder .st-consent-enable { min-height: 44px; max-width: 100%; padding: .65rem 1rem; border: 1px solid #233c50; border-radius: 6px; background: #233c50; color: #fff; font: inherit; font-weight: 600; text-decoration: none; white-space: normal; }
.st-consent-placeholder .st-consent-enable:hover { background: #172c3c; }
.st-consent-placeholder .st-consent-link { color: #233c50; min-height: 44px; }

/* Resolve palette roles using the site's existing theme/custom palette classes. */
#cc-main {
    --cc-bg: var(--st-consent-light, #f4f6f8);
    --cc-primary-color: var(--st-consent-text, #202c38);
    --cc-secondary-color: var(--st-consent-text, #425466);
    --cc-btn-primary-bg: var(--st-consent-pop, #233c50);
    --cc-btn-primary-color: var(--st-consent-pop-text, #fff);
    --cc-btn-primary-border-color: var(--st-consent-pop, #233c50);
    --cc-btn-primary-hover-bg: var(--st-consent-pop, #233c50);
    --cc-btn-primary-hover-border-color: var(--st-consent-pop, #233c50);
    --cc-btn-primary-hover-color: var(--st-consent-pop-text, #fff);
    --cc-toggle-on-bg: var(--st-consent-pop, #233c50);
    --cc-footer-bg: var(--st-consent-light, #f4f6f8);
    --cc-footer-color: var(--st-consent-text, #425466);
    --cc-btn-border-radius: 2px;
    --cc-modal-border-radius: 4px;
    --cc-cookie-category-block-bg: var(--st-consent-light, #f4f6f8);
    --cc-cookie-category-block-hover-bg: var(--st-consent-light, #f4f6f8);
    --cc-cookie-category-expanded-block-hover-bg: var(--st-consent-light, #f4f6f8);
}
#cc-main .cm__btn, #cc-main .pm__btn { font-size: .775rem; border-radius: 2px; }
#cc-main button[data-role="necessary"] { background: #363636; border-color: #363636; color: #fff; }
#cc-main button[data-role="necessary"]:hover { background: #262626; border-color: #262626; color: #fff; }

/* Embedded-feature cards use the same resolved palette as the consent dialogs. */
.st-consent-placeholder {
    border-radius: 0;
    background: var(--st-consent-light, #f4f6f8);
    color: var(--st-consent-text, #202c38);
}
/* Deliberate class repetition outranks Sterling's important inversion rules,
 * including .template-background-color-primary.invert-text-color .item-body p
 * (0,3,1), even when theme CSS loads later. Keep this scoped to consent cards. */
:root .st-consent-placeholder.st-consent-placeholder.st-consent-placeholder .st-consent-placeholder-title,
:root .st-consent-placeholder.st-consent-placeholder.st-consent-placeholder p,
:root .st-consent-placeholder.st-consent-placeholder.st-consent-placeholder small,
:root .st-consent-placeholder.st-consent-placeholder.st-consent-placeholder .st-consent-link {
    color: var(--st-consent-text, #202c38) !important;
}
.st-consent-placeholder .st-consent-enable {
    background: var(--st-consent-pop, #233c50);
    border-color: var(--st-consent-pop, #233c50);
    color: var(--st-consent-pop-text, #fff);
    border-radius: 2px;
    font-size: .775rem;
}
.st-consent-placeholder .st-consent-enable:hover {
    background: var(--st-consent-pop, #233c50);
    filter: brightness(.9);
}
.st-consent-placeholder-icon { background: transparent; color: var(--st-consent-text, #202c38); }

/* Keep the policy in the title row without adding a separate notice footer. */
#cc-main .st-consent-heading { display: flex; align-items: baseline; gap: .75rem; padding: 0 1.3rem; }
#cc-main .st-consent-heading .cm__title { flex: 1; min-width: 0; margin: 0; padding: 0 !important; }
#cc-main .st-consent-heading a { flex: 0 1 auto; color: var(--cc-secondary-color); font-size: .75rem; font-weight: 400; opacity: .75; }
#cc-main .st-consent-heading a:hover, #cc-main .st-consent-heading a:focus-visible { opacity: 1; }
#cc-main .st-consent-heading + .cm__desc { margin-top: 1.1em; }
@media (max-width: 640px) {
    #cc-main .st-consent-heading { padding-inline: 1.1rem; }
}
