/* ============================================================
   HERACLASS Student Dashboard
   Design: shadcn/ui · Light · Minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --bg-page:      #ffffff;
  --bg-card:      #ffffff;
  --sidebar-bg:   #ffffff;
  --sidebar-w:    232px;

  --border:       #e4e4e7;
  --border-input: #d4d4d8;

  --text:         #09090b;
  --text-muted:   #71717a;
  --text-xs:      #a1a1aa;

  --primary:      #18181b;
  --primary-fg:   #fafafa;
  --primary-hover:#27272a;

  --destructive:  #ef4444;

  --accent:       #f4f4f5;
  --accent-text:  #18181b;

  --ring:         #18181b;

  --progress-bg:  #e4e4e7;
  --progress-fill:#18181b;

  --radius:       8px;
  --radius-sm:    6px;
  --radius-lg:    12px;

  --shadow-sm:    0 1px 2px rgba(0,0,0,.05);
  --shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);

  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --tr:           .15s ease;
}

/* ── Reset ──────────────────────────────────────────────── */
.tcd-wrap * { box-sizing: border-box; }

/* ── Break out of theme container ───────────────────────── */
.tcd-wrap {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  margin-left: -50vw;
  overflow-x: hidden;
}

.entry-content:has(.tcd-wrap),
.page-content:has(.tcd-wrap),
.site-main:has(.tcd-wrap),
article:has(.tcd-wrap),
.container:has(.tcd-wrap) {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}

/* ── Shell ──────────────────────────────────────────────── */
.tcd-wrap {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ────────────────────────────────────────────── */
.tcd-sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}

/* User block */
.tcd-user-block {
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tcd-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.tcd-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.tcd-user-email {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Nav */
.tcd-nav {
  flex: 1;
  padding: 8px;
  list-style: none;
  margin: 0;
}

.tcd-nav li { margin: 1px 0; }

.tcd-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 400;
  transition: color var(--tr), background var(--tr);
}

.tcd-nav a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.tcd-nav a:hover {
  color: var(--text);
  background: var(--accent);
}

.tcd-nav a.active {
  color: var(--text);
  background: var(--accent);
  font-weight: 500;
}

.tcd-nav a.tcd-logout {
  color: var(--text-muted);
}

.tcd-nav a.tcd-logout:hover {
  color: var(--destructive);
  background: #fef2f2;
}

.tcd-nav-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 10px;
}

/* ── Main ───────────────────────────────────────────────── */
.tcd-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────── */
.tcd-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.tcd-page-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.tcd-header-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

.tcd-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  background: var(--accent);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ── Content ────────────────────────────────────────────── */
.tcd-content {
  padding: 28px;
  flex: 1;
}

/* ── Section header ─────────────────────────────────────── */
.tcd-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tcd-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -.01em;
}

.tcd-section-count {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}


/* ── Courses header ─────────────────────────────────────── */
.tcd-courses-header {
  margin-bottom: 16px;
}

.tcd-courses-count {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}

/* ── Course grid ────────────────────────────────────────── */
.tcd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

/* ── Course card ────────────────────────────────────────── */
.tcd-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--tr), border-color var(--tr);
}

.tcd-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #d4d4d8;
}

.tcd-card-thumb {
  aspect-ratio: 16/9;
  background: var(--bg-page);
  overflow: hidden;
  position: relative;
}

.tcd-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.tcd-card:hover .tcd-card-thumb img {
  transform: scale(1.03);
}

.tcd-card-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-xs);
}

.tcd-card-thumb-empty svg {
  width: 28px;
  height: 28px;
}

.tcd-card-pct {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: .01em;
}

.tcd-card-pct.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.tcd-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tcd-card-cat {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-xs);
}

