/* ════════════════════════════════════════════════════════════════════
   LIVE SESSION — shared CSS
   Dark academia palette matching existing apps.  Scoped with `ls-`
   class prefix so nothing collides with per-app styles.
   ════════════════════════════════════════════════════════════════════ */

/* ─── Login screen ──────────────────────────────────────────── */
#ls-screen-login {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, #0a0e1a 0%, #0f1220 100%);
  color: #e4dfd0;
  font-family: 'EB Garamond', Georgia, serif;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 9000;
}
#ls-screen-login.hidden { display: none; }

#ls-screen-login .ls-lbox {
  background: rgba(20, 24, 42, 0.82);
  border: 1.5px solid #2a2e44;
  border-radius: 14px;
  padding: 36px 32px 28px;
  max-width: 520px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

#ls-screen-login .ls-brand {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: #c9941a;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
#ls-screen-login h1 {
  font-family: 'Cinzel', serif;
  color: #e8b830;
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0 0 22px;
  font-weight: 500;
}

#ls-screen-login .ls-tabs {
  display: flex; gap: 4px;
  background: rgba(10,14,26,0.5);
  padding: 4px; border-radius: 10px;
  margin-bottom: 20px;
}
#ls-screen-login .ls-tab {
  flex: 1; padding: 10px 14px;
  background: transparent; color: #a9a499;
  border: none; border-radius: 7px;
  font-family: inherit; font-size: 0.95rem;
  cursor: pointer; transition: all 0.2s;
}
#ls-screen-login .ls-tab.active {
  background: rgba(232,184,48,0.15);
  color: #e8b830;
  font-weight: 600;
}
#ls-screen-login .ls-panel { display: block; }
#ls-screen-login .ls-panel.hidden { display: none; }

#ls-screen-login .ls-desc {
  color: #a9a499;
  font-size: 0.98rem;
  margin: 0 0 16px;
  line-height: 1.45;
}
#ls-screen-login .ls-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: #a9a499;
  margin-top: 12px;
  margin-bottom: 6px;
  text-transform: uppercase;
}
#ls-screen-login .ls-input {
  width: 100%;
  background: rgba(10,14,26,0.7);
  border: 1.5px solid #3a3e54;
  border-radius: 7px;
  color: #e4dfd0;
  padding: 11px 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.05rem;
  outline: none;
  box-sizing: border-box;
}
#ls-screen-login .ls-input:focus { border-color: #e8b830; }
#ls-screen-login .ls-input.ls-name-input { text-transform: none; font-family: inherit; }
#ls-screen-login .ls-input.ls-code-input { text-transform: uppercase; letter-spacing: 0.15em; font-weight: 600; }

#ls-screen-login .ls-hint {
  color: #7a7a7a;
  font-size: 0.82rem;
  margin: 8px 0 0;
  line-height: 1.5;
}

#ls-screen-login .ls-btn {
  background: #e8b830; color: #1a1e2e;
  border: none; border-radius: 7px;
  padding: 12px 20px; font-size: 1rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.2s;
}
#ls-screen-login .ls-btn:hover { background: #d4a020; }
#ls-screen-login .ls-btn-ghost {
  background: transparent;
  color: #e8b830;
  border: 1.5px solid #c9941a;
}
#ls-screen-login .ls-btn-ghost:hover { background: rgba(232,184,48,0.08); }
#ls-screen-login .ls-btn-block { width: 100%; margin-top: 14px; }

#ls-screen-login .ls-t-sec {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #2a2e44;
}
#ls-screen-login .ls-t-sec-ttl {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  color: #e8b830;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

#ls-screen-login .ls-err {
  color: #f87171;
  font-size: 0.9rem;
  margin-top: 14px;
  min-height: 1.2em;
  text-align: center;
}

#ls-screen-login .ls-env-banner {
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  color: #7a7a7a;
  margin-top: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* PIN dialog */
