/* PMA Science University — Courses
   LearnPress 4.4.6 conformance layer.

   VERIFIED CONTEXT: /courses runs parent theme `enfold` with LearnPress 4.4.6
   (learnpress.min.css?ver=4.4.6 observed live on 2026-09-06), plus
   learnpress-wishlist and WooCommerce.

   STRATEGY, IN THIS ORDER OF PREFERENCE
   1 · Re-point LearnPress 4's OWN custom properties. LP4 ships a token layer
       (`--lp-primary-color`, `--lp-secondary-color`, ...) whose default is a
       retail amber. Re-pointing those tokens retires the retail palette
       everywhere LP4 uses them, including surfaces this file never names, with
       no specificity war and nothing to maintain when LP updates its markup.
   2 · Only then, named selectors — for colour, type, border and interaction.

   RULES OBSERVED THROUGHOUT
   · No `display`, `position`, `float`, `width` or `overflow` change on any
     functional LearnPress element (curriculum, item navigation, quiz controls,
     progress, checkout).
   · Nothing a student needs is hidden.
   · Every selector is anchored on `.pma-lms`, a body class added only by this
     child theme, which exists only on the /courses install.
   · No LearnPress template is overridden by this theme. */

/* ------------------------------------------------------------------
   1 · LearnPress 4's own token layer, re-pointed
   ------------------------------------------------------------------ */
body.pma-lms {
  --lp-primary-color: var(--pma-navy-900);
  --lp-secondary-color: var(--pma-gold-500);
  --lp-color-primary: var(--pma-navy-900);
  --lp-color-secondary: var(--pma-gold-500);
  --lp-color-base: var(--pma-ink);
  --lp-color-heading: var(--pma-navy-900);
  --lp-color-text: var(--pma-ink);
  --lp-color-white: var(--pma-white);
  --lp-color-grey: var(--pma-ink-muted);
  --lp-color-grey-light: var(--pma-stone-100);
  --lp-color-border: var(--pma-stone-300);
  --lp-color-success: var(--pma-success);
  --lp-color-warning: var(--pma-warning);
  --lp-color-error: var(--pma-error);
  --lp-font-family: var(--pma-sans);
  --lp-font-heading: var(--pma-serif);
  --lp-border-radius: 0;
  --lp-container-max-width: var(--container);
}

/* ------------------------------------------------------------------
   2 · LP4 content shell
   ------------------------------------------------------------------ */
body.pma-lms .lp-content-area,
body.pma-lms .lp-archive-courses,
body.pma-lms .lp-single-course,
body.pma-lms #learn-press-course,
body.pma-lms #learn-press-profile { background-color: var(--pma-ivory); }

body.pma-lms .lp-content-area { max-width: var(--container); }

/* LP4 notices */
body.pma-lms .learn-press-message,
body.pma-lms .lp-message,
body.pma-lms .learn-press-notice {
  font-family: var(--pma-sans);
  font-size: var(--fs-sm);
  border-radius: 0;
  border-left: 3px solid var(--pma-navy-600);
  background-color: var(--pma-stone-100);
  color: var(--pma-ink);
}
body.pma-lms .learn-press-message.success,
body.pma-lms .lp-message.success { border-left-color: var(--pma-success); }
body.pma-lms .learn-press-message.error,
body.pma-lms .lp-message.error { border-left-color: var(--pma-error); }
body.pma-lms .learn-press-message.warning,
body.pma-lms .lp-message.warning { border-left-color: var(--pma-warning); }

/* ------------------------------------------------------------------
   3 · Course archive — LP4 grid, toolbar, pagination
   ------------------------------------------------------------------ */
body.pma-lms .lp-courses-bar,
body.pma-lms .lp-archive-courses .lp-courses-bar {
  border-bottom: 1px solid var(--pma-stone-300);
  background: transparent;
}
body.pma-lms .lp-courses-bar__view .switch-layout,
body.pma-lms .lp-courses-bar .switch-layout { color: var(--pma-ink-muted); }
body.pma-lms .lp-courses-bar__view .switch-layout.active,
body.pma-lms .lp-courses-bar .switch-layout.active { color: var(--pma-navy-900); }