.tcd-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tcd-card-author {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Progress ───────────────────────────────────────────── */
.tcd-progress {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tcd-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.tcd-progress-row span:last-child {
  font-weight: 500;
  color: var(--text);
}

.tcd-progress-track {
  height: 5px;
  background: var(--progress-bg);
  border-radius: 99px;
  overflow: hidden;
}

.tcd-progress-fill {
  height: 100%;
  background: var(--progress-fill);
  border-radius: 99px;
  transition: width .5s ease;
}

.tcd-progress-fill.done {
  background: #16a34a;
}

/* ── Card footer ────────────────────────────────────────── */
.tcd-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}

/* ── Buttons ────────────────────────────────────────────── */
.tcd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--tr);
  line-height: 1;
}

.tcd-btn svg { width: 13px; height: 13px; }

.tcd-btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: var(--primary);
}

.tcd-btn-primary:hover {
  background: var(--primary-hover);
  color: var(--primary-fg);
}

.tcd-btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-input);
}

.tcd-btn-outline:hover {
  background: var(--accent);
  color: var(--text);
}

.tcd-btn-sm {
  padding: 5px 11px;
  font-size: 12px;
}

.tcd-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.tcd-btn-ghost:hover {
  background: var(--accent);
  color: var(--text);
  border-color: var(--border-input);
}

.tcd-review-btn svg {
  color: var(--text-xs);
  transition: color var(--tr);
}

.tcd-review-btn:hover svg {
  color: #f59e0b;
}

/* ── Empty state ────────────────────────────────────────── */
.tcd-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 72px 24px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.tcd-empty-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.tcd-empty-icon svg { width: 20px; height: 20px; }

.tcd-empty h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -.01em;
}

.tcd-empty p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 300px;
  line-height: 1.6;
}

/* ── Review Modal ───────────────────────────────────────── */
.tcd-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 100000;
  pointer-events: none;
}

.tcd-modal-overlay.is-open {
  display: block;
  pointer-events: auto;
  animation: tcdFadeIn .15s ease;
}

.tcd-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 100001;
}

.tcd-modal.is-open { display: block; }

/* Force header below modal overlay when modal is open */
body.tcd-modal-open .hera-header-wrap,
body.tcd-modal-open .hera-header {
  z-index: 1 !important;
}

@keyframes tcdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes tcdModalIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -48%); }
}

.tcd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.tcd-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -.01em;
}

.tcd-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--tr), color var(--tr);
}

.tcd-modal-close:hover {
  background: var(--accent);
  color: var(--text);
}

.tcd-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tcd-stars {
  display: flex;
  gap: 4px;
}

.tcd-star {
  font-size: 2rem;
  cursor: pointer;
  color: var(--border-input);
  line-height: 1;
  transition: color var(--tr), transform var(--tr);
  user-select: none;
}

.tcd-star:hover,
.tcd-star.active {
  color: #f59e0b;
}

.tcd-star:hover {
  transform: scale(1.1);
}

.tcd-review-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  min-height: 90px;
  transition: border-color var(--tr), box-shadow var(--tr);
  line-height: 1.5;
}

.tcd-review-textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px rgba(24,24,27,.1);
}

.tcd-review-textarea::placeholder {
  color: var(--text-xs);
}

.tcd-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}

