/*
 * MEPSO Child — LearnDash styling, modern training platform.
 * Loaded only when SFWD_LMS is active. Uses tokens from mepso.css.
 * Aesthetic: near-white surfaces, 1px borders, flat fills, near-
 * black buttons, minimal colour use.
 */

/* ===================================================================
 * 1. LearnDash login modal
 * =================================================================== */
.learndash-wrapper .ld-modal__content,
.ld-login-modal__content {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  background: var(--surface-0);
}
.learndash-wrapper .ld-login-modal-branding {
  background: var(--surface-0);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  text-align: center;
}
.learndash-wrapper .ld-login-modal-branding::after {
  content: none;
}
.ld-login-modal__logo img,
.learndash-wrapper .ld-login-modal-branding img {
  max-height: 40px;
  width: auto;
  margin: 0 auto;
  filter: none;
}
.learndash-wrapper .ld-modal-heading {
  color: var(--text) !important;
  font-weight: 600 !important;
  font-size: var(--fs-xl) !important;
  margin-top: var(--sp-2) !important;
}

/* ===================================================================
 * 2. LD Course Grid — tile, button, progress, badge
 * =================================================================== */
.ld_course_grid {
  background: var(--surface-0) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  overflow: hidden;
  box-shadow: none;
  position: relative;
  transition: border-color 220ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1),
              box-shadow 260ms ease;
  padding: 0 !important;
  isolation: isolate;
}
/* Animated gradient border ring — appears on hover. Layered as a
 * masked ::after so it sits around the tile without changing its
 * border-box. */
.ld_course_grid::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--r-md);
  padding: 1.5px;
  background: var(--g-brand);
  background-size: 220% 100%;
  background-position: 0% 50%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 260ms ease, background-position 600ms ease;
  pointer-events: none;
  z-index: 3;
}
.ld_course_grid:hover {
  border-color: transparent !important;
  background: var(--surface-0) !important;
  transform: translateY(-6px);
  box-shadow:
    0 3px 6px rgba(27, 54, 93, 0.08),
    0 18px 36px rgba(27, 54, 93, 0.14);
}
.ld_course_grid:hover::after {
  opacity: 1;
  background-position: 100% 50%;
}
/* Brand accent strip at the top */
.ld_course_grid::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--g-accent-strip);
  background-size: 220% 100%;
  background-position: 0% 50%;
  z-index: 2;
  transition: background-position 600ms ease;
}
.ld_course_grid:hover::before {
  background-position: 100% 50%;
}

/* Featured image */
.ld_course_grid img.wp-post-image,
.ld_course_grid .ld_course_grid_thumbnail img,
.ld_course_grid .course_grid_image_wrapper img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  /* Modern product-card image treatment: slight desaturation at
   * rest, bold and crisp on hover. Makes imagery feel intentional. */
  filter: saturate(0.92);
  transition: transform 450ms cubic-bezier(.22, 1, .36, 1),
              filter 320ms ease;
}
.ld_course_grid:hover img.wp-post-image,
.ld_course_grid:hover .ld_course_grid_thumbnail img {
  transform: scale(1.06);
  filter: saturate(1.12) contrast(1.04);
}

/* Title — larger, tighter, Notion-style */
.ld_course_grid h2,
.ld_course_grid .entry-title,
.ld_course_grid .ld_course_grid_price_title,
.ld_course_grid h3 {
  font-size: var(--fs-lg) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  letter-spacing: 0;
  line-height: 1.35 !important;
  margin: var(--sp-5) var(--sp-5) var(--sp-2) !important;
  padding: 0 !important;
}

.ld_course_grid .ld_course_grid_content,
.ld_course_grid .ld_course_grid_short_description {
  color: var(--text-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-4);
}

