/* Qareon — retheme Tutor LMS to the site's palette & font.
   Tutor 4.x uses two token systems:
   (1) legacy `--tutor-color-primary` (older components / course archive), and
   (2) a `--tutor-brand-*` scale (newer components: course player / learning area),
       which Tutor leaves UNDEFINED and falls back to blue via var(..., #3e64de).
   We override both so everything (player included) renders in the site teal. */

:root {
  /* Legacy primary */
  --tutor-color-primary: #05a88d !important;
  --tutor-color-primary-rgb: 5, 168, 141 !important;
  --tutor-color-primary-hover: #037f6a !important;
  --tutor-color-primary-hover-rgb: 3, 127, 106 !important;

  /* New brand scale (teal). Defining these makes every var(--tutor-brand-NNN)
     derived token — surface/text/icon/border/button-brand — resolve to teal. */
  --tutor-brand-50:  #f0faf7 !important;
  --tutor-brand-100: #e6f6f3 !important;
  --tutor-brand-200: #d3f0e8 !important;
  --tutor-brand-300: #bfe9de !important;
  --tutor-brand-400: #73cdba !important;
  --tutor-brand-500: #14b89b !important;
  --tutor-brand-600: #05a88d !important;
  --tutor-brand-700: #037f6a !important;
  --tutor-brand-800: #026353 !important;
  --tutor-brand-900: #024a3f !important;
  --tutor-brand-950: #01352d !important;
}

/* Font to match the site */
.tutor-wrap,
.tutor-course-list,
.tutor-dashboard,
.tutor-course-single,
[class^="tutor-"],
[class*=" tutor-"] {
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* Buttons + inputs rounded like the rest of the site */
.tutor-btn { border-radius: 10px; font-weight: 600; }
.tutor-form-control,
.tutor-form-select { border-radius: 10px; }

/* Course cards */
.tutor-course-card,
.tutor-card { border-radius: 14px; overflow: hidden; }
.tutor-course-card { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, 0.15); border: 1px solid rgba(15, 23, 42, 0.06); }

/* Progress bars/meters: Tutor fills these with a hardcoded color (not a token),
   so the brand-scale override above doesn't reach them. Force site teal. */