/* ── Modal success state ────────────────────────────────── */
.tcd-modal-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 24px;
  text-align: center;
}
.tcd-modal--success .tcd-modal-body,
.tcd-modal--success .tcd-modal-footer { display: none; }
.tcd-modal--success .tcd-modal-success { display: flex; }
.tcd-modal-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f0fdf4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tcd-modal-success-icon svg {
  width: 22px;
  height: 22px;
  stroke: #16a34a;
}
.tcd-modal-success-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.tcd-modal-success-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ── Mobile toggle ──────────────────────────────────────── */
.tcd-mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 999;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.tcd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 49;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes tcdFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tcd-content > * { animation: tcdFadeUp .2s ease both; }
.tcd-grid .tcd-card:nth-child(2) { animation-delay: .04s; }
.tcd-grid .tcd-card:nth-child(3) { animation-delay: .08s; }
.tcd-grid .tcd-card:nth-child(4) { animation-delay: .12s; }
.tcd-grid .tcd-card:nth-child(5) { animation-delay: .16s; }
.tcd-grid .tcd-card:nth-child(6) { animation-delay: .20s; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .tcd-sidebar       { display: none; }
  .tcd-mobile-toggle { display: none; }

  .tcd-header { padding: 0 16px; }
  .tcd-content { padding: 20px 16px; }

  .tcd-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .tcd-grid { grid-template-columns: 1fr; }
  .tcd-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── Settings forms (profile + password) ───────────────── */
.tcd-settings-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tcd-settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tcd-settings-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.tcd-settings-notice {
  max-width: 480px;
  padding: 10px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #15803d;
  margin-bottom: 20px;
}

/* Cap Tutor's password form fields to same width */
.tcd-wrap .tutor-dashboard-content-inner .tutor-row {
  max-width: 480px;
}

.tcd-wrap .tutor-dashboard-content-inner [class*="tutor-col-"] {
  max-width: 480px;
  width: 100%;
}

/* ── Override Tutor LMS button colors ───────────────────── */
.tcd-wrap .tutor-btn-primary,
.tcd-wrap .tutor-btn.tutor-btn-primary,
.tcd-wrap button[type="submit"].tutor-btn-primary,
.tcd-wrap .tutor-profile-settings-save {
  background-color: #18181b !important;
  border-color: #18181b !important;
  color: #fafafa !important;
}

.tcd-wrap .tutor-btn-primary:hover,
.tcd-wrap .tutor-btn.tutor-btn-primary:hover,
.tcd-wrap .tutor-profile-settings-save:hover {
  background-color: #27272a !important;
  border-color: #27272a !important;
}

/* ── Kill Tutor defaults inside our wrapper ──────────────── */
.tcd-wrap .tutor-page-wrap,
.tcd-wrap .tutor-container,
.tcd-wrap .tutor-wrap { all: unset; }

/* ── Hide leftover brand block ───────────────────────────── */
.tcd-brand { display: none !important; }

/* ── Hide default Tutor LMS dashboard nav rendered by theme ─ */
.tutor-dashboard-content-nav,
.tutor-dashboard-sidebar,
.tutor-lead-info,
.tutor-frontend-dashboard-sidebar,
.tutor-dashboard-nav,
.tcd-wrap ~ .tutor-page-wrap { display: none !important; }

/* ── Lesson page: shadcn/ui restyle ──────────────────────── */

/* Top bar — black */
.tutor-course-topic-single-header,
.tutor-single-page-top-bar {
  background-color: #18181b !important;
  border-bottom: none !important;
  color: #fafafa !important;
  font-family: var(--font) !important;
}

.tutor-course-topic-single-header *,
.tutor-course-topic-single-header a,
.tutor-course-topic-single-header .tutor-iconic-btn,
.tutor-course-topic-single-header .tutor-course-topic-single-header-title,
.tutor-course-topic-single-header .tutor-color-primary-60 {
  color: #fafafa !important;
}

.tutor-course-topic-single-header .tutor-iconic-btn:hover,
.tutor-course-topic-single-header .tutor-iconic-btn-secondary:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: transparent !important;
}

/* Sidebar — white, border-right like dashboard */
.tutor-course-single-sidebar-wrapper,
.tutor-course-single-content-wrapper .tutor-desktop-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e4e4e7 !important;
}

/* Sidebar header / topic accordion */
.tutor-accordion-item-header,
.tutor-course-topics-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e4e4e7 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #09090b !important;
  padding: 10px 14px !important;
}

/* Lesson list items */
.tutor-course-topics-list-item-link,
.tutor-course-topics-list > li > a,
.tutor-course-topics-list-item > a {
  color: #71717a !important;
  font-size: 13.5px !important;
  font-weight: 400 !important;
  border-radius: 6px !important;
  padding: 7px 10px !important;
  transition: background .15s ease, color .15s ease !important;
  text-decoration: none !important;
}

.tutor-course-topics-list-item-link:hover,
.tutor-course-topics-list > li > a:hover {
  background: #f4f4f5 !important;
  color: #09090b !important;
}