/* Enrolled badge — clear green status pill */
.ld_course_grid .ribbon,
.ld_course_grid .enrolled,
.ld_course_grid .ld_course_grid_enrolled,
.ld_course_grid .course_grid_price[class*="enrolled"] {
  position: absolute;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  z-index: 4;
  padding: 4px 11px !important;
  font-size: var(--fs-xs) !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
  color: #fff !important;
  background: linear-gradient(135deg, #0F7B6C 0%, #10A37F 100%) !important;
  border-radius: 999px !important;
  box-shadow:
    0 2px 6px rgba(15, 123, 108, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.9) inset !important;
  border: none !important;
  line-height: 1.5 !important;
}
.ld_course_grid .ld_course_grid_enrolled::before,
.ld_course_grid .ribbon::before,
.ld_course_grid .enrolled::before {
  content: "✓ ";
  color: #fff;
  font-weight: 900;
  margin-right: 2px;
}

/* Course CTA button — polished brand primary */
.ld_course_grid .ld_course_grid_button,
.ld_course_grid_button {
  padding: 0 var(--sp-5) var(--sp-5) !important;
}
.ld_course_grid .btn.btn-primary,
.ld_course_grid_button .btn,
.ld_course_grid_button a.btn,
.learndash-wrapper .ld_course_grid_button .btn-primary {
  display: block !important;
  width: 100% !important;
  padding: 12px 18px !important;
  background: var(--g-brand) !important;
  background-size: 220% 100% !important;
  background-position: 0% 50% !important;
  border: 0 !important;
  color: var(--n-0) !important;
  border-radius: var(--r-md) !important;
  font-weight: 600 !important;
  font-size: var(--fs-sm) !important;
  letter-spacing: 0;
  text-transform: none !important;
  box-shadow:
    0 1px 2px rgba(27, 54, 93, 0.18),
    0 8px 18px rgba(27, 54, 93, 0.18) !important;
  transition: background-position 380ms ease, box-shadow 200ms ease, transform 120ms ease !important;
}
.ld_course_grid .btn.btn-primary:hover,
.ld_course_grid_button .btn:hover {
  background-position: 100% 50% !important;
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(27, 54, 93, 0.2),
    0 12px 24px rgba(27, 54, 93, 0.22) !important;
}

/* Progress bar — single near-black fill on tint track */
.ld_course_grid .course_progressbar,
.ld_course_grid .course_progress_blue,
.ld_course_grid .ld_course_grid_progress,
.ld_course_grid .learndash_course_grid_progress {
  padding: 0 var(--sp-5) var(--sp-4) !important;
  margin: 0 !important;
}
.ld_course_grid .course_progressbar_blue,
.ld_course_grid .course_progress_blue_bar,
.ld_course_grid .ld_course_grid_progress_bar,
.ld_course_grid .progress,
.ld_course_grid [class*="progress_bar"]:not([class*="percent"]) {
  background: var(--surface-tint) !important;
  border-radius: 999px !important;
  overflow: hidden;
  height: 4px !important;
  box-shadow: none !important;
  border: none !important;
  margin-top: 4px;
}
.ld_course_grid [class*="progress_bar_percentage"],
.ld_course_grid .course_progress_blue_bar > span,
.ld_course_grid .learndash_course_grid_progress_bar_percentage,
.ld_course_grid .progress-bar {
  background: var(--g-accent-strip) !important;
  border-radius: 999px !important;
  height: 100% !important;
  box-shadow: 0 0 8px rgba(0, 163, 255, 0.35) !important;
  transition: width 400ms cubic-bezier(.22, 1, .36, 1);
}

.ld_course_grid .course_progressbar_container,
.ld_course_grid .course_progress_blue_container,
.ld_course_grid .ld_course_grid_progress_percentage,
.ld_course_grid [class*="progress"] strong,
.ld_course_grid [class*="progress"] .progress-percentage {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: var(--fs-xs) !important;
  letter-spacing: 0;
  text-transform: none !important;
  font-variant-numeric: tabular-nums;
}

/* Category selector above the grid */
.learndash-course-grid-filter select,
#learndash_course_grid_filter,
[id*="course_category"] {
  font-family: var(--mepso-font-sans);
  font-size: var(--fs-sm);
  padding: 6px 28px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10' fill='none' stroke='%23373530' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2 4 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none;
  appearance: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color 80ms ease, box-shadow 80ms ease;
}
.learndash-course-grid-filter select:hover {
  border-color: var(--border-strong);
}
.learndash-course-grid-filter select:focus {
  border-color: var(--accent-blue);
  box-shadow: var(--focus);
  outline: none;
}
.learndash-course-grid-filter label {
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0;
  margin-right: var(--sp-2);
}

/* ===================================================================
 * 3. Course status card — flat white, 1px border, not a gradient
 * =================================================================== */
.learndash-wrapper .ld-course-status,
.learndash-wrapper .ld-course-status-not-enrolled,
.learndash-wrapper .ld-course-status-enrolled {
  background: var(--surface-0) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  padding: var(--sp-5) !important;
  box-shadow: none;
  position: relative;
}
.learndash-wrapper .ld-course-status::before {
  content: none;
}
.learndash-wrapper .ld-course-status-label,
.learndash-wrapper .ld-course-status-segment-label,
.learndash-wrapper .ld-course-status-segment-heading {
  color: var(--text-muted) !important;
  font-size: var(--fs-xs) !important;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  /* Cyrillic labels like "Моментален Статус" must not break mid-word.
   * keep-all = only break on whitespace; break-word = wrap to next
   * line if the whole word doesn't fit. Together they prevent the
   * "Моментале / н Статус" hyphenation reported by tester 2026-05-12. */
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
  white-space: normal !important;
}
.learndash-wrapper .ld-course-status-content,
.learndash-wrapper .ld-course-status-segment-content,
.learndash-wrapper .ld-course-status-price,
.learndash-wrapper .ld-status-waiting,
.learndash-wrapper .ld-status {
  color: var(--text) !important;
  font-size: var(--fs-md) !important;
  font-weight: 500 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}
.learndash-wrapper .ld-course-status-segment {
  border-color: var(--border) !important;
  /* Each segment should claim its own row on narrow viewports so the
   * long Macedonian description ("Немате привилегија за посета на
   * оваа обука") doesn't compress into a 1-word-per-line column. */
  min-width: 0 !important;
  flex: 1 1 220px !important;
  padding: var(--sp-3) var(--sp-4) !important;
}
.learndash-wrapper .ld-course-status-content {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: var(--sp-3) !important;
}
@media (max-width: 640px) {
  .learndash-wrapper .ld-course-status-content {
    flex-direction: column !important;
  }
  .learndash-wrapper .ld-course-status-segment {
    width: 100% !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .learndash-wrapper .ld-course-status-segment:last-child {
    border-bottom: 0 !important;
  }
}

/* Action buttons — polished MEPSO primary */
.learndash-wrapper .ld-course-status-action .ld-button,
.learndash-wrapper .ld-course-status .ld-button,
.learndash-wrapper .ld-button {
  background: var(--g-brand) !important;
  color: var(--n-0) !important;
  border: 0 !important;
  box-shadow:
    0 1px 2px rgba(27, 54, 93, 0.18),
    0 4px 12px rgba(0, 102, 179, 0.2) !important;
  font-weight: 600 !important;
  font-size: var(--fs-sm) !important;
  padding: 11px 18px !important;
  border-radius: var(--r-md) !important;
  letter-spacing: 0;
  transition: box-shadow 160ms ease, transform 120ms ease, background 160ms ease !important;
}
.learndash-wrapper .ld-button:hover,
.learndash-wrapper .ld-course-status-action .ld-button:hover {
  background: var(--g-brand-h) !important;
  transform: translateY(-1px) !important;
  box-shadow:
    0 2px 4px rgba(27, 54, 93, 0.22),
    0 10px 22px rgba(0, 102, 179, 0.3) !important;
}
.learndash-wrapper .ld-button.ld-button-alternate,
.learndash-wrapper .ld-button.learndash-completed {
  background: var(--surface-0) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
}

/* ===================================================================
 * 4. Tabs — underline on active, no gradient
 * =================================================================== */
.learndash-wrapper .ld-tabs-navigation {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
.learndash-wrapper .ld-tabs-navigation .ld-tab {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: var(--fs-sm) !important;
  padding: var(--sp-3) var(--sp-5) !important;
  border-radius: 0 !important;
  background: transparent !important;
  transition: color 80ms ease;
  position: relative;
}
.learndash-wrapper .ld-tabs-navigation .ld-tab:hover {
  background: transparent !important;
  color: var(--text) !important;
}
.learndash-wrapper .ld-tabs-navigation .ld-tab.ld-active {
  color: var(--text) !important;
  background: transparent !important;
  font-weight: 600 !important;
}
.learndash-wrapper .ld-tabs-navigation .ld-tab.ld-active::after {
  content: "";
  position: absolute;
  left: var(--sp-5);
  right: var(--sp-5);
  bottom: -1px;
  height: 2px;
  background: var(--g-accent-strip);
  border-radius: 2px;
}
.learndash-wrapper .ld-tabs-content {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: var(--sp-6) 0 !important;
}

/* ===================================================================
 * 5. Quiz — correct / incorrect cues (subtle, not gradients)
 * =================================================================== */
.learndash-wrapper .wpProQuiz_content,
.learndash-wrapper .wpProQuiz_question,
.learndash-wrapper .wpProQuiz_question_text {
  color: var(--text) !important;
  font-family: var(--mepso-font-sans);
}

.learndash-wrapper .wpProQuiz_listItem,
.learndash-wrapper .wpProQuiz_questionList {
  margin: 0 0 var(--sp-6) !important;
  padding: 0 !important;
}

.learndash-wrapper .wpProQuiz_questionList {
  display: grid;
  gap: var(--sp-3);
  list-style: none !important;
}

.learndash-wrapper .wpProQuiz_questionList li,
.learndash-wrapper .wpProQuiz_questionListItem {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0 !important;
  padding: 13px 15px !important;
  background: var(--surface-0) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--r-md) !important;
  color: var(--text) !important;
  line-height: 1.45;
}

.learndash-wrapper .wpProQuiz_questionList label {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  margin: 0 !important;
  color: var(--text) !important;
  font-weight: 600;
  cursor: pointer;
}

.learndash-wrapper .wpProQuiz_questionList input[type="radio"],
.learndash-wrapper .wpProQuiz_questionList input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0 !important;
}

.learndash-wrapper .wpProQuiz_questionList li.is-selected,
.learndash-wrapper .wpProQuiz_questionList li:has(input:checked) {
  border-color: var(--accent-blue) !important;
  background: rgba(11, 110, 153, 0.06);
}

.learndash-wrapper .wpProQuiz_correct,
.learndash-wrapper .wpProQuiz_correctAnswer {
  border-left: 3px solid var(--accent-green) !important;
  background: rgba(15, 123, 108, 0.06) !important;
  border-radius: var(--r-sm);
}
.learndash-wrapper .wpProQuiz_incorrect {
  border-left: 3px solid var(--accent-red) !important;
  background: rgba(224, 62, 62, 0.05) !important;
  border-radius: var(--r-sm);
}
.learndash-wrapper .wpProQuiz_results h4 {
  color: var(--text);
  letter-spacing: 0;
}

/* ===================================================================
 * 6. Alerts — left-rule + tinted background
 * =================================================================== */
.learndash-wrapper .ld-alert {
  /* Flex so LD's own icon (rendered before the text) doesn't
   * overlap the first letter. Gap provides consistent spacing
   * across LD30's icon variants. */
  display: flex !important;
  align-items: center !important;
  gap: var(--sp-3) !important;
  border-radius: var(--r-md) !important;
  padding: var(--sp-3) var(--sp-5) !important;
  border: 1px solid var(--border) !important;
  border-left: 3px solid var(--accent-blue) !important;
  background: var(--surface-1) !important;
  color: var(--text) !important;
  font-size: var(--fs-sm);
}
.learndash-wrapper .ld-alert .ld-alert-content {
  flex: 1 1 auto;
  min-width: 0;
}
.learndash-wrapper .ld-alert .ld-alert-icon {
  flex: 0 0 auto;
  width: auto !important;
  height: auto !important;
  position: static !important;
  margin: 0 !important;
}
.learndash-wrapper .ld-alert.ld-alert-success {
  border-left-color: var(--accent-green) !important;
  background: rgba(15, 123, 108, 0.05) !important;
}
.learndash-wrapper .ld-alert.ld-alert-warning {
  border-left-color: var(--accent-amber) !important;
  background: rgba(217, 115, 13, 0.05) !important;
}
.learndash-wrapper .ld-alert.ld-alert-danger,
.learndash-wrapper .ld-alert.ld-alert-error {
  border-left-color: var(--accent-red) !important;
  background: rgba(224, 62, 62, 0.04) !important;
}
.learndash-wrapper .ld-alert .ld-alert-icon {
  color: inherit !important;
  background: transparent !important;
  border-radius: 0 !important;
}

/* ===================================================================
 * 7. Progress bars (LD30 course status variant)
 *
 * NOTE: .ld-progress is the OUTER container that wraps the label +
 * percentage stats + the actual bar track. It must stay as a regular
 * block — NOT a beige pill — otherwise the entire label/stats block
 * sits inside a giant rounded rectangle (the /my-account/ regression
 * the tester flagged on 2026-05-12). The pill styling belongs on the
 * track (.ld-progress-bar) only.
 * =================================================================== */
.learndash-wrapper .ld-progress,
.ld-progress {
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  margin: 8px 0 0 !important;
}
/* Lay the heading out: label on the left, "0% Завршено / 0/N Чекори"
 * stats on the right — LD30's intended layout. Mepso theme had collapsed
 * it visually. */
.learndash-wrapper .ld-progress-heading {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 0 0 6px 0 !important;
}
.learndash-wrapper .ld-progress-label {
  color: var(--text) !important;
  font-weight: 600 !important;
  font-size: var(--fs-sm) !important;
}
.learndash-wrapper .ld-progress-stats {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 10px !important;
}
/* The visible track: thin beige pill that holds the fill bar. */
.learndash-wrapper .ld-progress-bar {
  background: var(--surface-tint) !important;
  border-radius: 999px !important;
  height: 6px !important;
  overflow: hidden !important;
  position: relative !important;
  width: 100% !important;
  display: block !important;
  padding: 0 !important;
}
.learndash-wrapper .ld-progress .ld-progress-bar-percentage,
.learndash-wrapper .ld-progress-bar-percentage {
  background: var(--g-accent-strip) !important;
  border-radius: 999px !important;
  transition: width 400ms cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 0 8px rgba(0, 163, 255, 0.35) !important;
  height: 100% !important;
  display: block !important;
}
.learndash-wrapper .ld-progress-stats,
.learndash-wrapper .ld-progress-percentage,
.learndash-wrapper .ld-progress-steps {
  color: var(--text-muted) !important;
  font-weight: 500 !important;
  font-size: var(--fs-xs) !important;
  font-variant-numeric: tabular-nums;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* ===================================================================
 * 8. Lesson + topic content typography
 * =================================================================== */
.learndash-wrapper .ld-topic-title,
.learndash-wrapper .ld-lesson-title,
.learndash-wrapper .ld-topic__heading h1 {
  color: var(--text) !important;
  letter-spacing: 0;
  font-weight: 700;
}
.learndash-wrapper .ld-content .ld-topic-content,
.learndash-wrapper .ld-content article p {
  font-size: var(--fs-md);
  line-height: 1.65;
  color: var(--text-body);
}

/* Course materials — subtle tinted block */
.learndash-wrapper .ld-course-materials {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  border-left: 3px solid var(--border-strong);
}
.learndash-wrapper .ld-course-materials h2,
.learndash-wrapper .ld-course-materials h3 {
  color: var(--text);
  margin-top: 0;
  font-size: var(--fs-lg);
}

/* ===================================================================
 * 9. Completion indicator
 * =================================================================== */
.learndash-wrapper .ld-status-complete,
.learndash-wrapper .ld-status.ld-status-complete {
  background: transparent;
  color: var(--accent-green);
  border-radius: var(--r-sm);
  padding: 0 var(--sp-2);
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0;
}
.learndash-wrapper .ld-status-complete::before {
  content: "● ";
  font-weight: 400;
  display: inline-block;
  margin-right: 6px;
}
.learndash-wrapper .ld-icon-complete,
.learndash-wrapper .ld-primary-color-lighter {
  color: var(--accent-green) !important;
}

/* ===================================================================
 * 10. Focus mode (full-screen lesson view)
 * =================================================================== */
.learndash-wrapper.ld-focus {
  background: var(--surface-0);
}
.learndash-wrapper.ld-focus .ld-focus-header {
  background: var(--surface-0) !important;
  border-bottom: 1px solid var(--border);
}
.learndash-wrapper.ld-focus .ld-focus-header .ld-focus-header__logo img {
  max-height: 28px;
  width: auto;
}

/* ===================================================================
 * 11. Profile page
 * =================================================================== */
.page-id-25073 .entry-content .learndash-wrapper:not(.learndash-wrapper-login-modal),
.page-id-27504 .entry-content .learndash-wrapper:not(.learndash-wrapper-login-modal) {
  width: min(100%, 1120px);
  margin-inline: auto;
}

.page-id-25073 .entry-content .learndash-wrapper:not(.learndash-wrapper-login-modal) > *,
.page-id-27504 .entry-content .learndash-wrapper:not(.learndash-wrapper-login-modal) > * {
  box-sizing: border-box;
}

.learndash-wrapper .ld-profile-summary {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(360px, 1.6fr);
  align-items: stretch;
  gap: var(--sp-5);
  margin: 0 auto clamp(28px, 4vw, 48px);
  padding: clamp(20px, 3vw, 30px);
  background:
    linear-gradient(135deg, rgba(27, 54, 93, 0.98), rgba(0, 102, 179, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-lg);
  box-shadow: 0 20px 44px rgba(27, 54, 93, 0.18);
}

.learndash-wrapper .ld-profile-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sp-3);
  min-height: 160px;
  padding: var(--sp-5);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--r-md);
}

