/* ─── Live class: learner badge, join card and following the teacher ──────── */

.cl-badge {
  position: fixed; right: 14px; bottom: 14px; z-index: 900;
  display: flex; align-items: center; gap: 0.45rem;
  background: #1a2744; color: #fff; border-radius: 100px;
  padding: 0.45rem 0.6rem 0.45rem 0.75rem;
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600;
  box-shadow: 0 8px 24px rgba(26,39,68,0.28);
}
.cl-badge .cl-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  animation: cl-pulse 1.8s ease-in-out infinite;
}
@keyframes cl-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.cl-badge .cl-call {
  background: #c9a227; color: #1a2744; text-decoration: none;
  border-radius: 100px; padding: 0.2rem 0.6rem;
  font-size: 0.76rem; font-weight: 800; white-space: nowrap;
}
.cl-badge .cl-call:hover { background: #f0c848; }
.cl-badge .cl-leave {
  background: transparent; border: none; color: rgba(255,255,255,0.55);
  cursor: pointer; font-size: 0.9rem; line-height: 1; padding: 0 0.2rem;
}
.cl-badge .cl-leave:hover { color: #fff; }

.cl-join {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(26,39,68,0.78);
  display: flex; align-items: center; justify-content: center; padding: 1.2rem;
}
.cl-join-card {
  background: #f8f5f0; border-radius: 18px; width: 100%; max-width: 400px;
  padding: 1.7rem 1.6rem 1.4rem; text-align: center;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}
.cl-join-room {
  font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: #c9a227; font-weight: 800; margin: 0 0 0.2rem;
}
.cl-join-card h2 {
  font-family: 'Literata', serif; color: #1a2744;
  font-size: 1.5rem; margin: 0 0 0.5rem;
}
.cl-join-note { font-size: 0.86rem; color: #7a7a7a; line-height: 1.5; margin: 0 0 1rem; }
.cl-join-input {
  width: 100%; padding: 0.7rem 0.9rem; font-family: inherit; font-size: 1rem;
  border: 1.5px solid #e0dbd0; border-radius: 10px; background: #fff; color: #2c2c2c;
}
.cl-join-input:focus { outline: none; border-color: #c9a227; }
.cl-join-btn {
  width: 100%; margin-top: 0.7rem; padding: 0.75rem;
  background: #c9a227; color: #1a2744; border: none; border-radius: 10px;
  font-family: inherit; font-weight: 800; font-size: 0.98rem; cursor: pointer;
}
.cl-join-btn:hover:not(:disabled) { background: #f0c848; }
.cl-join-btn:disabled { opacity: 0.6; cursor: default; }
.cl-join-skip {
  background: none; border: none; color: #7a7a7a; font-family: inherit;
  font-size: 0.82rem; margin-top: 0.6rem; cursor: pointer; text-decoration: underline;
}

/* Group list: the learner taps their own name instead of typing one. */
.cl-seats { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 0.3rem; }
.cl-seat {
  width: 100%; padding: 0.7rem 0.9rem; cursor: pointer;
  background: #fff; border: 1.5px solid #e0dbd0; border-radius: 10px;
  font-family: inherit; font-size: 1rem; font-weight: 600; color: #1a2744;
  transition: border-color 0.15s, background 0.15s;
}
.cl-seat:hover:not(:disabled) { border-color: #c9a227; background: #fffdf7; }
.cl-seat:disabled { opacity: 0.55; cursor: default; }
.cl-seat--known {
  background: #c9a227; border-color: #c9a227; color: #1a2744; font-weight: 800;
}
.cl-seat--known:hover:not(:disabled) { background: #f0c848; border-color: #f0c848; }
.cl-seat-taken { font-size: 0.78rem; font-weight: 500; color: #7a7a7a; margin-left: 0.35rem; }

/* ─── Chapter page: what to do before the lesson with a teacher ──────────── */
.prep-box {
  background: #fff; border: 1.5px solid var(--gold, #c9a227);
  border-radius: 14px; padding: 1.2rem 1.4rem; margin: 0 0 1.6rem;
}
.prep-label {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: #c9a227; font-weight: 800; margin: 0 0 0.4rem;
}
/* Folded by default: it is homework for class, not part of the reading. */
details.prep-box { padding: 0 1.4rem; }
details.prep-box[open] { padding-bottom: 1.2rem; }
details.prep-box > summary.prep-label {
  list-style: none; cursor: pointer; margin: 0 -1.4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.4rem; border-radius: 14px;
}
details.prep-box > summary.prep-label::-webkit-details-marker { display: none; }
details.prep-box > summary.prep-label::after {
  content: ''; flex-shrink: 0; width: 0.5rem; height: 0.5rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg); transition: transform 0.2s ease;
}
details.prep-box[open] > summary.prep-label::after { transform: translateY(25%) rotate(-135deg); }
details.prep-box > summary.prep-label:focus-visible { outline: 2px solid #1a2744; outline-offset: 2px; }
details.prep-box[open] > summary.prep-label { padding-bottom: 0.4rem; }
.prep-intro { font-size: 0.95rem; color: #7a7a7a; margin: 0 0 0.7rem; line-height: 1.55; }
.prep-list { margin: 0 0 0.8rem 1.1rem; }
.prep-list li { font-size: 0.97rem; margin-bottom: 0.3rem; color: #2c2c2c; }
.prep-hook {
  background: #f8f5f0; border-left: 3px solid #1a2744; border-radius: 0 8px 8px 0;
  padding: 0.6rem 0.9rem; margin: 0; font-size: 0.95rem;
}

/* ─── Following the teacher ──────────────────────────────────────────────────
 * The learner's page is scrolled by somebody else, which is only tolerable if
 * taking control back is instant. Scrolling by hand stops the following and
 * raises this; tapping it hands the page back to the teacher.
 */
.cl-catchup {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 4.6rem; z-index: 940;
  background: #c9a227; color: #1a2744; border: none; border-radius: 100px;
  padding: 0.5rem 1.1rem; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 0.84rem; font-weight: 800;
  box-shadow: 0 10px 28px rgba(26,39,68,0.32);
  animation: cl-rise 0.25s ease-out;
}
.cl-catchup:hover { background: #f0c848; }
@keyframes cl-rise { from { opacity: 0; transform: translate(-50%, 0.6rem); } }

/* What the teacher prepared for themselves is not part of the lesson the group
   is being shown, so it goes away for everyone who joined as a learner. */
.vv-learner .teacher-notes,
.vv-learner .tb-bar { display: none !important; }

@media print { .cl-catchup, .cl-badge { display: none; } }
