/*
 * /assets/scheduler/scheduler.css
 *
 * Styles for the Schedule tab inside Course Details (dashboard).
 * Depends on design tokens from styles.css (:root variables).
 * Does NOT override any existing selectors — all classes are namespaced .sched-*.
 */

/* ═══════════════════════════════════════════════════════════
   SCHEDULE PANEL — outer wrapper
   Two-column layout: left = recurring schedule info,
   right = fisheye lesson-dates list.
   ═══════════════════════════════════════════════════════════ */

.sched-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  overflow: visible;
}

@media (max-width: 640px) {
  .sched-panel {
    grid-template-columns: 1fr;
  }
}

/* ── Left column: recurring schedule card ──────────────────── */

.sched-info {
  background: var(--panel, #fff);
  border: 1.5px solid var(--border, #e3e6f0);
  border-radius: 18px;
  padding: 22px 22px 20px;
  box-shadow: 0 2px 10px rgba(60, 68, 120, .05);
}

.sched-info-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--muted, #6b7394);
  margin-bottom: 12px;
}

.sched-info-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sched-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sched-info-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft, rgba(66, 85, 255, .1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.sched-info-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text, #1a1d28);
  line-height: 1.4;
}

.sched-info-text em {
  font-style: normal;
  color: var(--muted, #6b7394);
  font-size: 12.5px;
  font-weight: 400;
  display: block;
  margin-top: 1px;
}

.sched-empty {
  color: var(--muted, #6b7394);
  font-size: 14px;
  font-style: italic;
}

/* ── Right column: fisheye dates list ──────────────────────── */

.sched-dates-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

.sched-dates-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .9px;
  text-transform: uppercase;
  color: var(--muted, #6b7394);
  margin-bottom: 12px;
  padding: 0 4px;
}

.sched-dates-list {
  list-style: none;
  margin: 0;
  padding: 0;
  /* allow overflow so scaled items don't clip */
  overflow: visible;
}

/* Every lesson-date item */
.sched-date-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: default;
  transition:
    transform 0.18s cubic-bezier(.34, 1.3, .7, 1),
    background 0.14s ease,
    box-shadow 0.14s ease;
  transform-origin: left center;
  will-change: transform;
  position: relative;
  z-index: 0;
}

/* Hovered item — scales up and lifts */
.sched-date-item:hover,
.sched-date-item.is-hover {
  transform: scale(1.18) translateX(4px);
  background: var(--accent-soft, rgba(66, 85, 255, .08));
  box-shadow: 0 3px 14px rgba(66, 85, 255, .13);
  z-index: 10;
}

/* Neighbours (JS-driven) — slight scale for fisheye depth */
.sched-date-item.is-near-1 {
  transform: scale(1.09) translateX(2px);
  z-index: 5;
}

.sched-date-item.is-near-2 {
  transform: scale(1.04) translateX(1px);
  z-index: 3;
}

/* Today / upcoming highlight — fit-content so the strip doesn't stretch full width */
.sched-date-item.is-today {
  background: rgba(66, 85, 255, .12);
  border: 1px solid rgba(66, 85, 255, .25);
  width: fit-content;
  padding-right: 14px;
}

.sched-date-item.is-next {
  background: rgba(0, 201, 142, .10);
  border: 1px solid rgba(0, 201, 142, .25);
  width: fit-content;
  padding-right: 14px;
}

.sched-date-item.is-past {
  opacity: .55;
}

/* Dot indicator */
.sched-date-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--border, #c8cde4);
  transition: background .14s ease;
}

.sched-date-item.is-next .sched-date-dot {
  background: #00c98e;
}

.sched-date-item.is-today .sched-date-dot {
  background: var(--accent, #4255ff);
}

.sched-date-item.is-past .sched-date-dot {
  background: #c8cde4;
}

/* Date text */
.sched-date-text {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text, #1a1d28);
  flex: 1;
  white-space: nowrap;
  transition: color .14s ease, font-size .18s ease;
  line-height: 1.6;
}

.sched-date-item.is-next .sched-date-text {
  color: #007a56;
  font-weight: 700;
}

.sched-date-item.is-today .sched-date-text {
  color: var(--accent, #4255ff);
  font-weight: 700;
}

/* Pill badges */
.sched-date-pill {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.5;
  flex-shrink: 0;
}

.sched-date-pill--today {
  background: var(--accent-soft, rgba(66, 85, 255, .12));
  color: var(--accent, #4255ff);
}

.sched-date-pill--next {
  background: rgba(0, 201, 142, .15);
  color: #007a56;
}

/* Scroll container — no height cap, full list always visible */
.sched-dates-scroll {
  overflow: visible;
  padding-right: 48px;
  /* room for fisheye scale+translate so items dont clip at right edge */
}


/* Count badge below the list */
.sched-dates-count {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted, #6b7394);
  padding: 0 6px;
  font-weight: 500;
}

/* Loading shimmer */
.sched-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  color: var(--muted, #6b7394);
  font-size: 13.5px;
}

.sched-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, #4255ff);
  animation: schedPulse 1s ease-in-out infinite;
}

.sched-loading-dot:nth-child(2) {
  animation-delay: .16s;
}

.sched-loading-dot:nth-child(3) {
  animation-delay: .32s;
}

@keyframes schedPulse {

  0%,
  100% {
    opacity: .25;
    transform: scale(.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}



/* ═══════════════════════════════════════════════════════════
   NEXT-LESSON COUNTDOWN BADGE
   Rendered inside .course-badge.course-right, before the
   payment badge. Inherits the portal's pill badge shape.
   ═══════════════════════════════════════════════════════════ */

.sched-next-lesson-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(0, 170, 120, .28);
  background: rgba(0, 201, 142, .10);
  color: #006b4f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: none;
  white-space: nowrap;
  line-height: 1;
  opacity: .88;
  margin-right: 6px;
  transition: opacity .14s ease, background .14s ease;
  cursor: default;
}

.sched-next-lesson-badge:hover {
  opacity: 1;
  background: rgba(0, 201, 142, .18);
}

/* Icon — the ⏱ glyph, slightly smaller than label text */
.sched-next-lesson-badge .sched-nlb-icon {
  font-size: 10px;
  line-height: 1;
  flex-shrink: 0;
}

/* Label — "in 4d 3h" / "tomorrow · 17:00" / "starting now" */
.sched-next-lesson-badge .sched-nlb-label {
  font-size: 12px;
  font-weight: 700;
}

/* ── Urgency tiers ───────────────────────────────────────── */

/* Within 24 hours — slightly warmer amber tint */
.sched-next-lesson-badge.is-soon {
  background: rgba(244, 161, 0, .10);
  border-color: rgba(224, 144, 0, .32);
  color: #6b3d00;
}

.sched-next-lesson-badge.is-soon:hover {
  background: rgba(244, 161, 0, .18);
}

/* Within 1 hour — soft accent blue, matches portal --accent */
.sched-next-lesson-badge.is-imminent {
  background: rgba(66, 85, 255, .10);
  border-color: rgba(66, 85, 255, .30);
  color: var(--accent, #4255ff);
  font-weight: 700;
}

.sched-next-lesson-badge.is-imminent:hover {
  background: rgba(66, 85, 255, .16);
}

/* "Starting now" (< 1 min) — pulse to catch attention */
.sched-next-lesson-badge.is-now {
  background: rgba(66, 85, 255, .14);
  border-color: rgba(66, 85, 255, .40);
  color: var(--accent, #4255ff);
  font-weight: 800;
  animation: nlbPulse 2s ease-in-out infinite;
}

@keyframes nlbPulse {

  0%,
  100% {
    opacity: .75;
  }

  50% {
    opacity: 1;
  }
}

/* ── Responsive — on very narrow cards the badge wraps below
   the payment badge gracefully (no truncation) ───────────── */
@media (max-width: 360px) {
  .sched-next-lesson-badge {
    font-size: 10px;
    padding: 4px 9px;
    margin-right: 4px;
  }
}