.learndash-wrapper .ld-profile-card,
.learndash-wrapper .ld-profile-card * {
  color: #fff !important;
}

.learndash-wrapper .ld-profile-edit-link,
.learndash-wrapper .ld-profile-card a[href*="edit-profile"] {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  color: var(--mepso-primary) !important;
  background: #fff;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none !important;
}

.learndash-wrapper .ld-profile-header {
  background: var(--surface-0) !important;
  color: var(--text) !important;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-6) !important;
  margin-bottom: var(--sp-6);
  box-shadow: none;
}
.learndash-wrapper .ld-profile-stats-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-3);
}
.learndash-wrapper .ld-profile-summary .ld-profile-stats,
.learndash-wrapper .ld-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--sp-3);
  width: 100%;
}

.learndash-wrapper .ld-profile-stat {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-5) var(--sp-4);
  text-align: center;
  background: #fff;
  border: 1px solid rgba(27, 54, 93, 0.1);
  border-radius: var(--r-md);
  box-shadow: 0 14px 32px rgba(10, 31, 68, 0.12);
}

.learndash-wrapper .ld-profile-stat strong,
.learndash-wrapper .ld-profile-stat .ld-profile-stat-number {
  display: block;
  color: var(--mepso-primary) !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
  font-weight: 800 !important;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.learndash-wrapper .ld-profile-stat span,
.learndash-wrapper .ld-profile-stat .ld-profile-stat-label {
  margin-top: 8px;
  color: var(--text-muted) !important;
  font-size: var(--fs-md) !important;
  font-weight: 700;
}

.learndash-wrapper .ld-profile-stats-list .ld-profile-stats {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  text-align: left;
}
.learndash-wrapper .ld-profile-stats-list strong {
  display: block;
  font-size: var(--fs-2xl);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--sp-1);
}