/* Active lesson */
.tutor-course-topic-item.is-active,
.tutor-course-topic-item.is-active > a {
  background: #f4f4f5 !important;
  color: #09090b !important;
  border-left: none !important;
}

.tutor-course-topic-item.is-active .tutor-course-topic-item-title,
.tutor-course-topic-item.is-active .tutor-course-topic-item-icon {
  color: #09090b !important;
}

/* Lesson items */
.tutor-course-topic-item > a,
.tutor-course-topic-item > a * {
  color: #71717a !important;
}

.tutor-course-topic-item > a:hover {
  background: #f4f4f5 !important;
}

.tutor-course-topic-item > a:hover .tutor-course-topic-item-title {
  color: #09090b !important;
}

/* Keep checkmark visible on hover */
.tutor-course-topic-item > a:hover .tutor-form-check-input,
.tutor-course-topic-item > a:hover input[type="checkbox"] {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

/* Completed lesson checkmark */
.tutor-course-topics-list .is-completed .tutor-icon-circle-mark-line,
.tutor-course-topics-list .is-completed .tutor-icon-circle-mark {
  color: #16a34a !important;
}

/* Main content area */
#tutor-single-entry-content,
.tutor-quiz-single-entry-wrap {
  background: #ffffff !important;
}

/* Buttons */
.tutor-btn-primary,
.tutor-btn.tutor-btn-primary,
button.tutor-btn-primary,
a.tutor-btn-primary {
  background-color: #18181b !important;
  border-color: #18181b !important;
  color: #fafafa !important;
  border-radius: 6px !important;
  font-family: var(--font) !important;
}

.tutor-btn-primary:hover,
.tutor-btn.tutor-btn-primary:hover {
  background-color: #27272a !important;
  border-color: #27272a !important;
}

/* Nav tabs (Q&A, Reviews etc) */
.tutor-nav .tutor-nav-link.is-active {
  color: #09090b !important;
  border-bottom-color: #18181b !important;
}

.tutor-nav .tutor-nav-link:hover {
  color: #09090b !important;
}

/* Progress bar */
.tutor-progress-bar > span,
.tutor-progress-value {
  background-color: #18181b !important;
}

/* Footer prev/next disabled state */
.tcd-btn-disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* Footer prev/next buttons */
.tutor-course-topic-single-footer {
  border-top: 1px solid #e4e4e7 !important;
  background: #ffffff !important;
}

.tutor-course-topic-single-footer .tutor-btn-secondary,
.tutor-course-topic-single-footer .tcd-btn-disabled {
  background: #18181b !important;
  border-color: #18181b !important;
  color: #fafafa !important;
}

.tutor-course-topic-single-footer .tutor-btn-secondary:hover {
  background: #27272a !important;
  border-color: #27272a !important;
  color: #fafafa !important;
}

/* Fix arrow icon overlapping lesson number in sidebar */
.tutor-course-topics-list-item-link,
.tutor-course-topics-list > li > a,
.tutor-course-topics-list-item > a {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.tutor-course-topics-list-item-link .tutor-course-topics-list-item-icon,
.tutor-course-topics-list-item-icon {
  flex-shrink: 0 !important;
  min-width: 16px !important;
}

/* Remove blue focus rings */
.tutor-course-single-sidebar-wrapper *:focus,
#tutor-single-entry-content *:focus {
  outline-color: #18181b !important;
  box-shadow: none !important;
}

/* Hide Overview/Notes tabs and Take Note button */
.tutor-course-spotlight-nav {
  display: none !important;
}

/* Always show the overview/lesson content */
#tutor-course-spotlight-overview {
  display: block !important;
}

/* Fix accordion header: push 3/3 count right next to the arrow */
.tutor-accordion-item-header .tutor-row {
  padding-right: 24px !important;
  position: relative !important;
}

.tutor-course-topic-summary {
  font-size: 12px !important;
  color: #71717a !important;
  white-space: nowrap !important;
}