.tutor-progress-bar-fill { background-color: #01a98d !important; }
.tutor-progress-circle .tutor-progress-value { color: #01a98d !important; }

/* "Completed" indicator: Tutor's completed-colorize.svg is inline in the DOM with
   a hardcoded green circle (#0BB01B) + dark-green backing check (#007E0C).
   Recolour it to the Qareon green (used in the lesson footer & course-content list). */
circle[fill="#0BB01B" i] { fill: #01a98d; }
path[stroke="#007E0C" i] { stroke: #017a66; }

/* Lesson learning-area footer: Previous / Next ghost nav buttons -> brand green. */
.tutor-learning-area-footer .tutor-btn.tutor-btn-ghost { color: #037f6a; }
.tutor-learning-area-footer .tutor-btn.tutor-btn-ghost:hover { color: #01a98d; background: #e6f6f3; }

/* Course-player top header: green bar with white text/icons */
.tutor-learning-header {
  background: var(--qa-green, #05a88d) !important;
  border-bottom: 0 !important;
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0;
  z-index: 100;
}
/* Offset for the WordPress admin bar when logged in. */
.admin-bar .tutor-learning-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .tutor-learning-header { top: 46px; } }
/* Dark badge box (left) holding the white Qareon icon */
.tutor-learning-header::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 72px; z-index: 1;
  background: #1e3c44;
}
.tutor-learning-header::after {
  content: ''; position: absolute; left: 19px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 40px; z-index: 2; background-color: #fff;
  -webkit-mask: url('../images/favicon.png') center / contain no-repeat;
          mask: url('../images/favicon.png') center / contain no-repeat;
}
.tutor-learning-header .tutor-learning-header-inner { padding-left: 90px !important; position: relative; z-index: 3; }
/* Keep inner elements transparent so the green band shows through and the
   white text/arrow are readable. */
.tutor-learning-header .tutor-learning-header-inner,
.tutor-learning-header .tutor-learning-header-content,
.tutor-learning-header .tutor-learning-header-back,
.tutor-learning-header .tutor-learning-header-toggle-mobile {
  background: transparent !important;
  border: 0 !important;
}
.tutor-learning-header,
.tutor-learning-header a,
.tutor-learning-header .tutor-learning-header-title,
.tutor-learning-header .tutor-learning-header-back,
.tutor-learning-header i,
.tutor-learning-header span { color: #fff !important; }
.tutor-learning-header svg { color: #fff !important; }
.tutor-learning-header svg [stroke]:not([stroke="none"]) { stroke: #fff !important; }
.tutor-learning-header svg [fill]:not([fill="none"]) { fill: #fff !important; }
/* Back button: centered white arrow, subtle (non-white) hover */
.tutor-learning-header .tutor-learning-header-back .tutor-btn {
  background: transparent !important; color: #fff !important; border: 0 !important;
  width: 40px; height: 40px; padding: 0 !important; border-radius: 8px;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
.tutor-learning-header .tutor-learning-header-back .tutor-btn:hover,
.tutor-learning-header .tutor-learning-header-back .tutor-btn:focus {
  background: rgba(255, 255, 255, 0.16) !important; color: #fff !important;
}
.tutor-learning-header .tutor-learning-header-back svg,
.tutor-learning-header .tutor-learning-header-back svg [stroke]:not([stroke="none"]) { stroke: #fff !important; }

/* ============================================================
   Rich lesson content (allergen course & any Tutor lesson)
   ============================================================ */
.qa-lead { font-size: 1.12rem; line-height: 1.6; color: #334155; font-weight: 500; }
.qa-callout { border: none; border-radius: 14px; padding: 16px 20px; margin: 20px 0; background: #f1f5f9; font-size: 0.97rem; line-height: 1.55; }
.qa-callout ul, .qa-callout ol { margin: 8px 0 0 1.1rem; }
.qa-callout--info { background: #f3f9fe; border-color: #dcecfa; }
.qa-callout--warn { background: #fff8ef; border-color: #f9e6cd; }
.qa-callout--tip  { background: #f0faf7; border-color: #d2ede6; }
.qa-source { margin-top: 16px; padding-top: 10px; border-top: 1px dashed #dbe2ea; font-size: 0.85rem; color: #64748b; }
.qa-source-list { margin: 8px 0 0 1.1rem; font-size: 0.9rem; color: #475569; }
.qa-source-list li { margin-bottom: 5px; }

.qa-table-wrap { overflow-x: auto; margin: 18px 0; }
.qa-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.qa-table th, .qa-table td { border: 1px solid #e2e8f0; padding: 10px 12px; text-align: left; vertical-align: top; }
.qa-table thead th { background: #05a88d; color: #fff; font-weight: 700; border-color: #05a88d; }
.qa-table tbody tr:nth-child(even) { background: #f8fafc; }
.qa-table--matrix td { text-align: center; }
.qa-table--matrix td:first-child, .qa-table--matrix td:last-child { text-align: left; }

.qa-check { list-style: none; margin: 12px 0; padding: 0; }
.qa-check li { position: relative; padding-left: 30px; margin-bottom: 10px; line-height: 1.5; }
.qa-check li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; background: #05a88d; color: #fff; border-radius: 50%; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.qa-paths, .qa-steps { margin: 12px 0 12px 1.2rem; }
.qa-paths li, .qa-steps li { margin-bottom: 8px; line-height: 1.5; }
.qa-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 18px 0; }
.qa-grid2 > div { background: #f1f5f9; border-radius: 12px; padding: 14px 16px; }
.qa-grid2 h4 { margin: 0 0 8px; font-size: 1rem; color: #037f6a; }
.qa-grid2 ul { margin: 0 0 0 1.05rem; font-size: 0.92rem; }

.qa-cert-cta { margin: 16px 0 4px; }
.qa-cert-cta .tutor-btn { display: inline-flex; align-items: center; }

/* Breathing room above (below the sticky nav) and below (before the footer)
   the single-course content. */
.single-courses .tutor-course-details-page { padding-top: 44px; padding-bottom: 72px; }

/* Course language badge (shown on English courses) — matches the site's teal pill badges */
.qa-lang-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; background: #e6f6f3; color: #037f6a; line-height: 1.5; }
.qa-lang-badge-row { margin: 0 0 20px; }
.qa-lang-badge-row--card { margin: 10px 0 10px; }

/* ===========================================================================
   Live lesson charts — responsive HTML, Font Awesome icons, scroll reveal.
   Borderless by design (flat filled cards, no side borders / accent stripes).
   =========================================================================== */
.qa-chart { margin: 24px 0 6px; }
.qa-chart.reveal { opacity: 1; transform: none; } /* container always visible; children animate */
.qa-chart-cap { font-size: 13px; color: #64748b; text-align: center; margin: 12px 0 26px; }

/* Staggered reveal: JS adds .qa-anim (marks motion enabled). Without JS the
   items simply stay visible, so content never disappears. */
.qa-chart.qa-anim .qa-node,
.qa-chart.qa-anim .qa-step,
.qa-chart.qa-anim .qa-rung,
.qa-chart.qa-anim .qa-chart-banner { opacity: 0; transform: translateY(14px); }
.qa-chart.qa-anim.is-visible .qa-node,
.qa-chart.qa-anim.is-visible .qa-step,
.qa-chart.qa-anim.is-visible .qa-rung,
.qa-chart.qa-anim.is-visible .qa-chart-banner {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--i, 0) * 80ms);
}
@media (prefers-reduced-motion: reduce) {
  .qa-chart.qa-anim .qa-node, .qa-chart.qa-anim .qa-step,
  .qa-chart.qa-anim .qa-rung, .qa-chart.qa-anim .qa-chart-banner {
    opacity: 1; transform: none; transition: none;
  }
}

/* Shared conclusion banner */
.qa-chart-banner { display: flex; flex-direction: column; gap: 4px; background: #037f6a; color: #fff;
  border-radius: 14px; padding: 16px 22px; text-align: center; margin-top: 18px;
  box-shadow: 0 10px 24px -14px rgba(3, 127, 106, .7); }
.qa-chart-banner strong { font-size: 1.05rem; }
.qa-chart-banner span { font-size: .86rem; opacity: .92; }
.qa-chart-banner i { margin-right: 8px; }

/* Cross-contact — responsive icon grid */
.qa-chart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .qa-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qa-node { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 7px;
  background: #f1f5f9; border-radius: 14px; padding: 18px 12px; }
.qa-node-ic { width: 48px; height: 48px; border-radius: 13px; background: #e6f6f3; color: #037f6a;
  display: flex; align-items: center; justify-content: center; font-size: 21px; }
.qa-node strong { font-size: .92rem; color: #12303a; line-height: 1.2; }
.qa-node em { font-style: normal; font-size: .78rem; color: #64748b; }

/* Control plan — responsive step flow */
.qa-flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.qa-flow p { display: contents; } /* wpautop wraps the chevron separators in <p>; unwrap them into the flex row */
.qa-step { flex: 1 1 128px; background: #f1f5f9; border-radius: 14px; padding: 16px 12px 18px;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.qa-step-num { width: 40px; height: 40px; border-radius: 50%; background: #037f6a; color: #fff;
  font-weight: 800; font-size: 1rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(3, 127, 106, .3); }
.qa-step strong { font-size: .93rem; color: #12303a; line-height: 1.25; }
.qa-step strong i { color: #037f6a; margin-right: 5px; }
.qa-step em { font-style: normal; font-size: .78rem; color: #64748b; }
.qa-flow-sep { align-self: center; color: #05a88d; font-size: 18px; flex: 0 0 auto; }
@media (max-width: 640px) { .qa-flow { flex-direction: column; } .qa-flow-sep { transform: rotate(90deg); } }

/* Precautionary labelling — responsive decision ladder */
.qa-ladder { display: flex; flex-direction: column; gap: 12px; }
.qa-rung { display: flex; align-items: stretch; gap: 14px; }
.qa-q { flex: 1; display: flex; align-items: center; gap: 12px; background: #f1f5f9; border-radius: 12px; padding: 13px 18px; }
.qa-q-num { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: #037f6a; color: #fff;
  font-weight: 800; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.qa-q strong { font-weight: 700; color: #12303a; }
.qa-rung-arrow { flex: 0 0 34px; display: flex; align-items: center; justify-content: center; color: #05a88d; font-size: 18px; }
.qa-a { flex: 0 0 46%; display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 13px 18px; font-weight: 600; font-size: .92rem; }
.qa-a i { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .72rem; }
.qa-a--ok { background: #e6f6f3; color: #0a5a4c; } .qa-a--ok i { background: #05a88d; }
.qa-a--warn { background: #fff4e6; color: #9a5b00; } .qa-a--warn i { background: #e39a2b; }
@media (max-width: 640px) { .qa-rung { flex-direction: column; align-items: stretch; }
  .qa-rung-arrow { transform: rotate(90deg); } .qa-a { flex-basis: auto; } }

/* Vertical process flowchart (Map the allergen flow) */
.qa-vflow { display: flex; flex-direction: column; align-items: stretch; max-width: 620px; margin: 6px auto 0; }
.qa-vflow__step { background: #f1f5f9; border-radius: 14px; padding: 15px 20px; display: flex; align-items: center; gap: 16px; }
.qa-vflow__ic { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; background: #e6f6f3; color: #037f6a;
  display: flex; align-items: center; justify-content: center; font-size: 18px; }
.qa-vflow__txt { flex: 1 1 auto; min-width: 0; }
.qa-vflow__txt strong { display: block; color: #12303a; font-size: 1rem; }
.qa-vflow__txt strong i { color: #05a88d; margin-right: 7px; }
.qa-vflow__ic strong { font-weight: 800; }
.qa-vflow__txt span { display: block; color: #64748b; font-size: 0.85rem; margin-top: 2px; }
.qa-vflow p { margin: 0; text-align: center; } /* wpautop wraps the standalone arrow in <p> */
.qa-vflow__arrow { display: block; text-align: center; color: #05a88d; font-size: 17px; padding: 7px 0; }
.qa-chart.qa-anim .qa-vflow__step { opacity: 0; transform: translateY(14px); }
.qa-chart.qa-anim.is-visible .qa-vflow__step { opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) { .qa-chart.qa-anim .qa-vflow__step { opacity: 1; transform: none; transition: none; } }

/* Quiz spotlight header: add the Qareon leaf icon at the top-left. */
.tutor-quiz-header { position: relative; padding-left: 78px; }
.tutor-quiz-header::before {
  content: ''; position: absolute; left: 24px; top: 12px; width: 46px; height: 48px; z-index: 5;
  background: url('../images/favicon.png') center / contain no-repeat; pointer-events: none;
}
@media (max-width: 640px) { .tutor-quiz-header { padding-left: 58px; } .tutor-quiz-header::before { left: 14px; width: 36px; height: 38px; } }

/* Course catalog filter bar (e-learning) — language pills + category dropdown */
.qa-course-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 26px; }
.qa-cfilter-langs { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; background: #f1f5f9; padding: 5px; border-radius: 999px; }
.qa-cfilter-btn { appearance: none; -webkit-appearance: none; border: none; background: transparent; height: 36px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; border-radius: 999px; font-weight: 700;
  font-size: 0.9rem; color: #64748b; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; }
.qa-cfilter-btn:hover { color: #037f6a; }
.qa-cfilter-btn.is-active { background: #037f6a; color: #fff; }
.qa-cfilter-select { appearance: none; -webkit-appearance: none; border: none; background-color: #f1f5f9; color: #12303a;
  font-weight: 600; font-size: 0.9rem; cursor: pointer; height: 46px; padding: 0 42px 0 20px; border-radius: 999px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23647488' stroke-width='2' stroke-linecap='round' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center; }
.qa-cfilter-search { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; background: #f1f5f9;
  border-radius: 999px; flex: 1 1 200px; min-width: 150px; max-width: 300px; }
.qa-cfilter-search i { color: #94a3b8; font-size: 0.88rem; flex: 0 0 auto; }
.qa-cfilter-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 0.9rem; color: #12303a; }
.qa-cfilter-search input::placeholder { color: #94a3b8; }
.qa-cfilter-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.qa-cfilter-empty { width: 100%; margin: 12px 0 0; padding: 52px 24px; text-align: center; background: #f8fafc; border-radius: 18px; }
.qa-cfilter-empty__ic { display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px;
  border-radius: 50%; background: #e6f6f3; color: #05a88d; font-size: 31px; margin-bottom: 18px; }
.qa-cfilter-empty h3 { margin: 0 0 8px; font-size: 1.3rem; font-weight: 700; color: #12303a; }
.qa-cfilter-empty p { margin: 0 auto; max-width: 440px; color: #64748b; font-size: 0.98rem; line-height: 1.55; }