body.pma-lms .lp-course-filter,
body.pma-lms .lp-form-course-filter,
body.pma-lms .course-filter {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-stone-300);
}
body.pma-lms .lp-course-filter__title,
body.pma-lms .course-filter__title {
  font-family: var(--pma-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
}
body.pma-lms .lp-course-filter input[type="checkbox"],
body.pma-lms .lp-course-filter input[type="radio"] { accent-color: var(--pma-navy-900); }

body.pma-lms .learn-press-courses .course-item .course-thumbnail,
body.pma-lms .lp-course-thumbnail { border-radius: 0; }

body.pma-lms .course-item .course-permalink,
body.pma-lms .lp-course-title a { color: var(--pma-navy-900); }

body.pma-lms .course-excerpt,
body.pma-lms .lp-course-excerpt {
  font-family: var(--pma-sans);
  font-size: var(--fs-sm);
  color: var(--pma-ink-muted);
}

body.pma-lms .learn-press-pagination .page-numbers,
body.pma-lms .lp-pagination .page-numbers {
  font-family: var(--pma-sans);
  font-size: var(--fs-sm);
  border-radius: 0;
  border: 1px solid var(--pma-stone-300);
  color: var(--pma-ink);
  background: transparent;
}
body.pma-lms .learn-press-pagination .page-numbers.current,
body.pma-lms .lp-pagination .page-numbers.current {
  background-color: var(--pma-navy-900);
  border-color: var(--pma-navy-900);
  color: var(--pma-ivory);
}

/* ------------------------------------------------------------------
   4 · Single course — LP4 header, meta, tabs, sidebar
   ------------------------------------------------------------------ */
body.pma-lms .lp-single-course .course-summary__content,
body.pma-lms .lp-single-course .lp-entry-content { background-color: transparent; }

body.pma-lms .course-meta,
body.pma-lms .lp-course-meta,
body.pma-lms .course-meta__pull-left,
body.pma-lms .course-meta__pull-right {
  font-family: var(--pma-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
body.pma-lms .course-meta__item-title,
body.pma-lms .lp-course-meta__label { color: var(--pma-ink-muted); }

body.pma-lms .lp-course-tabs,
body.pma-lms .course-tabs {
  border-bottom: 1px solid var(--pma-stone-300);
  background: transparent;
}
body.pma-lms .lp-course-tabs .course-tab,
body.pma-lms .course-tabs .course-tab {
  font-family: var(--pma-sans);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
}
body.pma-lms .lp-course-tabs .course-tab.active,
body.pma-lms .course-tabs .course-tab.active {
  color: var(--pma-navy-900);
  border-bottom: 2px solid var(--pma-gold-500);
}

body.pma-lms .course-features,
body.pma-lms .lp-course-features,
body.pma-lms .course-extra-box {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-stone-300);
  border-radius: 0;
}
body.pma-lms .course-extra-box__title,
body.pma-lms .lp-course-features__title {
  font-family: var(--pma-serif);
  color: var(--pma-navy-900);
}

/* Instructor block — an academic credit line, not a marketing profile. */
body.pma-lms .course-author,
body.pma-lms .lp-course-author,
body.pma-lms .course-instructor-info {
  border-top: 1px solid var(--pma-stone-300);
  background: transparent;
}
body.pma-lms .course-author__name,
body.pma-lms .lp-course-author__name {
  font-family: var(--pma-serif);
  font-size: var(--fs-h3);
  color: var(--pma-navy-900);
}
body.pma-lms .course-author__description { color: var(--pma-ink-muted); }

/* Wishlist control (learnpress-wishlist) — quiet, outline, never a sales badge. */
body.pma-lms .lp-course-wishlist,
body.pma-lms .learnpress-course-wishlist button,
body.pma-lms .course-wishlist-button {
  background-color: transparent !important;
  border: 1px solid var(--pma-navy-900) !important;
  color: var(--pma-navy-900) !important;
  border-radius: 0 !important;
}

/* ------------------------------------------------------------------
   5 · Curriculum — colour, type and state only
   ------------------------------------------------------------------ */
body.pma-lms .lp-course-curriculum .section-header,
body.pma-lms .course-curriculum .section-header {
  background-color: var(--pma-stone-100);
  border-color: var(--pma-stone-300);
}
body.pma-lms .section-title,
body.pma-lms .lp-section-title {
  font-family: var(--pma-serif);
  color: var(--pma-navy-900);
}
body.pma-lms .section-desc,
body.pma-lms .section-meta { font-family: var(--pma-sans); color: var(--pma-ink-muted); font-size: var(--fs-xs); }

body.pma-lms .course-item .item-name,
body.pma-lms .lp-course-item .item-name { font-family: var(--pma-sans); color: var(--pma-ink); }
body.pma-lms .course-item .item-meta,
body.pma-lms .course-item .duration { font-size: var(--fs-xs); color: var(--pma-ink-muted); }

body.pma-lms .course-item.item-locked .item-name,
body.pma-lms .course-item.has-status-locked .item-name { color: var(--pma-ink-muted); }
body.pma-lms .course-item.has-status-completed .item-name,
body.pma-lms .course-item.status-completed .item-name { color: var(--pma-success); }
body.pma-lms .course-item.current .item-name,
body.pma-lms .course-item.item-current .item-name { color: var(--pma-navy-900); font-weight: 600; }
body.pma-lms .course-item.current { border-left: 2px solid var(--pma-gold-500); }

/* ------------------------------------------------------------------
   6 · Lesson and item navigation
   ------------------------------------------------------------------ */
body.pma-lms .lp-single-course .course-item-nav,
body.pma-lms .course-item-nav {
  border-top: 1px solid var(--pma-stone-300);
  background: transparent;
}
body.pma-lms .course-item-nav .prev a,
body.pma-lms .course-item-nav .next a {
  font-family: var(--pma-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pma-navy-800);
}
body.pma-lms .course-item-nav .prev a:hover,
body.pma-lms .course-item-nav .next a:hover { color: var(--pma-navy-900); }

body.pma-lms #course-item-content-header,
body.pma-lms .course-item-content-header {
  background-color: var(--pma-navy-900);
  color: var(--pma-ivory);
  border: 0;
}
body.pma-lms #course-item-content-header a,
body.pma-lms .course-item-content-header a { color: var(--pma-gold-300); }
body.pma-lms #course-item-content-header .course-item-search input {
  background-color: rgba(251, 248, 242, 0.08);
  border: 1px solid rgba(240, 206, 115, 0.3);
  color: var(--pma-ivory);
}

/* LP4 curriculum sidebar inside an item */
body.pma-lms .lp-single-course .lp-course-curriculum,
body.pma-lms #learn-press-course-curriculum {
  background-color: var(--pma-white);
  border-right: 1px solid var(--pma-stone-300);
}

