/* ZOLA campus: overrides are scoped to the student interface, never wp-admin.
   LearnDash ships some color utilities with !important; matched here deliberately. */
.ld-surface,
.learndash-wrapper {
  color-scheme: dark;
  --zola-field-border: #737e66;
  --zola-success-bg: #25372a;
  --zola-success: #b5dfb4;
  --zola-warning-bg: #3b3123;
  --zola-warning: #e9ca91;
  --zola-error-bg: #422b2b;
  --zola-error: #f1b2ae;
  --ld-color-brand-primary: var(--accent);
  --ld-color-semantic-text-body: var(--ink);
  --ld-color-semantic-text-body-subtle: var(--muted);
  --ld-color-semantic-text-link: var(--accent);
  --ld-color-semantic-text-link-hover: var(--ink);
  --ld-color-semantic-text-button-primary: var(--bg);
  --ld-color-semantic-button-primary-background: var(--accent);
  --ld-color-semantic-button-primary-background-hover: #e4f1c4;
  --ld-color-semantic-button-secondary-background: var(--surface);
  --ld-color-semantic-button-secondary-background-hover: var(--surface2);
  --ld-color-semantic-button-secondary-border: var(--zola-field-border);
  --ld-color-semantic-button-tertiary-text: var(--ink);
  --ld-color-semantic-button-tertiary-text-hover: var(--accent);
  --ld-color-semantic-field-background: var(--surface2);
  --ld-color-semantic-field-background-active: var(--surface2);
  --ld-color-semantic-field-background-hover: var(--surface2);
  --ld-color-semantic-field-border: var(--zola-field-border);
  --ld-color-semantic-general-border: var(--line);
  --ld-color-semantic-success: var(--zola-success);
  --ld-color-semantic-error: var(--zola-error);
  color: var(--ink);
}
.ld-surface { background: var(--surface); border: 1px solid var(--line); }
.ld-surface a { color: var(--accent); }
body .learndash-wrapper :is(.ld-profile-edit-link,.ld-profile-stat span,.ld-search-prompt) {
  color: var(--muted) !important;
}
body .learndash-wrapper .ld-expand-button {
  background: var(--surface2) !important;
  color: var(--accent) !important;
  border: 1px solid var(--zola-field-border);
}
body .learndash-wrapper .ld-expand-button:hover {
  background: #34402c !important;
  color: var(--ink) !important;
}

/* Course navigation, profile and expandable lesson/assignment lists. */
body .learndash-wrapper :is(.ld-breadcrumbs,.ld-course-status,.ld-item-list-item,
  .ld-item-list-item-expanded,.ld-item-search-wrapper,.ld-file-upload,.ld-progress,
  .ld-table-list-items,.ld-table-list-footer,.ld-pagination .ld-pages) {
  background: var(--surface) !important;
  color: var(--ink);
  border-color: var(--line) !important;
}
body .learndash-wrapper :is(.ld-table-list-header,.ld-table-list-item-expanded .ld-table-list-header) {
  background: var(--surface2) !important;
  color: var(--ink) !important;
  border-color: var(--line);
}
body .learndash-wrapper :is(.ld-item-list-item-expanded,.ld-table-list-item-expanded .ld-table-list)::before {
  background: var(--surface) !important;
  border-color: var(--line) !important;
}
body .learndash-wrapper :is(.ld-table-list,.ld-table-list-item,.ld-lesson-item,
  .ld-item-list-item-expanded,.ld-section-heading,.ld-tabs-navigation,.ld-quiz-list) {
  border-color: var(--line) !important;
}
body .learndash-wrapper :is(.ld-breadcrumbs-segments a,.ld-item-name,.ld-item-title,
  .ld-table-list-item-preview,.ld-table-list-title a,.ld-table-list-header a,
  .ld-profile-heading,.ld-profile-stat,.ld-course-status-label,.ld-course-status-content,.ld-progress-label) {
  color: var(--ink) !important;
}
body .learndash-wrapper :is(.ld-item-components,.ld-progress-steps,.ld-comments-column,
  .ld-comments-column a,.ld-column-label,.ld-file-upload-heading,.ld-file-upload-message) {
  color: var(--muted) !important;
}
body .learndash-wrapper :is(.ld-primary-color,.ld-icon-quiz,.ld-icon-assignment,
  .ld-progress-percentage,.ld-tabs .ld-active,.ld-expand-button,.ld-certificate-link) {
  color: var(--accent) !important;
}
body .learndash-wrapper :is(.ld-breadcrumbs a,.ld-item-name,.ld-table-list-item-preview,
  .ld-table-list-title a,.ld-primary-color-hover):hover { color: var(--accent) !important; }
