/* ====================================================================
   BIONUL EDTECH PLATFORM - LIVE CLASSES LIST STYLES
   css/live.css (Dedicated to live.html - Mobile-First Redesign)
   Matched to Reference Screenshot (Left Screen)
   ==================================================================== */

/* --- Mobile Top Header --- */
.live-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 14px 2px;
}

.live-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.live-header-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}

.live-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-heading);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.header-action-icon-btn:hover,
.header-action-icon-btn.active {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

.header-action-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

/* --- Inline Search & Calendar Panels (Collapsible) --- */
.live-collapsible-panel {
  display: none;
  background-color: #FFFFFF;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.2s ease-out forwards;
}

.live-collapsible-panel.open {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.search-input-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.92rem;
  color: var(--text-heading);
}

.search-input-box input:focus {
  outline: none;
}

.calendar-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.calendar-picker-row::-webkit-scrollbar {
  display: none;
}

.calendar-date-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background-color: var(--surface-subtle);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.calendar-date-chip.active {
  background-color: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* --- Filter Tabs (Upcoming, Live Now, Completed) --- */
.live-filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.live-filter-tabs::-webkit-scrollbar {
  display: none;
}

.live-filter-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  background-color: var(--pastel-purple);
  color: var(--text-heading);
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.live-filter-tab:hover {
  border-color: var(--primary-border);
  color: var(--primary);
}

.live-filter-tab.active {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.3);
}

.live-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background-color: #EF4444;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

/* --- Next Live Class Hero Card --- */
.next-live-hero-card {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 60%, #E0E7FF 100%);
  border: 1.5px solid #DDD6FE;
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
}

.hero-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.hero-tag-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background-color: #FFFFFF;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.hero-status-pill.live-now {
  background-color: #FEE2E2;
  color: #DC2626;
}

.hero-live-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 6px;
}

.hero-teacher-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-schedule-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--text-body);
  font-weight: 600;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.hero-schedule-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hero-schedule-item svg {
  width: 15px;
  height: 15px;
  fill: var(--primary);
}

.hero-countdown-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero-live-glowing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #DC2626;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
  animation: liveCardPulseGlow 2s infinite ease-in-out;
}

.live-glowing-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #EF4444;
  box-shadow: 0 0 8px #EF4444;
  animation: liveGlowDot 1.4s infinite ease-in-out;
}

@keyframes liveCardPulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
  50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.45); }
}

@keyframes liveGlowDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.75; }
}

.hero-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--primary-gradient);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(91, 61, 245, 0.35);
  transition: all var(--transition-fast);
  width: fit-content;
}

.hero-join-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(91, 61, 245, 0.42);
}

.hero-join-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.hero-illustration-box {
  width: 105px;
  height: 105px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* --- Section Headings --- */
.live-section-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-heading);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Horizontal Live Class Mobile Card --- */
.live-class-card {
  background-color: var(--surface-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  transition: all var(--transition-fast);
}

.live-class-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-border);
}

.card-top-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-indicator-badge.live {
  color: #DC2626;
}

.status-indicator-badge.upcoming {
  color: var(--primary);
  background-color: var(--pastel-purple);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.status-indicator-badge.completed {
  color: var(--text-muted);
  background-color: var(--surface-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
}

.time-range-pill {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.live-card-body {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 12px;
}

.live-card-thumbnail {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background-color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-live-tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 6px;
  background-color: #EF4444;
  color: #FFFFFF;
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.live-thumb-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4326D8 0%, #1E1B4B 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  padding: 6px;
  text-align: center;
}

.live-thumb-fallback svg {
  width: 24px;
  height: 24px;
  fill: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
}

.live-thumb-fallback span {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.live-class-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-class-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 3px;
}

.live-class-teacher {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.live-card-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.btn-join-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(91, 61, 245, 0.3);
  transition: all var(--transition-fast);
}

.btn-join-live:hover {
  background-color: var(--primary-dark);
}

.btn-remind-me {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  color: var(--primary);
  border: 1.5px solid var(--primary-border);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-remind-me:hover,
.btn-remind-me.reminded {
  background-color: var(--primary-light);
  color: var(--primary);
}

.btn-remind-me svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.btn-watch-recording {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background-color: #FFFFFF;
  color: var(--primary);
  border: 1.5px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-watch-recording:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-border);
}

/* --- Pulse dot for Live Now --- */
.pulse-dot-red {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: #EF4444;
  border-radius: 50%;
  animation: liveDotBlink 1.4s infinite;
}

@keyframes liveDotBlink {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
  100% { opacity: 1; transform: scale(1); }
}

/* Skeleton Loading for Live Cards */
.live-skeleton-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 16px;
  margin-bottom: 14px;
}

.live-skeleton-thumb {
  width: 120px;
  height: 68px;
  border-radius: 12px;
}

@media (max-width: 360px) {
  .live-card-thumbnail {
    width: 95px;
    min-width: 95px;
  }
  .next-live-hero-card {
    grid-template-columns: 1fr;
  }
  .hero-illustration-box {
    display: none;
  }
}
