/* ─────────────────────────────────────────────────────────────
   VidyaForce — Course Page Styles
   Used by: revenuecloudcourse.html (and future course pages)
   Powered by Satavahana LLC
   ───────────────────────────────────────────────────────────── */

/* ── Layout ──────────────────────────────────────────────────── */
body { overflow: hidden; }

.course-page {
  display: flex;
  height: calc(100vh - 56px);
  overflow: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  width: 330px;
  min-width: 280px;
  background: var(--navy-deep, #070D1A);
  border-right: 1px solid var(--navy-border, #1A2E50);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--navy-border, #1A2E50);
  flex-shrink: 0;
  background: var(--navy-deep, #070D1A);
}

.sidebar-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: rgba(240,244,255,0.3);
  margin-bottom: 12px;
  transition: color 0.15s;
  text-decoration: none;
}
.sidebar-back:hover { color: rgba(240,244,255,0.7); }

.sidebar-cert-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5ac8fa;
  margin-bottom: 4px;
}

.sidebar-course-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #F0F4FF;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.sidebar-exam-info {
  font-size: 0.65rem;
  color: rgba(240,244,255,0.3);
  margin-bottom: 12px;
}

.sidebar-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(240,244,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E8FFF, #5ac8fa);
  border-radius: 2px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.62rem;
  color: rgba(240,244,255,0.3);
  white-space: nowrap;
}

/* ── Module list ─────────────────────────────────────────────── */
.sidebar-modules {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 20px;
}
.sidebar-modules::-webkit-scrollbar { width: 3px; }
.sidebar-modules::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