/* ------------------------------------------------------------------
   7 · Quiz — states must stay unambiguous
   ------------------------------------------------------------------ */
body.pma-lms .lp-quiz-status-bar,
body.pma-lms .quiz-status-bar {
  background-color: var(--pma-stone-100);
  border-bottom: 1px solid var(--pma-stone-300);
  font-family: var(--pma-sans);
}
body.pma-lms .lp-quiz-countdown,
body.pma-lms .quiz-countdown {
  font-family: var(--pma-sans);
  font-variant-numeric: tabular-nums;
  color: var(--pma-navy-900);
}
body.pma-lms .lp-quiz-question,
body.pma-lms .quiz-question {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-stone-300);
  border-radius: 0;
}
body.pma-lms .question-title,
body.pma-lms .lp-question-title {
  font-family: var(--pma-serif);
  font-size: var(--fs-h3);
  color: var(--pma-navy-900);
}
body.pma-lms .answer-options .answer-option,
body.pma-lms .lp-answer-option {
  font-family: var(--pma-sans);
  border: 1px solid var(--pma-stone-300);
  border-radius: 0;
  background-color: var(--pma-white);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
body.pma-lms .answer-options .answer-option:hover { border-color: var(--pma-navy-600); }
body.pma-lms .answer-option.answer-correct,
body.pma-lms .answer-option.correct {
  border-color: var(--pma-success);
  background-color: rgba(47, 107, 79, 0.06);
}
body.pma-lms .answer-option.answered-wrong,
body.pma-lms .answer-option.wrong {
  border-color: var(--pma-error);
  background-color: rgba(140, 47, 38, 0.06);
}
body.pma-lms .quiz-result,
body.pma-lms .lp-quiz-result {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-stone-300);
}
body.pma-lms .quiz-result .result-grade.passed,
body.pma-lms .lp-quiz-result .passed { color: var(--pma-success); }
body.pma-lms .quiz-result .result-grade.failed,
body.pma-lms .lp-quiz-result .failed { color: var(--pma-error); }
body.pma-lms .quiz-result .result-achieved,
body.pma-lms .result-statistic-field { font-family: var(--pma-sans); color: var(--pma-ink); }
body.pma-lms .lp-quiz-buttons,
body.pma-lms .quiz-buttons { border-top: 1px solid var(--pma-stone-300); }

