/*!
 * airi-lesson-overrides.css
 *
 * Cross-lesson rendering overrides for AIRE / AIRP / AIRL.
 * Scoped to LifterLMS lesson + course pages via plugin/src/Core/Plugin.php
 * enqueue gate (is_lifterlms_page() === true).
 *
 * task-20260515-001 Stream E: infobox white-background contrast fix.
 * task-20260515-001 Stream A: defensive CSS hide for the native LLMS quiz
 * button — primary suppression is via the `llms_show_take_quiz_button` PHP
 * filter (QuizButtonSuppressor); this CSS rule is a belt-and-braces fallback
 * for the rare case where the filter is bypassed (e.g., theme override that
 * re-emits the button outside the LLMS template).
 */

/* ───────────────────────────────────────────────────────────────────────
 * Stream E — Kadence infobox white background (override the cream brand
 * colour #FAF8F5 that collides with the page background).
 *
 * Three selectors layered to win against Kadence's per-block inline-style
 * specificity. !important is justified here: the Kadence inline style is
 * itself the inline-style layer (top of the cascade); only !important on
 * a stylesheet selector can override an inline declaration.
 * ─────────────────────────────────────────────────────────────────────── */
.wp-block-kadence-infobox,
.wp-block-kadence-infobox .kt-blocks-info-box-link-wrap,
.wp-block-kadence-infobox > div {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
}

/* Visible boundary against the page so the now-white infobox doesn't look
 * floating-blank on the also-cream page background. Subtle 1px border in
 * the brand-red palette + soft shadow. Matches `feedback_button_style_canon`
 * brand expectations. */
.wp-block-kadence-infobox {
    border: 1px solid rgba(184, 40, 46, 0.12) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    border-radius: 8px;
}

/* ───────────────────────────────────────────────────────────────────────
 * Stream A — Defensive hide for native LLMS quiz button.
 * Primary suppression is via PHP filter (QuizButtonSuppressor); this is a
 * safety net for theme overrides that re-emit the button outside the
 * filtered template path.
 *
 * Scoped to AIRI track via body classes set by the theme/LLMS course-track
 * taxonomy (`course-track-aire`, `course-track-airp`, `course-track-airl`).
 * If those classes aren't present, this rule is a no-op.
 * ─────────────────────────────────────────────────────────────────────── */
body.course-track-aire #llms_start_quiz,
body.course-track-airp #llms_start_quiz,
body.course-track-airl #llms_start_quiz,
body.course-track-aire .llms-lesson-button-wrapper a.llms-button-action[href*="/quiz/"],
body.course-track-airp .llms-lesson-button-wrapper a.llms-button-action[href*="/quiz/"],
body.course-track-airl .llms-lesson-button-wrapper a.llms-button-action[href*="/quiz/"] {
    display: none !important;
}