.learndash-wrapper .ld-item-list.ld-course-list {
  margin-top: clamp(28px, 4vw, 46px);
  padding: clamp(18px, 2.4vw, 28px);
  background: #fff;
  border: 1px solid rgba(27, 54, 93, 0.1);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 48px rgba(27, 54, 93, 0.1);
}

.learndash-wrapper .ld-item-list .ld-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin: 0 0 var(--sp-5);
}

.learndash-wrapper .ld-item-list .ld-section-heading h2,
.learndash-wrapper .ld-item-list .ld-section-heading h3 {
  margin: 0 !important;
  color: var(--mepso-primary) !important;
  font-size: clamp(1.35rem, 2.4vw, 2rem) !important;
  font-weight: 800 !important;
  letter-spacing: 0;
}

.learndash-wrapper .ld-item-list .ld-item-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 !important;
}

.learndash-wrapper .ld-item-list .ld-search-prompt,
.learndash-wrapper .ld-item-list .ld-item-search .ld-search-prompt {
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  color: var(--mepso-primary) !important;
  background: #eef5fc !important;
  border: 1px solid rgba(27, 54, 93, 0.12);
  border-radius: var(--r-md);
  box-shadow: none !important;
}

.learndash-wrapper .ld-item-list .ld-expand-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--mepso-primary), var(--mepso-secondary)) !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  box-shadow: 0 12px 28px rgba(0, 102, 179, 0.2) !important;
  font-weight: 800;
}