body .learndash-wrapper .ld-breadcrumbs {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
body .learndash-wrapper .ld-breadcrumbs-segments {
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: anywhere;
}
body .learndash-wrapper .ld-breadcrumbs-segments li::after { margin: 0 6px; color: var(--muted); }
body .learndash-wrapper .ld-progress-bar { background: var(--surface2) !important; }
body .learndash-wrapper .ld-progress-bar-percentage,
body .learndash-wrapper .ld-tabs .ld-active::after {
  background: var(--accent) !important;
}
body .learndash-wrapper .ld-status {
  background: var(--surface2) !important;
  color: var(--ink) !important;
}
body .learndash-wrapper :is(.ld-status-complete,.ld-status-icon.ld-status-complete) {
  background: var(--zola-success-bg) !important;
  color: var(--zola-success) !important;
  border-color: var(--zola-success) !important;
}
body .learndash-wrapper :is(.ld-status-incomplete,.ld-status-icon.ld-quiz-incomplete) {
  background: var(--surface2) !important;
  color: var(--muted) !important;
  border-color: var(--zola-field-border) !important;
}
body .learndash-wrapper :is(.ld-status-waiting,.ld-status-progress) {
  background: var(--zola-warning-bg) !important;
  color: var(--zola-warning) !important;
}

/* All primary actions have an explicit foreground as well as a background. */
body .learndash-wrapper :is(.ld-button,.wpProQuiz_button,.wpProQuiz_button2,
  .learndash_mark_complete_button,#learndash_mark_complete_button,
  #quiz_continue_link,.ld-file-input + label strong) {
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: none;
  text-shadow: none;
  text-decoration: none;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.4;
  min-height: 44px;
  opacity: 1;
}
body .learndash-wrapper :is(.ld-button,.wpProQuiz_button,.wpProQuiz_button2,
  .learndash_mark_complete_button,#learndash_mark_complete_button,#quiz_continue_link):hover {
  background: #e4f1c4 !important;
  color: var(--bg) !important;
  opacity: 1;
}
body .learndash-wrapper .ld-button :is(.ld-text,.ld-icon) { color: inherit !important; }
body .learndash-wrapper :is(.ld-button-alternate,.ld-button-transparent) {
  background: transparent !important;
  color: var(--accent) !important;
}
body .learndash-wrapper :is(.ld-expand-button .ld-icon,.ld-button-alternate .ld-icon) {
  background: var(--surface2) !important;
  color: var(--accent) !important;
}
body .learndash-wrapper :is(button,input,.ld-button,.wpProQuiz_button,.wpProQuiz_button2,#quiz_continue_link):disabled,
body .learndash-wrapper :is(button,input,.ld-button,.wpProQuiz_button,.wpProQuiz_button2,#quiz_continue_link):disabled:hover,
body .learndash-wrapper .wpProQuiz_content :is(.wpProQuiz_button,.wpProQuiz_button2):disabled,
body .learndash-wrapper .wpProQuiz_content :is(.wpProQuiz_button,.wpProQuiz_button2):disabled:hover,
body .learndash-wrapper [aria-disabled="true"] {
  background: var(--surface2) !important;
  color: var(--muted) !important;
  border-color: var(--line) !important;
  outline-color: var(--line) !important;
  opacity: 1;
  cursor: not-allowed;
}

/* Answers and upload controls: retain native form behavior and validation. */
body .learndash-wrapper :is(textarea,select,input[type="text"],input[type="email"],
  input[type="number"],input[type="search"],input[type="url"],input[type="file"],
  input[type="password"],.wpProQuiz_questionEssay,.ld-file-input + label span) {
  background: var(--surface2) !important;
  color: var(--ink) !important;
  border: 1px solid var(--zola-field-border) !important;
  border-radius: var(--radius);
  caret-color: var(--accent);
  font: inherit;
  max-width: 100%;
}
body .learndash-wrapper :is(textarea,input,select)::placeholder {
  color: var(--muted);
  opacity: 1;
}
body .learndash-wrapper textarea.wpProQuiz_questionEssay {
  min-height: 220px;
  padding: 18px;
  line-height: 1.65;
  resize: vertical;
}
body .learndash-wrapper :is(input[type="radio"],input[type="checkbox"]) { accent-color: var(--accent); }
body .learndash-wrapper :is(a,button,input,textarea,select,[tabindex]):focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 4px;
  box-shadow: none;
}
body .learndash-wrapper .wpProQuiz_questionListItem label {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--zola-field-border) !important;
}
body .learndash-wrapper .wpProQuiz_questionListItem label:is(.is-selected,:focus-within) {
  border-color: var(--accent) !important;
}
body .learndash-wrapper :is(.wpProQuiz_question_page,.wpProQuiz_reviewLegend) {
  color: var(--muted);
}
/* Quiz and lesson timers: override LearnDash's separate light container and track.
   Keep its display rules, remaining-time calculation and animated bar width. */
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--zola-field-border);
  border-radius: var(--radius);
  box-shadow: none;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit::before {
  background: var(--surface2) !important;
  border-radius: 6px;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit .time {
  color: var(--ink) !important;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit .time span {
  color: var(--accent) !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit .wpProQuiz_progress {
  background: var(--accent) !important;
  border-radius: 6px;
  box-shadow: none;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_quiz_time {
  color: var(--muted) !important;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_quiz_time span {
  color: var(--ink) !important;
  font-variant-numeric: tabular-nums;
}
body .learndash-wrapper .wpProQuiz_content .wpProQuiz_time_limit_expired {
  background: var(--zola-warning-bg) !important;
  color: var(--zola-warning) !important;
  border: 1px solid var(--zola-warning);
  border-radius: var(--radius);
  padding: 12px 16px;
}
body .learndash-wrapper :is(.learndash_timer,#learndash_timer,.ld-navigation__progress-timer) {
  background: var(--surface) !important;
  color: var(--accent) !important;
  border-color: var(--line) !important;
  font-variant-numeric: tabular-nums;
}
body .learndash-wrapper :is(.learndash_timer,#learndash_timer,.ld-navigation__progress-timer) :is(span,svg),
body .learndash-wrapper .ld-navigation__progress-timer-label {
  color: inherit !important;
}
body .learndash-wrapper :is(.wpProQuiz_reviewQuestion li,.wpProQuiz_box li) {
  background: var(--surface2) !important;
  color: var(--ink) !important;
  border: 1px solid var(--zola-field-border);
  border-color: var(--zola-field-border) !important;
  box-shadow: none;
}
body .learndash-wrapper .learndash-quiz-review__button {
  color: inherit !important;
  background: transparent !important;
}
body .learndash-wrapper :is(.wpProQuiz_reviewQuestionTarget,.wpProQuiz_reviewQuestion_Target) {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px;
}
body .learndash-wrapper :is(li.wpProQuiz_reviewQuestionSolved,.wpProQuiz_reviewColor_Answer) {
  background: #3d4932 !important;
  color: var(--ink) !important;
  border-color: var(--accent) !important;
}
body .learndash-wrapper .wpProQuiz_reviewQuestion { border-color: var(--line); }
body .learndash-wrapper .wpProQuiz_reviewDiv { border-color: var(--line); }
body .learndash-wrapper :is(li.wpProQuiz_reviewQuestionReview,li.wpProQuiz_reviewQuestionSkip,
  .wpProQuiz_reviewColor_Review,.wpProQuiz_reviewQuestion_Skip) {
  background: var(--zola-warning-bg) !important;
  color: var(--zola-warning) !important;
  border-color: var(--zola-warning) !important;
}

/* Correct, incorrect and pending remain distinct, with their original text/icons. */
body .learndash-wrapper :is(.wpProQuiz_answerCorrect label,.wpProQuiz_correct,
  li.wpProQuiz_reviewQuestionSolvedCorrect,.wpProQuiz_reviewColor_AnswerCorrect,.ld-alert-success) {
  background: var(--zola-success-bg) !important;
  color: var(--zola-success) !important;
  border-color: var(--zola-success) !important;
}
body .learndash-wrapper :is(.wpProQuiz_answerIncorrect label,.wpProQuiz_incorrect,
  li.wpProQuiz_reviewQuestionSolvedIncorrect,.wpProQuiz_reviewColor_AnswerIncorrect,.ld-alert-error) {
  background: var(--zola-error-bg) !important;
  color: var(--zola-error) !important;
  border-color: var(--zola-error) !important;
}
body .learndash-wrapper :is(.wpProQuiz_answerCorrectIncomplete label,.ld-alert-warning) {
  background: var(--zola-warning-bg) !important;
  color: var(--zola-warning) !important;
  border-color: var(--zola-warning) !important;
}
body .learndash-wrapper :is(.ld-alert-content p,.wpProQuiz_correct p,.wpProQuiz_incorrect p) { color: inherit; }
body .learndash-wrapper :is(.ld-alert,.wpProQuiz_response,.wpProQuiz_tipp,
  .wpProQuiz_results,.wpProQuiz_reviewSummary,.wpProQuiz_sending,.wpProQuiz_lock) {
  border-color: var(--line);
}
body .learndash-wrapper :is(.ld-alert-info,.wpProQuiz_tipp,.wpProQuiz_response) {
  background: var(--surface2);
  color: var(--ink);
}
body .learndash-wrapper .ld-alert-icon {
  background: var(--surface2) !important;
  color: var(--ink) !important;
}
body .learndash-wrapper :is(.wpProQuiz_results table,.wpProQuiz_results th,.wpProQuiz_results td) {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

@media (max-width: 640px) {
  body .learndash-wrapper .ld-breadcrumbs { padding: 14px; }
  body .learndash-wrapper .ld-breadcrumbs-segments { font-size: 13px; }
  body .learndash-wrapper .ld-content-actions { gap: 12px; }
  body .learndash-wrapper textarea.wpProQuiz_questionEssay { min-height: 240px; padding: 14px; }
  body .learndash-wrapper .ld-table-list-title { overflow-wrap: anywhere; min-width: 0 !important; }
}
