/* ═══ STUDIOHAUS PORTAL — Onboarding Course Styles ═══ */

/* ── Layout: sidebar + content ── */
.ob-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 100px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ob-sidebar {
  background: rgba(0,0,0,0.15);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding-bottom: 20px;
}

.ob-sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
}

.ob-sidebar-title {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* ── Mini progress bar ── */
.ob-progress-mini {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.ob-progress-mini-bar {
  height: 100%;
  background: linear-gradient(90deg, #579bfc, #00c875);
  border-radius: 3px;
  transition: width 0.5s ease;
}
.ob-progress-text {
  font-size: 0.68rem;
  color: var(--text-40);
}

/* ── Module list ── */
.ob-module-list {
  padding: 8px 0;
}
.ob-module {
  margin-bottom: 4px;
}
.ob-module-active > .ob-module-header {
  background: rgba(87,155,252,0.06);
}
.ob-module-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  transition: background 0.15s;
}
.ob-module-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(87,155,252,0.15);
  color: #579bfc;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ob-module-info {
  flex: 1;
  min-width: 0;
}
.ob-module-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-module-meta {
  font-size: 0.65rem;
  color: var(--text-40);
  margin-top: 1px;
}
.ob-check {
  color: #00c875;
  font-size: 0.8rem;
  font-weight: 700;
}

/* ── Lesson list in sidebar ── */
.ob-lesson-list {
  padding: 0 0 0 26px;
}
.ob-lesson-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-left: 2px solid transparent;
}
.ob-lesson-item:hover {
  background: rgba(255,255,255,0.03);
}
.ob-lesson-active {
  background: rgba(87,155,252,0.08);
  border-left-color: #579bfc;
}
.ob-lesson-done .ob-lesson-indicator {
  background: #00c875;
  color: #fff;
  border-color: #00c875;
}
.ob-lesson-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  font-size: 0.58rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-40);
  transition: all 0.2s;
}
.ob-lesson-title {
  font-size: 0.75rem;
  color: var(--text-60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-lesson-active .ob-lesson-title {
  color: var(--text);
  font-weight: 500;
}

/* ── Main content area ── */
.ob-content {
  padding: 28px 36px;
  overflow-y: auto;
}

.ob-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-40);
  margin-bottom: 12px;
}
.ob-breadcrumb-sep {
  color: var(--text-20);
}

.ob-lesson-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 24px;
}

/* ── Video embed ── */
.ob-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  margin-bottom: 24px;
}
.ob-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Text content ── */
.ob-text-content {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--text-60);
  margin-bottom: 28px;
}
.ob-text-content h1, .ob-text-content h2, .ob-text-content h3 {
  color: var(--text);
  margin: 1.5em 0 0.5em;
}
.ob-text-content p { margin: 0 0 1em; }
.ob-text-content ul, .ob-text-content ol { padding-left: 1.5em; margin: 0 0 1em; }
.ob-text-content li { margin-bottom: 0.3em; }
.ob-text-content strong { color: var(--text); }
.ob-text-content a { color: #579bfc; }

/* ── Lesson actions (prev/next + complete) ── */
.ob-lesson-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}
.ob-action-center {
  display: flex;
  align-items: center;
}
.ob-complete-btn {
  padding: 10px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ob-complete-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0,200,117,0.25);
}
.ob-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 100px;
  background: #00c87515;
  color: #00c875;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ob-nav-btn {
  font-size: 0.78rem;
  padding: 8px 18px;
}

/* ── Empty state ── */
.ob-empty {
  text-align: center;
  padding: 60px 20px;
}
.ob-empty-icon {
  margin-bottom: 16px;
}

/* ── Admin: Progress bar ── */
.ob-admin-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  max-width: 140px;
}
.ob-admin-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── Admin: Active tab styling ── */
.ob-tab-active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* ── Admin: Course Builder ── */
.ob-builder-module {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.ob-builder-module-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(87,155,252,0.04);
  border-bottom: 1px solid var(--border);
}
.ob-builder-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.ob-builder-lesson:last-child { border-bottom: none; }
.ob-builder-lesson:hover { background: rgba(255,255,255,0.02); }
.ob-builder-lesson-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-input);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-40);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Light theme overrides ── */
[data-theme="light"] .ob-sidebar { background: rgba(0,0,0,0.03); }
[data-theme="light"] .ob-progress-mini { background: rgba(0,0,0,0.06); }
[data-theme="light"] .ob-lesson-item:hover { background: rgba(0,0,0,0.03); }
[data-theme="light"] .ob-lesson-active { background: rgba(87,155,252,0.08); }
[data-theme="light"] .ob-admin-progress-bar { background: rgba(0,0,0,0.06); }
[data-theme="light"] .ob-builder-module-header { background: rgba(87,155,252,0.04); }
[data-theme="light"] .ob-builder-lesson:hover { background: rgba(0,0,0,0.02); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .ob-layout {
    grid-template-columns: 1fr;
  }
  .ob-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 200px;
  }
  .ob-content {
    padding: 20px 16px;
  }
}

/* ── Entrance animation ── */
.ob-content {
  animation: obFadeIn 0.3s ease;
}
@keyframes obFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