.learndash-wrapper .ld-item-list .ld-expand-button .ld-icon,
.learndash-wrapper .ld-item-list .ld-expand-button .ld-text {
  color: #fff !important;
}

.learndash-wrapper .ld-item-list .ld-item-list-items {
  display: grid;
  gap: var(--sp-3);
  margin: 0 !important;
}

.learndash-wrapper .ld-item-list .ld-item-list-item {
  margin: 0 !important;
  overflow: hidden;
  background: #fff !important;
  border: 1px solid rgba(27, 54, 93, 0.12) !important;
  border-radius: var(--r-md) !important;
  box-shadow: none !important;
}

.learndash-wrapper .ld-item-list .ld-item-list-item-preview {
  min-height: 76px;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: var(--sp-4);
  padding: 16px 18px !important;
}

.learndash-wrapper .ld-item-list .ld-item-name {
  display: inline-flex !important;
  align-items: center;
  min-width: 0;
  gap: 14px;
  color: var(--text) !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

.learndash-wrapper .ld-item-list .ld-item-title {
  overflow-wrap: anywhere;
  color: var(--text) !important;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.35;
}

.learndash-wrapper .ld-item-list .ld-course-title {
  overflow-wrap: anywhere;
  color: var(--text) !important;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  font-weight: 800;
  line-height: 1.35;
}

.learndash-wrapper .ld-item-list .ld-status-icon {
  width: 40px !important;
  min-width: 40px !important;
  height: 40px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  color: #fff !important;
  background: var(--accent-green) !important;
  border-radius: var(--r-sm) !important;
}

.learndash-wrapper .ld-item-list .ld-item-details {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.learndash-wrapper .ld-item-list .ld-status,
.learndash-wrapper .ld-item-list .ld-status.ld-status-complete {
  min-height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px !important;
  color: #fff !important;
  background: var(--mepso-primary) !important;
  border-radius: 999px !important;
  font-size: var(--fs-sm) !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  white-space: nowrap;
}

.learndash-wrapper .ld-item-list .ld-status-complete::before {
  content: "✓";
  color: #fff !important;
  font-weight: 800;
  display: inline-block;
  margin-right: 6px;
}

.learndash-wrapper .ld-item-list .ld-item-list-item-preview > .ld-expand-button {
  width: 48px;
  min-width: 48px;
  height: 44px;
  padding: 0 !important;
  border-radius: var(--r-md) !important;
  box-shadow: none !important;
}

.learndash-wrapper .ld-item-list .ld-item-details .ld-expand-button {
  width: 48px;
  min-width: 48px;
  height: 44px;
  padding: 0 !important;
  border-radius: var(--r-md) !important;
  box-shadow: none !important;
}

/* ===================================================================
 * 11b. QA-8 LearnDash course/profile polish
 * =================================================================== */
.learndash-wrapper .ld-course-status-label,
.learndash-wrapper .ld-course-status-segment-label,
.learndash-wrapper .ld-course-status-segment-heading,
.learndash-wrapper .ld-course-status-content,
.learndash-wrapper .ld-course-status-segment-content {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  opacity: 1 !important;
}

.learndash-wrapper .ld-course-status .ld-status,
.learndash-wrapper .ld-course-status-not-enrolled .ld-status,
.learndash-wrapper .ld-course-status-enrolled .ld-status,
.learndash-wrapper .ld-course-status .ld-status * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.learndash-wrapper .ld-item-list .ld-item-list-item {
  overflow: visible !important;
}

.learndash-wrapper .ld-item-list .ld-item-list-item-preview {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) minmax(48px, auto);
  overflow: visible !important;
}

.learndash-wrapper .ld-item-list .ld-item-details {
  min-width: 0;
  flex-wrap: wrap;
}

.learndash-wrapper .ld-item-list .ld-status,
.learndash-wrapper .ld-item-list .ld-status.ld-status-complete {
  max-width: 100%;
  white-space: normal !important;
  line-height: 1.2;
  text-align: center;
}

.learndash-wrapper .ld-status-complete::before,
.learndash-wrapper .ld-item-list .ld-status-complete::before {
  content: none !important;
}

.learndash-wrapper .ld-status-icon,
.learndash-wrapper .ld-item-list .ld-status-icon,
.learndash-wrapper .ld-status .ld-status-icon {
  position: static !important;
  flex: 0 0 auto;
  margin: 0 6px 0 0 !important;
}

.learndash-wrapper .ld-item-list .ld-expand-button,
.learndash-wrapper .ld-item-list .ld-item-details .ld-expand-button,
.learndash-wrapper .ld-item-list .ld-item-list-item-preview > .ld-expand-button {
  flex: 0 0 auto;
  min-width: 96px;
  max-width: none !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.learndash-wrapper .ld-item-list .ld-expand-button .ld-text,
.learndash-wrapper .ld-item-list .ld-expand-button span:not(.ld-icon) {
  display: inline-block !important;
  min-width: max-content;
  overflow: visible !important;
  text-overflow: clip !important;
}

.learndash-wrapper .ld-item-list .ld-expand-button .ld-icon {
  flex: 0 0 auto;
}

@media (max-width: 920px) {
  .learndash-wrapper .ld-profile-summary {
    grid-template-columns: 1fr;
  }

  .learndash-wrapper .ld-profile-summary .ld-profile-stats,
  .learndash-wrapper .ld-profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learndash-wrapper .ld-item-list .ld-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .learndash-wrapper .ld-item-list .ld-item-list-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .learndash-wrapper .ld-profile-summary .ld-profile-stats,
  .learndash-wrapper .ld-profile-stats {
    grid-template-columns: 1fr;
  }

  .learndash-wrapper .ld-item-list .ld-item-list-item-preview {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .learndash-wrapper .ld-item-list .ld-item-details {
    justify-content: flex-start;
    width: 100%;
  }

  .learndash-wrapper .ld-item-list .ld-item-list-item-preview > .ld-expand-button,
  .learndash-wrapper .ld-item-list .ld-item-details .ld-expand-button {
    width: 100%;
    min-width: 100%;
  }
}

/* ===================================================================
 * 12. Accessibility — colour isn't the only cue
 * =================================================================== */
.learndash-wrapper .wpProQuiz_correctAnswer::before { content: "✓ "; color: var(--accent-green); }
.learndash-wrapper .wpProQuiz_incorrect::before     { content: "✗ "; color: var(--accent-red); }

/* Certificate link in course sidebar */
.learndash-wrapper .ld-course-status-content a[href*="certificate"],
.learndash-wrapper .ld-button[href*="certificate"] {
  background: var(--surface-0) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-strong) !important;
}

/* ===================================================================
 * 13. QA follow-up — compact course and profile shells
 * =================================================================== */
body.single-sfwd-courses.ast-separate-container #content > .ast-container {
  max-width: min(1120px, calc(100% - 32px));
  padding: clamp(28px, 4vw, 48px) 16px clamp(44px, 5vw, 72px);
}

body.single-sfwd-courses.ast-separate-container #primary {
  width: 100%;
  margin: 0;
  padding: 0 !important;
}

