/* ==========================================================
   MAXZEETON.NG — MY COURSES PAGE CSS
   Pixel-perfect match to mockup — shares tokens from dashboard.css
   This file is ADDITIVE — load it after dashboard.css on this page
   ========================================================== */

/* Reuse all :root tokens from dashboard.css — no re-declaration needed */

/* ── Body override for courses page ── */
body.courses-page {
  font-family: var(--f-body);
  font-size: 14px;
  color: var(--t1);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.courses-page * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.courses-page *::-webkit-scrollbar { display: none; }

body.courses-page > .footer,
body.courses-page footer.footer { display: none !important; }
.bg-grid,.bg-orbs,.bg-orb,.scan-line { display: none !important; }

/* ==========================================================
   PAGE SHELL — same 3-col layout as dashboard
   ========================================================== */
body.courses-page .section {
  padding-top: var(--nav-h);
  min-height: 100vh;
}
body.courses-page .section > .container {
  max-width: 100%; padding: 0;
}

.courses-layout {
  display: grid;
  grid-template-columns: var(--side-w) 1fr var(--right-w);
  min-height: calc(100vh - var(--nav-h));
  align-items: start;
}

/* ==========================================================
   MAIN CONTENT AREA
   ========================================================== */
.courses-main {
  padding: 28px 24px 48px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Page Header ── */
.courses-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.courses-page-header-left {}
.courses-page-title {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1.15;
}
.courses-page-subtitle {
  font-size: 14px;
  color: var(--t3);
  margin-top: 4px;
}
.courses-page-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Search input */
.courses-search-wrap {
  position: relative;
}
.courses-search-wrap i {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--t3);
  pointer-events: none;
}
.courses-search-input {
  width: 220px;
  padding: 9px 14px 9px 34px;
  border: 1px solid var(--bdr);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 13px;
  font-family: var(--f-body);
  color: var(--t1);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.courses-search-input::placeholder { color: var(--t3); }
.courses-search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,25,44,.08);
}

/* Filter button */
.btn-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--bdr);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--f-body);
  color: var(--t2);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.btn-filter:hover { border-color: var(--brand); color: var(--brand); }
.btn-filter i { font-size: 13px; }

/* ==========================================================
   TABS  (All Courses | In Progress | Completed | Not Started)
   ========================================================== */
.courses-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--bdr);
}
.courses-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--f-body);
  color: var(--t3);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.courses-tab:hover { color: var(--t2); }
.courses-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ==========================================================
   KPI MINI CARDS (same as dashboard stat cards)
   ========================================================== */
.courses-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
}
.courses-stats[hidden] { display: none !important; }
/* reuses .stat-card, .stat-label, .stat-value, .stat-sub,
   .stat-card-header, .stat-icon-wrap from dashboard.css */

/* ==========================================================
   COURSE LIST (main content)
   ========================================================== */
.mc-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mc-list[hidden] { display: none !important; }

/* Each course row */
.mc-row {
  display: grid;
  grid-template-columns: 300px 1fr 220px auto;
  gap: 0;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--bdr);
  border-radius: var(--r-xl);
  margin-bottom: 12px;
  overflow: hidden;
  transition: box-shadow .15s;
}
.mc-row:hover { box-shadow: var(--sh-md); }

/* Thumbnail */
.mc-thumb-wrap {
  position: relative;
  height: 180px;
  flex-shrink: 0;
}
.mc-thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Body */
.mc-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.mc-title {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.3;
}
.mc-desc {
  font-size: 13px;
  color: var(--t2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
}
.mc-desc strong { font-weight: 700; color: var(--t1); }
.mc-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.mc-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--t3);
}
.mc-meta-item i { font-size: 12px; }
.mc-level-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mc-level-dot.beginner     { background: var(--green); }
.mc-level-dot.intermediate { background: var(--amber); }
.mc-level-dot.advanced     { background: var(--brand); }
.mc-level-label { font-size: 12.5px; font-weight: 500; }
.mc-level-label.beginner     { color: var(--green); }
.mc-level-label.intermediate { color: var(--amber); }
.mc-level-label.advanced     { color: var(--brand); }