/* ------------------------------------------------------------------
   8 · Student profile and dashboard
   ------------------------------------------------------------------ */
body.pma-lms .lp-profile-nav,
body.pma-lms #learn-press-profile-nav {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-stone-300);
}
body.pma-lms .lp-profile-nav-tabs li a,
body.pma-lms .lp-profile-nav a {
  font-family: var(--pma-sans);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
}
body.pma-lms .lp-profile-nav-tabs li.active > a,
body.pma-lms .lp-profile-nav .active > a {
  color: var(--pma-navy-900);
  border-left: 2px solid var(--pma-gold-500);
}
body.pma-lms .lp-profile-content,
body.pma-lms #profile-content { background-color: transparent; }

body.pma-lms .lp-list-table,
body.pma-lms .lp-profile-content table {
  font-family: var(--pma-sans);
  font-size: var(--fs-sm);
  border-collapse: collapse;
  width: 100%;
}
body.pma-lms .lp-list-table th {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
  background-color: var(--pma-stone-100);
  border-bottom: 1px solid var(--pma-stone-300);
  text-align: left;
}
body.pma-lms .lp-list-table td {
  border-bottom: 1px solid var(--pma-stone-300);
  color: var(--pma-ink);
}
body.pma-lms .lp-list-table .course-title a { color: var(--pma-navy-900); }

/* Tables must not force a horizontal scroll on a phone.
   Measured at 375px in the QA harness: the four-column enrolment table pushed
   the document 94px wider than the viewport, so the whole page scrolled
   sideways. The previous rule required a `.lp-profile-content` ancestor and
   therefore missed any table wrapper rendered outside the profile screen.
   Scoped to the wrapper only — no LearnPress functional element (curriculum,
   item navigation, quiz controls, progress) has a layout property changed. */
body.pma-lms .lp-list-table-wrap,
body.pma-lms .lp-profile-content .lp-list-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
  body.pma-lms .lp-list-table,
  body.pma-lms .lp-profile-content table { font-size: var(--fs-xs); }
  body.pma-lms .lp-list-table th,
  body.pma-lms .lp-list-table td { white-space: nowrap; }
}

/* Certificates, where the install supports them. */
body.pma-lms .lp-certificate,
body.pma-lms .learnpress-certificate,
body.pma-lms .lp-profile-certificate {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-gold-500);
  border-radius: 0;
}

/* Order / enrolment history reads as a registry, not a receipt pile. */
body.pma-lms .lp-profile-order-status,
body.pma-lms .order-status {
  font-family: var(--pma-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
}

/* ------------------------------------------------------------------
   9 · Progress — the one place gold carries meaning
   ------------------------------------------------------------------ */
body.pma-lms .lp-course-progress .lp-progress-bar,
body.pma-lms .learn-press-progress__bar,
body.pma-lms .course-progress-bar { background-color: var(--pma-stone-300); border-radius: 0; }
body.pma-lms .lp-course-progress .lp-progress-value,
body.pma-lms .learn-press-progress__active,
body.pma-lms .course-progress-value { background-color: var(--pma-gold-500); border-radius: 0; }
body.pma-lms .lp-course-progress__heading,
body.pma-lms .learn-press-progress__label {
  font-family: var(--pma-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
}

/* ------------------------------------------------------------------
   10 · LP4 login and registration forms
   ------------------------------------------------------------------ */
body.pma-lms .lp-form-login,
body.pma-lms .lp-form-register,
body.pma-lms .learn-press-form-login,
body.pma-lms .learn-press-form-register {
  background-color: var(--pma-white);
  border: 1px solid var(--pma-stone-300);
  border-radius: 0;
  max-width: 34rem;
}
body.pma-lms .lp-form-login label,
body.pma-lms .lp-form-register label {
  font-family: var(--pma-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pma-ink-muted);
}

/* ------------------------------------------------------------------
   11 · Reduced motion
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  body.pma-lms .answer-options .answer-option,
  body.pma-lms .lp-course-progress .lp-progress-value { transition-duration: 0.001ms !important; }
}