body.single-sfwd-courses.ast-separate-container .ast-article-single {
  padding: 0 !important;
  background: transparent;
  border: 0;
}

body.single-sfwd-courses .post-thumb-img-content.post-thumb {
  margin: 0 0 clamp(20px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(27, 54, 93, 0.1);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 44px rgba(27, 54, 93, 0.1);
  background: var(--surface-0);
}

body.single-sfwd-courses .post-thumb-img-content.post-thumb img {
  display: block;
  width: 100%;
  max-height: clamp(260px, 36vw, 430px);
  object-fit: cover;
  border: 0 !important;
  border-radius: 0 !important;
}

body.single-sfwd-courses .entry-title {
  max-width: 920px;
  margin: 0 0 clamp(18px, 2.5vw, 28px) !important;
  color: var(--mepso-primary) !important;
  font-size: clamp(1.9rem, 1.35rem + 2vw, 3rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

body.single-sfwd-courses .entry-content {
  margin-top: 0;
}

body.single-sfwd-courses .learndash-wrapper .ld-course-status,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 clamp(24px, 4vw, 42px);
  overflow: hidden;
}

body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment {
  min-width: 0;
  padding: clamp(14px, 2vw, 20px) !important;
}

body.single-sfwd-courses .learndash-wrapper .ld-tabs {
  margin-top: 0;
}

body.single-sfwd-courses .learndash-wrapper .ld-tabs-content {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: clamp(18px, 3vw, 32px);
}

body.page-id-25073.ast-separate-container #content > .ast-container,
body.page-id-27504.ast-separate-container #content > .ast-container {
  max-width: min(1120px, calc(100% - 32px));
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(44px, 5vw, 72px);
}

body.page-id-25073.ast-separate-container .ast-article-single,
body.page-id-27504.ast-separate-container .ast-article-single {
  padding: 0 !important;
  background: transparent;
  border: 0;
}

body.page-id-25073 .entry-header,
body.page-id-27504 .entry-header {
  display: none;
}

body.page-id-25073 .entry-content > .elementor > .elementor-section.elementor-top-section:first-of-type,
body.page-id-27504 .entry-content > .elementor > .elementor-section.elementor-top-section:first-of-type {
  min-height: clamp(170px, 24vw, 260px) !important;
  margin: 0 auto clamp(28px, 4vw, 44px) !important;
  overflow: hidden;
  border-radius: var(--r-lg);
  box-shadow: 0 18px 44px rgba(27, 54, 93, 0.12);
}

body.page-id-25073 .entry-content > .elementor > .elementor-section.elementor-top-section:first-of-type .elementor-heading-title,
body.page-id-27504 .entry-content > .elementor > .elementor-section.elementor-top-section:first-of-type .elementor-heading-title {
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem) !important;
}