/* Progress column */
.mc-progress-col {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  /* Single left divider that doesn't reach top/bottom edges */
  position: relative;
}
/* Centred vertical divider — only on the LEFT of the progress col */
.mc-progress-col::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;           /* starts 20% from top */
  bottom: 20%;        /* ends 20% from bottom */
  width: 1px;
  background: var(--bdr);
}
.mc-pct-label { font-size: 12px; color: var(--t3); font-weight: 500; }
.mc-pct-val {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1;
}
.mc-bar {
  height: 5px;
  background: var(--bdr);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.mc-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: var(--r-pill);
  transition: width .5s ease;
}
.mc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 0;
  background: var(--brand-bg);
  border: 1.5px solid var(--brand-bdr);
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--f-body);
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  width: 100%;
}
.mc-cta:hover { background: var(--brand); color: var(--white); }
.mc-cta i { font-size: 12px; }

/* 3-dot menu column */
.mc-menu-col {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 12px;
}
.mc-dot-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--t3);
  transition: background .12s, color .12s;
}
.mc-dot-btn:hover { background: var(--bg); color: var(--t2); }

/* ==========================================================
   BOTTOM CTA (Can't find a course?)
   ========================================================== */
.mc-bottom-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 0 4px;
}
.mc-bottom-cta-text {
  font-size: 13.5px;
  color: var(--t3);
}
.btn-explore {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: var(--brand-bg);
  border: 1.5px solid var(--brand-bdr);
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 700;
  font-family: var(--f-body);
  color: var(--brand);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-explore:hover { background: var(--brand); color: var(--white); }
.btn-explore i { font-size: 13px; }

/* ==========================================================
   RIGHT PANEL (My Courses page version)
   ========================================================== */
/* Reuses .dashboard-right, .rw, .rw-hd, .rw-title from dashboard.css */

/* Mini stat grid in right panel */
.mc-right-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 2px;
}
.mc-right-stat {
  background: var(--bg);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mc-right-stat-icon { font-size: 16px; opacity: .55; }
.mc-right-stat-icon.s-purple { color: var(--purple); }
.mc-right-stat-icon.s-blue   { color: var(--blue); }
.mc-right-stat-icon.s-green  { color: var(--green); }
.mc-right-stat-icon.s-amber  { color: var(--amber); }
.mc-right-stat-body {}
.mc-right-stat-val {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--t1);
  line-height: 1;
}
.mc-right-stat-label {
  font-size: 11px;
  color: var(--t3);
  margin-top: 1px;
}

/* Right panel tabs */
.mc-right-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--bdr);
  margin-bottom: 12px;
}
.mc-right-tab {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--f-body);
  color: var(--t3);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 7px 10px;
  margin-bottom: -1.5px;
  transition: color .12s, border-color .12s;
  white-space: nowrap;
}
.mc-right-tab:hover { color: var(--t2); }
.mc-right-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* Right panel search */
.mc-right-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.mc-right-search-wrap { position: relative; flex: 1; }
.mc-right-search-wrap i {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--t3);
  pointer-events: none;
}
.mc-right-search-input {
  width: 100%;
  padding: 7px 10px 7px 28px;
  border: 1px solid var(--bdr);
  border-radius: var(--r-pill);
  background: var(--bg);
  font-size: 12px;
  font-family: var(--f-body);
  color: var(--t1);
  outline: none;
  transition: border-color .15s;
}
.mc-right-search-input::placeholder { color: var(--t3); }
.mc-right-search-input:focus { border-color: var(--brand); }

.btn-filter-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--bdr);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--f-body);
  color: var(--t2);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.btn-filter-sm:hover { border-color: var(--brand); color: var(--brand); }

/* Right panel mini course list */
.mc-right-list { display: flex; flex-direction: column; gap: 0; }
.mc-right-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bdr);
}
.mc-right-row:last-child { border-bottom: none; }
.mc-right-thumb {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}
.mc-right-body { flex: 1; min-width: 0; }
.mc-right-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--t1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 4px;
}
.mc-right-pct {
  font-size: 11.5px;
  color: var(--t3);
  margin-bottom: 4px;
}
.mc-right-bar {
  height: 3px;
  background: var(--bdr);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: 6px;
}
.mc-right-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: var(--r-pill);
}
.mc-right-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  padding: 4px 0;
  transition: opacity .12s;
}
.mc-right-cta:hover { opacity: .75; }
.mc-right-cta i { font-size: 10px; }
.mc-right-dot-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none; background: none;
  cursor: pointer; font-size: 13px;
  color: var(--t3); display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.mc-right-dot-btn:hover { background: var(--bg); color: var(--t2); }