#ls-pin-overlay {
  position: fixed; inset: 0;
  background: rgba(10,14,26,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 9100;
}
#ls-pin-overlay.hidden { display: none; }
#ls-pin-overlay .ls-pin-box {
  background: #1a1e2e;
  border: 1.5px solid #2a2e44;
  border-radius: 12px;
  padding: 26px 28px;
  max-width: 380px; width: 100%;
  color: #e4dfd0;
  font-family: 'EB Garamond', Georgia, serif;
}
#ls-pin-overlay h3 { color: #e8b830; font-family: 'Cinzel', serif; margin: 0 0 10px; font-size: 1.25rem; font-weight: 500; }
#ls-pin-overlay p { color: #a9a499; margin: 0 0 14px; line-height: 1.5; font-size: 0.94rem; }
#ls-pin-overlay input {
  width: 100%;
  background: rgba(10,14,26,0.7);
  border: 1.5px solid #3a3e54;
  border-radius: 7px;
  color: #e4dfd0;
  padding: 12px 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  outline: none;
  box-sizing: border-box;
}
#ls-pin-overlay input:focus { border-color: #e8b830; }
#ls-pin-overlay .ls-pin-buttons { display: flex; gap: 10px; margin-top: 16px; }
#ls-pin-overlay button { flex: 1; }

/* ─── Session-created confirmation screen ─────────────────── */
#ls-screen-session-created {
  position: fixed; inset: 0;
  background: linear-gradient(180deg, #0a0e1a 0%, #0f1220 100%);
  color: #e4dfd0;
  font-family: 'EB Garamond', Georgia, serif;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 9000;
}
#ls-screen-session-created.hidden { display: none; }
#ls-screen-session-created .ls-sess-box {
  background: rgba(20,24,42,0.82);
  border: 1.5px solid #e8b830;
  border-radius: 14px;
  padding: 36px 32px;
  max-width: 520px; width: 100%;
  text-align: center;
}
#ls-screen-session-created h2 {
  font-family: 'Cinzel', serif; color: #e8b830; font-size: 1.3rem;
  margin: 0 0 8px; font-weight: 500;
}
#ls-screen-session-created .ls-sess-code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 3.4rem;
  letter-spacing: 0.25em;
  color: #e8b830;
  margin: 14px 0;
  font-weight: 700;
  user-select: all;
}
#ls-screen-session-created .ls-sess-url {
  color: #a9a499;
  font-size: 0.92rem;
  margin: 6px 0 20px;
  font-family: 'IBM Plex Mono', monospace;
  word-break: break-all;
}
#ls-screen-session-created .ls-sess-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
#ls-screen-session-created button {
  background: #e8b830; color: #1a1e2e; border: none;
  padding: 11px 22px; border-radius: 7px; cursor: pointer;
  font-family: inherit; font-size: 0.98rem; font-weight: 600;
}
#ls-screen-session-created button.ls-btn-ghost {
  background: transparent; color: #e8b830; border: 1.5px solid #c9941a;
}

/* ─── Teacher banner (shows at top while logged in as teacher) ─ */
#ls-teacher-banner {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgba(232,184,48,0.12);
  border-bottom: 1px solid #c9941a;
  color: #e8b830;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
  padding: 7px 14px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 8000;
}
#ls-teacher-banner.hidden { display: none; }
#ls-teacher-banner button {
  background: transparent; color: #e8b830;
  border: 1px solid #c9941a; border-radius: 4px;
  padding: 4px 10px; font-family: inherit; font-size: 0.82rem;
  cursor: pointer; margin-left: 8px;
}
#ls-teacher-banner button:hover { background: rgba(232,184,48,0.15); }

/* Student-side "watching" indicator */
#ls-watching-indicator {
  position: fixed; top: 10px; right: 10px;
  background: rgba(239,68,68,0.9);
  color: white;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 8500;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
#ls-watching-indicator.show { opacity: 1; }
#ls-watching-indicator::before {
  content: '● ';
  animation: ls-pulse 1.2s infinite;
}
@keyframes ls-pulse {
  0%, 100% { opacity: 0.4; } 50% { opacity: 1; }
}

/* ─── Live Wall (teacher's class grid) ────────────────────── */
#ls-screen-live-wall {
  position: fixed; inset: 0;
  background: #0a0e1a;
  color: #e4dfd0;
  font-family: 'EB Garamond', Georgia, serif;
  display: flex; flex-direction: column;
  z-index: 8900;
}
#ls-screen-live-wall.hidden { display: none; }
#ls-screen-live-wall .ls-lw-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #2a2e44;
  background: rgba(20,24,42,0.6);
}
#ls-screen-live-wall .ls-lw-head h2 {
  font-family: 'Cinzel', serif; color: #e8b830;
  margin: 0; font-size: 1.25rem; font-weight: 500;
}
#ls-screen-live-wall .ls-lw-head .ls-lw-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem; color: #a9a499;
}
#ls-screen-live-wall .ls-lw-head button {
  background: transparent; color: #e8b830;
  border: 1.5px solid #c9941a; border-radius: 6px;
  padding: 7px 16px; font-family: inherit; font-size: 0.9rem;
  cursor: pointer;
}
#ls-wall-grid {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-content: start;
}
.ls-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #a9a499;
  padding: 60px 20px;
  font-size: 1.05rem;
}
.ls-empty strong {
  color: #e8b830;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.15em;
  font-size: 1.2rem;
}