.tutor-accordion-item-header .tutor-col-auto {
  align-self: flex-end !important;
  padding-bottom: 2px !important;
}

/* Hide Complete Course button on mobile */
.tutor-topbar-complete-btn,
.tutor-spotlight-mobile-progress-right .tutor-topbar-complete-btn {
  display: none !important;
}

/* Accordion arrow — muted to blend in */
.tutor-accordion-item-header::after,
.tutor-accordion-item-header::before {
  color: #a1a1aa !important;
  border-color: #a1a1aa !important;
}

.tutor-accordion-item-header [class*="tutor-icon"],
.tutor-course-topic [class*="tutor-icon-angle"],
.tutor-accordion-item-header.is-active [class*="tutor-icon"] {
  color: #a1a1aa !important;
}

/* Mobile sidebar close button — all states */
a[tutor-hide-course-single-sidebar],
a[tutor-hide-course-single-sidebar]:hover,
a[tutor-hide-course-single-sidebar]:focus,
a[tutor-hide-course-single-sidebar]:active {
  color: #71717a !important;
  background-color: #f4f4f5 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

a[tutor-hide-course-single-sidebar] span {
  color: inherit !important;
}

/* Kill any remaining blue */
.tutor-color-brand,
.tutor-color-primary {
  color: #09090b !important;
}

.tutor-bg-primary {
  background-color: #18181b !important;
}

.tutor-border-primary {
  border-color: #18181b !important;
}

/* ══════════════════════════════════════════════════════════
   Course Review Grid  [tcd_course_reviews id="X"]
   ══════════════════════════════════════════════════════════ */

.tcd-rv-wrap {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Summary bar */
.tcd-rv-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.tcd-rv-avg {
  font-size: 2.5rem;
  font-weight: 700;
  color: #09090b;
  line-height: 1;
}

.tcd-rv-summary-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tcd-rv-summary-stars {
  display: flex;
  gap: 2px;
}

.tcd-rv-summary-stars span {
  font-size: 1.1rem;
  color: #d4d4d8;
}

.tcd-rv-summary-stars span.on {
  color: #f59e0b;
}

.tcd-rv-count {
  font-size: 13px;
  color: #71717a;
}

/* Grid — single column, full width */
.tcd-rv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Card */
.tcd-rv-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.tcd-rv-card:hover {
  box-shadow: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  border-color: #d4d4d8;
}

/* Header row: avatar + meta (name + stars) + date (right) */
.tcd-rv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tcd-rv-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f4f5;
  border: 1px solid #e4e4e7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #3f3f46;
  flex-shrink: 0;
  text-transform: uppercase;
}

.tcd-rv-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.tcd-rv-name {
  font-size: 13px;
  font-weight: 600;
  color: #09090b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tcd-rv-date {
  font-size: 11.5px;
  color: #a1a1aa;
  flex-shrink: 0;
  align-self: flex-start;
}

/* Stars + score */
.tcd-rv-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tcd-rv-star {
  font-size: 15px;
  color: #d4d4d8;
  line-height: 1;
}

.tcd-rv-star.on {
  color: #f59e0b;
}

/* Review text */
.tcd-rv-text {
  font-size: 13.5px;
  color: #3f3f46;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Load more */
.tcd-rv-load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.tcd-rv-load-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  color: #71717a;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Inter', system-ui, sans-serif;
  cursor: pointer;
  transition: all .15s ease;
}

.tcd-rv-load-more svg {
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.tcd-rv-load-more:hover {
  background: #f4f4f5;
  color: #09090b;
  border-color: #d4d4d8;
}

.tcd-rv-load-more:hover svg {
  transform: translateY(2px);
}

.tcd-rv-load-more:disabled,
.tcd-rv-load-more.tcd-rv-loading {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Toast notification ─────────────────────────────────── */
.tcd-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.tcd-toast.tcd-toast-show {
  opacity: 1;
  transform: translateY(0);
}
.tcd-toast svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke: #16a34a;
}