/* Explore more link */
.mc-right-explore {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--bdr);
  margin-top: 4px;
}
.mc-right-explore-text { font-size: 12px; color: var(--t3); display: block; margin-bottom: 6px; }
.btn-explore-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  background: var(--brand-bg);
  border: 1px solid var(--brand-bdr);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  transition: background .12s, color .12s;
}
.btn-explore-sm:hover { background: var(--brand); color: var(--white); }
.btn-explore-sm i { font-size: 11px; }

/* ==========================================================
   SKELETON LOADER for courses page
   ========================================================== */
.mc-skel-list { display: flex; flex-direction: column; gap: 12px; }
.mc-skel-row {
  display: grid;
  grid-template-columns: 300px 1fr 220px 40px;
  background: var(--white);
  border: 1px solid var(--bdr);
  border-radius: var(--r-xl);
  overflow: hidden;
  height: 180px;
}
.mc-skel-thumb { height: 100%; }
.mc-skel-body  { padding: 20px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.mc-skel-line  { border-radius: var(--r-xs); }
/* .skel animation inherited from dashboard.css */

.courses-main.ready .mc-skel-list { display: none; }

/* ==========================================================
   EMPTY STATE
   ========================================================== */
.mc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  gap: 12px;
}
.mc-empty[hidden] { display: none !important; }
.mc-empty i { font-size: 40px; color: var(--brand); opacity: .4; }
.mc-empty h2 { font-family: var(--f-display); font-size: 20px; font-weight: 700; color: var(--t1); }
.mc-empty p  { font-size: 14px; color: var(--t3); max-width: 280px; }

/* ==========================================================
   RESPONSIVE — TABLET (< 1024px)
   ========================================================== */
@media (max-width: 1023px) {
  .courses-layout {
    grid-template-columns: 1fr;
  }
  .courses-main {
    padding: 16px 16px calc(var(--mob-nav) + 20px);
  }
  /* Right panel hidden — stats shown inline */
  .mc-right-panel { display: none; }

  .courses-stats { grid-template-columns: repeat(2,1fr); }

  /* Course row: stack thumbnail above body on tablet */
  .mc-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: 160px auto auto;
  }
  .mc-thumb-wrap {
    grid-column: 1 / -1;
    height: 160px;
  }
  .mc-body {
    grid-column: 1;
    border-right: none;
    border-bottom: 1px solid var(--bdr);
  }
  .mc-progress-col {
    grid-column: 1;
    border-right: none;
    border-top: 1px solid var(--bdr);
  }
  .mc-menu-col {
    grid-column: 2;
    grid-row: 2 / 4;
    border-left: 1px solid var(--bdr);
  }

  .mc-skel-row {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 280px;
  }
  .mc-skel-thumb { height: 140px; }
}

/* ==========================================================
   RESPONSIVE — MOBILE (< 640px)
   ========================================================== */
@media (max-width: 639px) {
  .courses-page-header { flex-direction: column; align-items: stretch; }
  .courses-page-search-row { flex-direction: row; }
  .courses-search-input { width: 100%; flex: 1; }

  .courses-tabs { overflow-x: auto; }
  .courses-tab  { padding: 10px 14px; font-size: 13px; }

  .courses-stats { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .stat-card     { padding: 12px 14px; }
  .stat-value    { font-size: 26px; }

  .mc-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .mc-thumb-wrap  { height: 140px; grid-column: 1; }
  .mc-body        { grid-column: 1; border-bottom: 1px solid var(--bdr); border-right: none; }
  .mc-progress-col{ grid-column: 1; }
  .mc-menu-col    { position: absolute; top: 12px; right: 12px; }
  .mc-row         { position: relative; }

  .mc-skel-row { height: auto; grid-template-columns: 1fr; }
  .mc-skel-thumb { height: 120px; }
}


/* ==========================================================
   NO-RIGHT-PANEL variant — My Courses page
   ========================================================== */
.courses-layout--no-right {
  grid-template-columns: var(--side-w) 1fr;
}
@media (max-width: 1023px) {
  .courses-layout--no-right {
    grid-template-columns: 1fr;
  }
}

/* Hide right panel classes entirely on courses page */
.courses-page .mc-right-panel,
.courses-page .dashboard-right.mc-right-panel { display: none !important; }