.ls-card {
  background: #141828;
  border: 1px solid #2a2e44;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.ls-card:hover {
  border-color: #e8b830;
  transform: translateY(-2px);
}
.ls-preview {
  aspect-ratio: 16 / 9;
  background: #0a0e1a;
  overflow: hidden;
  position: relative;
}
.ls-preview img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.ls-preview-empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: #5a5a5a;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
}
.ls-card-head {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
  padding: 8px 10px 18px;
  background: linear-gradient(180deg, rgba(10,14,26,0.94), rgba(10,14,26,0.64) 68%, rgba(10,14,26,0));
  pointer-events: none;
}
.ls-card-name {
  color: #fff7d6;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: .01em;
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ls-card-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.ls-card-status.ls-active { background: rgba(74,222,128,0.15); color: #4ade80; }
.ls-card-status.ls-stale  { background: rgba(232,184,48,0.12); color: #e8b830; }
.ls-card-status.ls-idle   { background: rgba(120,120,120,0.15); color: #888; }

.ls-card-row {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex; justify-content: space-between;
  gap: 8px;
  padding: 18px 10px 8px;
  background: linear-gradient(0deg, rgba(10,14,26,0.94), rgba(10,14,26,0.58) 64%, rgba(10,14,26,0));
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  color: #a9a499;
  pointer-events: none;
}
.ls-screen { color: #c9941a; }
.ls-progress.ls-good { color: #4ade80; }
.ls-progress.ls-mid  { color: #e8b830; }
.ls-progress.ls-low  { color: #f87171; }

.ls-formative-panel {
  margin-top: 16px;
  border: 1px solid #2a2e44;
  border-radius: 10px;
  background: #141828;
  padding: 14px;
}
.ls-formative-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  margin-bottom: 12px;
}
.ls-formative-head h3 {
  margin: 0;
  font-family: 'Cinzel', serif;
  color: #e8b830;
  font-size: 1.05rem;
}
.ls-formative-head span {
  color: #a9a499;
  font-family: 'IBM Plex Mono', monospace;
  font-size: .78rem;
}
.ls-formative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}
.ls-formative-card {
  border: 1px solid #2a2e44;
  border-radius: 8px;
  padding: 10px;
  background: #101423;
}
.ls-formative-card strong {
  display: block;
  color: #e4dfd0;
  font-size: .86rem;
  margin-bottom: 6px;
}
.ls-formative-pct {
  color: #e8b830;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}
.ls-formative-meta, .ls-formative-names {
  color: #a9a499;
  font-size: .8rem;
  margin-top: 6px;
}
.ls-formative-names {
  color: #fca5a5;
}

/* ─── Live wall detail overlay ──────────────────────────── */
.ls-detail-overlay {
  position: fixed; inset: 0;
  background: rgba(10,14,26,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  z-index: 9500;
}
.ls-detail-inner {
  background: #141828;
  border: 1.5px solid #e8b830;
  border-radius: 12px;
  max-width: min(1500px, 96vw); width: 100%;
  max-height: 94vh;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.ls-detail-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 16px 22px;
  border-bottom: 1px solid #2a2e44;
}
.ls-detail-name {
  font-family: 'Cinzel', serif; color: #e8b830;
  font-size: 1.25rem; margin: 0; font-weight: 500;
}
.ls-detail-sub {
  font-family: 'IBM Plex Mono', monospace;
  color: #a9a499; font-size: 0.82rem;
  margin-top: 4px;
}
.ls-detail-close {
  background: transparent; color: #e8b830;
  border: 1.5px solid #c9941a; border-radius: 5px;
  padding: 7px 14px; font-family: inherit; font-size: 0.88rem;
  cursor: pointer;
}
.ls-detail-preview {
  flex: 1; min-height: min(64vh, 720px);
  background: #0a0e1a;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ls-detail-preview img {
  max-width: 100%; max-height: 76vh; object-fit: contain;
  display: block;
}
.ls-detail-meta {
  padding: 14px 22px;
  border-top: 1px solid #2a2e44;
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: 'EB Garamond', Georgia, serif;
}
.ls-detail-history {
  padding: 14px 22px 18px;
  border-top: 1px solid #2a2e44;
  max-height: 34vh;
  overflow: auto;
}
.ls-detail-history h3 {
  margin: 0 0 8px;
  font-family: 'Cinzel', serif;
  color: #e8b830;
  font-size: 1rem;
}
.ls-detail-history .ls-muted { color: #a9a499; font-size: .88rem; }
.ls-history-session {
  border: 1px solid #2a2e44;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 10px;
  background: #101423;
}
.ls-history-session-head {
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 10px;
  color: #e4dfd0;
  border-bottom: 1px solid #2a2e44;
  font-size: .86rem;
}
.ls-history-table-wrap { overflow: auto; max-height: 230px; }
.ls-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.ls-history-table th, .ls-history-table td {
  border-bottom: 1px solid #222842;
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  color: #e4dfd0;
}
.ls-history-table th {
  position: sticky;
  top: 0;
  background: #1a1e2e;
  color: #a9a499;
}
.ls-history-table .ls-ok { color: #86efac; font-weight: 700; }
.ls-history-table .ls-no { color: #fca5a5; font-weight: 700; }

/* ────────────────────────────────────────────────────────────────
   Teacher push banner (student-side) — gold notification shown
   briefly when the teacher jumps the whole class to a new screen.
   ──────────────────────────────────────────────────────────────── */
#ls-push-banner {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #e8b830 0%, #d4a020 100%);
  color: #1a1e2e; padding: 12px 22px; border-radius: 10px;
  font-family: 'EB Garamond', Georgia, serif; font-weight: 600; font-size: 1.02rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 2px rgba(232,184,48,0.3);
  z-index: 10000; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  max-width: 90vw; text-align: center;
}
#ls-push-banner.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#ls-push-banner.hide { opacity: 0; transform: translateX(-50%) translateY(-10px); }
#ls-push-banner .ls-pb-kicker {
  display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: #1a1e2e; opacity: .7; font-weight: 700; margin-bottom: 2px;
}

/* ────────────────────────────────────────────────────────────────
   Teacher preview mode — login CTA + persistent banner
   ──────────────────────────────────────────────────────────────── */

/* "Preview content" button on login card: a small ghost link below the
   student/teacher panels.  Looks like a footer action, not a primary CTA. */
.ls-preview-cta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(232,184,48,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.ls-btn-link {
  background: transparent;
  border: 1px dashed rgba(232,184,48,0.35);
  color: #c9941a;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 0.92rem;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.ls-btn-link:hover {
  border-color: rgba(232,184,48,0.6);
  background: rgba(232,184,48,0.08);
  color: #e8b830;
}
.ls-preview-hint {
  font-size: 0.74rem;
  color: #7a8099;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.04em;
}

/* Persistent top banner shown while in teacher preview mode.  Gold strip
   with the jump-to dropdown + exit button. */
#ls-preview-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: linear-gradient(135deg, #e8b830 0%, #d4a020 100%);
  color: #1a1e2e;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  z-index: 9999;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  font-family: 'EB Garamond', Georgia, serif;
}
#ls-preview-banner.hidden { display: none; }
#ls-preview-banner .ls-preview-banner-text {
  font-weight: 500;
  font-size: 0.95rem;
}
#ls-preview-banner .ls-preview-banner-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
#ls-preview-banner .ls-preview-jump-label {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.75;
}
#ls-preview-banner select {
  background: rgba(26,30,46,0.15);
  color: #1a1e2e;
  border: 1px solid rgba(26,30,46,0.3);
  border-radius: 6px;
  padding: 4px 10px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  min-width: 180px;
}
#ls-preview-banner select:hover { background: rgba(26,30,46,0.22); }
#ls-preview-banner button {
  background: rgba(26,30,46,0.85);
  color: #e8b830;
  border: 1px solid rgba(26,30,46,0.9);
  border-radius: 6px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s;
}
#ls-preview-banner button:hover { background: #1a1e2e; }

/* Push the app content down so it doesn't hide behind the preview banner.
   The banner is ~44px tall on desktop; mobile wraps to ~68px. */
body.ls-preview-active { padding-top: 50px; }
@media (max-width: 700px) {
  body.ls-preview-active { padding-top: 80px; }
}
