/* Amplify Stagez palette bridge, v1.1.0.
 * The dashboard prints settings on .adp-stagez-site; older child-theme rules
 * used unrelated hard-coded --stagez-* values. Never affect admin pages.
 */
.adp-stagez-site {
    --stagez-orange: var(--adp-stagez-accent, #ff5a1f);
    --stagez-cream: var(--adp-stagez-surface, #f5ead8);
    --adp-stagez-accent-strong: var(--adp-stagez-accent, #e67e22);
    --adp-stagez-soft: var(--adp-stagez-surface, #f6f6f6);
    background-color: var(--adp-stagez-surface, #f5ead8);
}

/* Clickable actions are controlled by Button colour / Button text colour. */
.adp-stagez-site .adp-stagez-btn,
.adp-stagez-site .adp-stagez-ticket,
.adp-stagez-site .adp-stagez-button:not(.is-outline) {
    background: var(--adp-stagez-button, #ff5a1f) !important;
    border-color: var(--adp-stagez-button, #ff5a1f);
    color: var(--adp-stagez-button-text, #ffffff) !important;
}
/* The WordPress/BuddyBoss navigation is outside .adp-stagez-site. Only on
 * Stagez pages, palette.js copies computed site settings to body. */
body.adp-stagez-palette-active .bb-header-buttons a.button.signup {
    background: var(--adp-stagez-button, #ff5a1f) !important;
    border-color: var(--adp-stagez-button, #ff5a1f) !important;
    color: var(--adp-stagez-button-text, #ffffff) !important;
}

/* BuddyBoss keeps its own orange border on the active header link. The
 * colour itself was already themed, but the underline remained #F18700. */
body.adp-stagez-palette-active .main-navigation .current-menu-item > a,
body.adp-stagez-palette-active .main-navigation .current-menu-ancestor > a,
body.adp-stagez-palette-active .main-navigation .current_page_item > a {
    border-bottom-color: var(--adp-stagez-accent, #ff5a1f) !important;
    color: var(--adp-stagez-accent, #ff5a1f) !important;
}
body.adp-stagez-palette-active .bb-mobile-panel-wrapper .mobile-menu .current-menu-item > a {
    color: var(--adp-stagez-accent, #ff5a1f) !important;
}

/* Decorative highlights use Accent colour, not Button colour. */
.adp-stagez-site .adp-stagez-pill:not(.dark) {
    background-color: var(--adp-stagez-accent, #ff5a1f);
    color: #101010;
}
body.adp-stagez-skin .adp-stagez-site .adp-stagez-talk-date,
body.adp-stagez-skin .adp-stagez-site .adp-stagez-programme .adp-stagez-section-head > span {
    color: var(--adp-stagez-accent, #ff5a1f);
}
body.adp-stagez-skin .adp-stagez-site .adp-stagez-section:not(.adp-stagez-programme) .adp-stagez-section-head > span {
    color: color-mix(in srgb, var(--adp-stagez-accent, #ff5a1f) 45%, #101010);
}
/* The page subheader should display the exact saved Accent colour; the
 * previous darkened mixture produced an unintended olive heading. */
body.adp-stagez-skin .adp-stagez-site .adp-stagez-inner h2 {
    color: var(--adp-stagez-accent, #ff5a1f);
}
.adp-stagez-site.adp-stagez-page-faq .adp-stagez-faq-item summary::after {
    color: #101010;
}

/* The separate programme-calendar plugin hard-codes #F18700. Restrict the
 * bridge to the calendar rendered inside a Stagez page. */
body.adp-stagez-palette-active .adp-stagez-site .pc-wrapper label.pc-filter-dates-badge,
body.adp-stagez-palette-active .adp-stagez-site .pc-wrapper .calender-heading {
    background-color: var(--adp-stagez-accent, #ff5a1f) !important;
    color: #101010 !important;
}
body.adp-stagez-palette-active .adp-stagez-site .pc-wrapper a.pcei-button.remove-programme {
    background-color: var(--adp-stagez-button, #ff5a1f) !important;
    border-color: var(--adp-stagez-button, #ff5a1f) !important;
    color: var(--adp-stagez-button-text, #ffffff) !important;
}

/* Only original default orange and cream blocks are mapped. Any other
 * section color chosen explicitly in the page editor remains unchanged. */
.adp-stagez-site .adp-stagez-cta[style*="background-color:#ff5a1f"] {
    background-color: var(--adp-stagez-accent, #ff5a1f) !important;
    color: #101010 !important;
}
.adp-stagez-site .adp-stagez-inner[style*="background-color:#fff8ec"] {
    background-color: var(--adp-stagez-surface, #fff8ec) !important;
}
.adp-stagez-site.adp-stagez-page-faq .adp-stagez-faq[style*="background-color:#ffffff"] {
    background-color: var(--adp-stagez-surface, #fff8ec) !important;
}

/* Stronger legacy registration/login rules previously forced black/orange. */
body.adp-stagez-skin .adp-stagez-site .adp-stagez-inner-body .adp-registration-form button[type="submit"],
body.adp-stagez-skin .adp-stagez-site .adp-stagez-inner-body .adp-registration-form input[type="submit"],
body.adp-stagez-skin .adp-stagez-page-login #adp-stagez-login-form input[type="submit"] {
    background: var(--adp-stagez-button, #ff5a1f) !important;
    color: var(--adp-stagez-button-text, #ffffff) !important;
}
body.adp-stagez-skin .adp-stagez-page-login .adp-stagez-login-card-kicker {
    color: color-mix(in srgb, var(--adp-stagez-accent, #ff5a1f) 45%, #101010);
}