.mepso-lang-fallback .menu-link,
.mepso-lang-fallback a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  text-decoration: none !important;
}

.mepso-lang-fallback__flag {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
}

@media (max-width: 780px) {
  body.single-sfwd-courses .learndash-wrapper .ld-course-status,
  body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled,
  body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
 * 14. Course status block — symmetry, alignment, status-pill hover
 *     (global: every single sfwd-courses landing page)
 *
 * Lives in learndash.css (not mepso.css) on purpose: this file is
 * enqueued with a `mepso-child` dependency, so it loads *after*
 * mepso.css and reliably wins the cascade over the base pill rule
 * (mepso.css §QA#30). It also only loads when SFWD_LMS is active.
 * Both files are external .css and are NOT touched by Hide My WP
 * Ghost's output filter — only wp_add_inline_style is stripped.
 *
 * Fixes from the 2026-06-02 screenshot review:
 *   1. three segments forced to equal width + top-aligned (symmetry)
 *   2. "Моментален Статус" label kept on one line (no mid-word break)
 *   3. status pill centred under its label + a smooth hover state
 *   4. the long action/description text wraps normally, not 1 word/line
 * Block size is unchanged — these are alignment-only rules; the
 * existing segment padding (§13) is left intact.
 *
 * 2nd iteration (2026-06-02): the "Започни" column still wrapped one
 * word per line. Root cause was THIS section's own (3) rule — it made
 * .ld-course-status-action a flex column with align-items:center, which
 * shrink-wraps the anonymous text node to min-content. Replaced with a
 * full-width block + text-align:center.
 *
 * 3rd iteration (2026-06-02) — DEFINITIVE. Browser-console diagnosis:
 * .ld-course-status is a CSS GRID and the segments are its direct grid
 * items, but the container was shrink-wrapped so each track was only
 * ~89px. flex:1 1 0 on the segments did nothing (flex grow is ignored
 * by grid items). The real lever is the grid itself: pin the container
 * to width:100% with three explicit 1fr tracks so each column is ~360px.
 * The old (0) rule also targeted the wrong node — .ld-course-status-content
 * is the per-segment inner wrapper (handled by (3)), not the segments'
 * parent — so it's removed here.
 * =================================================================== */

/* (0) THE FIX — pin the grid container to full width with three explicit,
 * equal 1fr tracks. Without width:100% the grid shrink-wrapped to ~89px
 * tracks; with it each column is ~1/3 of the block (~360px). align-items:
 * start top-aligns the columns (kills the "different heights" look) and
 * the 16px gap gives the three columns breathing room. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  align-items: start !important;
  gap: 16px !important;
  width: 100% !important;
}

/* (1) Segments are direct grid items, so each already gets exactly 1/3
 * of the row from (0) — no flex grow needed (it's ignored by grid items
 * anyway). min-width:0 overrides the grid item's implicit min-width:auto
 * (= min-content) so the column can shrink and the text can wrap instead
 * of forcing the track wider. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment {
  min-width: 0 !important;
  text-align: center !important;
}

/* (2) Labels: one line, aligned across all three columns. nowrap is
 * safe here — the widest label ("Моментален Статус") is ~170px at the
 * 700-weight --fs-xs size while each grid track is ~360px, and at
 * <=780px the block is a single full-width column (media query above),
 * so the label can never overflow its track. min-height keeps the
 * three label rows on a shared baseline. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment .ld-course-status-label,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment .ld-course-status-segment-heading,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment .ld-course-status-segment-label {
  display: block;
  width: 100%;
  min-height: 1.4em;
  margin: 0 0 10px;   /* vertical rhythm now that the segment isn't a flex col */
  white-space: nowrap !important;
  text-align: center !important;
}

/* (3) Each segment's content wrapper fills the WHOLE track as a plain
 * block — NOT a flex column. A flex column with align-items:center
 * shrink-wraps the anonymous text node to min-content, which is exactly
 * what forced "Немате привилегија за посета на оваа обука" onto one word
 * per line. As a full-width block with text-align:center the notice
 * wraps to 2-3 lines and the price/button/pill stay centred (the inline
 * pill via text-align, see (4)). word-break:normal keeps whole words
 * intact; overflow-wrap only breaks a single word that truly can't fit. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment .ld-course-status-content,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment .ld-course-status-segment-content,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-segment .ld-course-status-action {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  hyphens: none !important;
}

/* (4) Status pill — centred under the "Моментален Статус" label, with a
 * smooth hover. The base pill (navy bg / white text) is set with
 * !important in mepso.css §QA#30, so these must use !important too.
 * The border is the same navy as the background by default (invisible)
 * and only becomes visible once the background flips to white on hover. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status .ld-status,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled .ld-status,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled .ld-status {
  margin: 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--mepso-primary) !important;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
  cursor: default;
}

/* Hover flip: white background, navy text + border. The :hover pseudo
 * adds specificity over the base white-text rules (incl. the
 * -webkit-text-fill-color override in §11b), so it wins regardless of
 * source order — but match the same properties to be safe. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status .ld-status:hover,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled .ld-status:hover,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled .ld-status:hover {
  background: #ffffff !important;
  color: var(--mepso-primary) !important;
  -webkit-text-fill-color: var(--mepso-primary) !important;
  border-color: var(--mepso-primary) !important;
}
/* Keep the pill's inner text/icon colour in sync (the §11b rule paints
 * .ld-status * white via -webkit-text-fill-color); colour only, no box. */
body.single-sfwd-courses .learndash-wrapper .ld-course-status .ld-status:hover *,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled .ld-status:hover *,
body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled .ld-status:hover * {
  color: var(--mepso-primary) !important;
  -webkit-text-fill-color: var(--mepso-primary) !important;
}

/* (5) Mobile: (0)'s 1fr 1fr 1fr uses !important, so re-collapse to a
 * single column here (overrides §13's non-!important <=780px rule). */
@media (max-width: 780px) {
  body.single-sfwd-courses .learndash-wrapper .ld-course-status,
  body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled,
  body.single-sfwd-courses .learndash-wrapper .ld-course-status-enrolled {
    grid-template-columns: 1fr !important;
  }
}

/* (6) not-enrolled only — fill the equal column. (0) makes the three tracks
 * equal 1fr and (1)/(3) set min-width:0 + wrapping, but the segment and its
 * content still shrink-wrap to ~min-content (~101px) inside the ~320px track,
 * so the long "Започни" notice ("Немате привилегија за посета на оваа обука.")
 * wraps one word per line. Pin segment + content to the full track width.
 * Scoped to .ld-course-status-not-enrolled so enrolled/progress are untouched;
 * (1)/(3) are intentionally left as-is (they apply to all status variants). */
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled .ld-course-status-segment {
  width: 100% !important;
}
body.single-sfwd-courses .learndash-wrapper .ld-course-status-not-enrolled .ld-course-status-content {
  width: 100% !important;
  max-width: 100% !important;
}

/* ===================================================================
 * 15. LearnDash navigation + alert polish (global: courses / lessons /
 *     quizzes). All values confirmed via browser console on a live quiz
 *     page (mepso.vss.mk/quizzes/eos-matrix-test/). External file, so
 *     not stripped by Hide My WP Ghost like wp_add_inline_style is.
 * =================================================================== */

/* (1) "Претходна Лекција" — the transparent nav button renders its label
 * in LD's blue rgb(9,132,227), unreadable on the blue/green lesson-nav
 * gradient. Force white text + icon. NB: the plain "Назад"
 * (.learndash-link-previous-incomplete) is already white — left alone. */
.learndash-wrapper .ld-button.ld-button-transparent,
.learndash-wrapper a.ld-button.ld-button-transparent {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.learndash-wrapper .ld-button.ld-button-transparent span,
.learndash-wrapper .ld-button.ld-button-transparent * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.learndash-wrapper .ld-button.ld-button-transparent svg,
.learndash-wrapper .ld-button.ld-button-transparent path {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

/* (2) Quiz "previous lesson" notice — LD's warning alert ships an orange
 * rgb(217,115,13) border + icon. Recolour border and icon to MEPSO navy;
 * the notice text stays dark (readable on the light alert background). */
.learndash-wrapper .ld-alert.ld-alert-warning {
  border-color: #1B365D !important;
  border-left-color: #1B365D !important;
}
.learndash-wrapper .ld-alert.ld-alert-warning .ld-alert-icon.ld-icon-alert {
  color: #1B365D !important;
  background-color: transparent !important;
}

/* (3) Notice icon vertical position — the alert icon was poking out above
 * the border. Flex-centre the alert + its content row, then nudge the
 * icon down so it lines up with the text baseline. The 48px offset was
 * dialled in live against the current notice height. NOTE: it's a fixed
 * magic number tuned to today's single-line notice — if LD changes the
 * alert markup/height this may need re-checking. */
.learndash-wrapper .ld-alert.ld-alert-warning {
  display: flex !important;
  align-items: center !important;
}
.learndash-wrapper .ld-alert.ld-alert-warning .ld-alert-content {
  display: flex !important;
  align-items: center !important;
}
.learndash-wrapper .ld-alert.ld-alert-warning .ld-alert-icon.ld-icon-alert {
  margin-top: 48px !important;
  align-self: center !important;
  vertical-align: middle !important;
}

/* ===================================================================
 * МЕПСО customer feedback — round 1
 * =================================================================== */

/* (#8) Quiz review grid — make ANSWERED vs UNANSWERED questions visually
 * distinct. ProQuiz front JS adds .wpProQuiz_reviewQuestionSolved to a cell
 * once that question has been answered, and .wpProQuiz_reviewQuestionTarget to
 * the current one; an untouched cell carries neither. We colour them with the
 * MEPSO palette and deliberately use NEUTRAL answered/unanswered states (blue =
 * answered, grey = not answered) — NOT correct/incorrect — so the grid never
 * reveals which answers were wrong (keeps it consistent with #15). */
.learndash-wrapper .wpProQuiz_reviewQuestion li {
  background-color: #c9ced6 !important;   /* unanswered — neutral grey */
}
.learndash-wrapper .wpProQuiz_reviewQuestion li.wpProQuiz_reviewQuestionSolved {
  background-color: #0066B3 !important;   /* answered — MEPSO accent blue */
}
.learndash-wrapper .wpProQuiz_reviewQuestion li.wpProQuiz_reviewQuestionTarget {
  background-color: #1B365D !important;   /* current question — MEPSO navy */
  box-shadow: inset 0 0 0 2px #ffffff !important;
}

/* (#12) Defensive: never render a course price or buy button anywhere, even if
 * a future course is mis-set to a paid type (the learndash_get_course_price
 * filter in inc/learndash.php already forces 'closed' server-side). */
.learndash-wrapper .ld-course-status-price,
.learndash-wrapper .ld-payment-button,
.ld_course_grid .ld_course_grid_price_title,
.ld_course_grid .course_grid_price,
.ld_course_grid .ribbon {
  display: none !important;
}