.module-group {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.module-header:hover { background: rgba(255,255,255,0.03); }

.module-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.module-num {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.module-header-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(240,244,255,0.7);
  line-height: 1.3;
}

.module-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

.module-weight {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(240,244,255,0.3);
  letter-spacing: 0.05em;
}

.module-free-badge {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #00e676;
  background: rgba(0,200,83,0.1);
  border: 1px solid rgba(0,200,83,0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.module-lock-badge {
  font-size: 0.65rem;
  color: rgba(240,244,255,0.3);
}

.module-chevron {
  font-size: 0.7rem;
  color: rgba(240,244,255,0.3);
  transition: transform 0.2s;
}
.module-group.collapsed .module-chevron { transform: rotate(-90deg); }
.module-group.collapsed .module-lessons { display: none; }

/* ── Lesson items ────────────────────────────────────────────── */
.lesson-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 24px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 2px solid transparent;
}
.lesson-item:hover          { background: rgba(255,255,255,0.03); }
.lesson-item.active         { background: rgba(30,143,255,0.07); border-left-color: #1E8FFF; }
.lesson-item.locked         { opacity: 0.7; }
.lesson-item.locked:hover   { opacity: 1; background: rgba(255,255,255,0.03); }

.lesson-status {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.55rem;
  flex-shrink: 0;
}
.lesson-status.free    { background: rgba(30,143,255,0.1);  border: 1px solid rgba(30,143,255,0.2);  color: #1E8FFF; }
.lesson-status.playing { background: rgba(30,143,255,0.2);  border: 1px solid rgba(30,143,255,0.4);  color: #1E8FFF; }
.lesson-status.locked  { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: rgba(240,244,255,0.3); font-size: 0.6rem; }

.lesson-info { flex: 1; min-width: 0; }

.lesson-title {
  font-size: 0.76rem;
  font-weight: 400;
  color: rgba(240,244,255,0.5);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lesson-item.active .lesson-title { color: #F0F4FF; font-weight: 500; }

.lesson-meta {
  font-size: 0.62rem;
  color: rgba(240,244,255,0.3);
  margin-top: 2px;
}

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.course-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: #0B1528;
  min-width: 0;
}
.course-main::-webkit-scrollbar { width: 5px; }
.course-main::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
}

/* ── Video area ──────────────────────────────────────────────── */
.video-area {
  background: #000;
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 58vh;
  flex-shrink: 0;
}
.video-area iframe {
  width: 100%; height: 100%; border: none; display: block;
}

/* ── Lock overlay ────────────────────────────────────────────── */
.video-lock {
  position: absolute;
  inset: 0;
  background: rgba(7,13,26,0.96);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 32px 24px;
}
.video-lock.show { display: flex; }

.lock-icon-wrap {
  width: 64px; height: 64px;
  background: rgba(30,143,255,0.08);
  border: 1px solid rgba(30,143,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}

.lock-lesson-name {
  font-size: 0.75rem;
  color: #1E8FFF;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lock-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #F0F4FF;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.lock-sub {
  font-size: 0.85rem;
  color: rgba(240,244,255,0.5);
  max-width: 380px;
  line-height: 1.65;
}

.lock-perks {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.lock-perk {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: rgba(240,244,255,0.5);
}

.lock-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-lock-primary {
  background: linear-gradient(135deg, #1E8FFF, #1270CC);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(30,143,255,0.3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-lock-primary:hover {
  box-shadow: 0 6px 24px rgba(30,143,255,0.45);
  transform: translateY(-1px);
}

.btn-lock-ghost {
  background: transparent;
  color: rgba(240,244,255,0.5);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-lock-ghost:hover {
  color: #F0F4FF;
  border-color: rgba(255,255,255,0.2);
}

/* ── Lesson panel ────────────────────────────────────────────── */
.lesson-panel {
  padding: 28px 36px 48px;
  max-width: 820px;
}

.lesson-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: rgba(240,244,255,0.3);
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lesson-breadcrumb .bc-module {
  color: #5ac8fa;
  font-weight: 600;
}
.lesson-breadcrumb .bc-weight {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: rgba(240,244,255,0.3);
}

.lesson-heading {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #F0F4FF;
  margin-bottom: 12px;
  line-height: 1.25;
}

.lesson-desc {
  font-size: 0.9rem;
  color: rgba(240,244,255,0.7);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 20px;
  max-width: 680px;
}

.lesson-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.lesson-tag {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(240,244,255,0.5);
}

.lesson-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  gap: 12px;
}

.btn-lesson-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(240,244,255,0.5);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-lesson-nav:hover {
  background: rgba(30,143,255,0.08);
  border-color: rgba(30,143,255,0.25);
  color: #F0F4FF;
}
.btn-lesson-nav.primary {
  background: linear-gradient(135deg, #1E8FFF, #1270CC);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 14px rgba(30,143,255,0.25);
}
.btn-lesson-nav.primary:hover {
  box-shadow: 0 6px 20px rgba(30,143,255,0.4);
  transform: translateY(-1px);
}

/* ── Clerk nav overrides ─────────────────────────────────────── */
.welcome-msg {
  font-size: 0.78rem;
  color: rgba(240,244,255,0.5);
  margin-right: 6px;
}
#clerk-user-button { display: flex; align-items: center; }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { overflow: auto; }
  .course-page { flex-direction: column; height: auto; }
  .sidebar {
    width: 100%;
    max-height: 50vh;
    border-right: none;
    border-bottom: 1px solid #1A2E50;
  }
  .video-area { max-height: none; aspect-ratio: 16/9; }
  .lesson-panel { padding: 20px; }
}

/* ─── ENROLLMENT BANNER ──────────────────────────────────────── */
#enrollBanner { margin-bottom: 24px; }

.enroll-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.enroll-banner--new {
  background: linear-gradient(135deg, rgba(30,143,255,0.12), rgba(30,143,255,0.06));
  border: 1px solid rgba(30,143,255,0.25);
}

.enroll-banner--enrolled {
  background: linear-gradient(135deg, rgba(0,200,83,0.1), rgba(0,200,83,0.05));
  border: 1px solid rgba(0,200,83,0.2);
}

.enroll-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.enroll-icon { font-size: 1.4rem; }

.enroll-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #F0F4FF;
  margin-bottom: 2px;
}

.enroll-sub {
  font-size: 0.75rem;
  color: rgba(240,244,255,0.5);
}

.btn-enroll-now {
  background: linear-gradient(135deg, #1E8FFF, #1270CC);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(30,143,255,0.3);
}
.btn-enroll-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,143,255,0.4);
}

.btn-continue {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: white;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,200,83,0.3);
}
.btn-continue:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,200,83,0.4);
}

/* Done lesson status */
.lesson-status.done {
  background: rgba(0,200,83,0.15);
  border: 1px solid rgba(0,200,83,0.3);
  color: #00e676;
  font-size: 0.65rem;
  font-weight: 700;
}

/* ─── HANDOUT & QUIZ TAGS ────────────────────────────────────── */
.lesson-tag--quiz {
  background: rgba(255,159,10,0.12) !important;
  border-color: rgba(255,159,10,0.25) !important;
  color: #ff9f0a !important;
}

.lesson-tag--handout {
  background: rgba(30,143,255,0.12) !important;
  border-color: rgba(30,143,255,0.25) !important;
  color: #1E8FFF !important;
  cursor: pointer;
  transition: all 0.2s;
}
.lesson-tag--handout:hover {
  background: rgba(30,143,255,0.2) !important;
  transform: translateY(-1px);
}
