/* ============================================================
   Sesión Teórica — layout espacial Feynman
   ============================================================ */

/* ── Stage ─────────────────────────────────────────────── */
.st-stage {
  position: fixed;
  inset: 0;
  z-index: 300;          /* takeover: cubre el navbar — solo se sale colgando */
  background: var(--bg);
  overflow: hidden;
}

/* Indicador "en llamada" (arriba derecha) */
.st-call-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: st-call-pulse 1.6s ease-in-out infinite;
}
.st-call-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
@keyframes st-call-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* Botón colgar (abajo izquierda, junto al temporizador) */
.st-hangup-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 7px 14px;
  background: var(--err);
  color: #0A0A0A;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: box-shadow 0.14s, transform 0.08s;
}
.st-hangup-btn:hover { box-shadow: 0 0 16px rgba(255,77,77,0.5); }
.st-hangup-btn:active { transform: scale(0.97); }
.st-hangup-btn svg { transform: rotate(135deg); }

/* ── Top bar ────────────────────────────────────────────── */
.st-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  z-index: 10;
  background: var(--bg);
}

.st-topbar-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.st-topbar-code {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 0.10em;
  flex-shrink: 0;
}

.st-topbar-topic {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.st-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.st-timer {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--acento);
  letter-spacing: 0.10em;
  min-width: 52px;
  flex-shrink: 0;
  text-align: center;
}

/* ── Ring wrapper — JS sets position ────────────────────── */
.st-ring-wrap {
  position: absolute;
  z-index: 4;
  /* no transitions — session is always live */
}
.st-ring-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── Chips bar (checklist horizontal) ───────────────────── */
.st-chips-bar {
  position: absolute;
  top: 44px; left: 0; right: 0;
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 7px 14px 7px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 9;
  min-height: 36px;
  box-sizing: border-box;
}

.st-chips-bar.collapsed {
  padding-top: 4px;
  padding-bottom: 4px;
  min-height: 0;
}
.st-chips-bar.collapsed .st-chips-inner {
  display: none;
}

.st-chips-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.st-chips-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  background: none;
  border: none;
  cursor: pointer;
  padding: 1px 4px;
  line-height: 1;
  flex-shrink: 0;
  align-self: flex-start;
  transition: color 0.14s;
}
.st-chips-toggle:hover { color: var(--muted); }

.st-chips-loading, .st-chips-empty {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  animation: st-blink 1.6s ease-in-out infinite;
  align-self: center;
}

.st-chip {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--muted-2);
  background: transparent;
  border: 1px solid var(--line);
  padding: 3px 10px;
  transition: color 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.st-chip.covered {
  color: var(--acento);
  border-color: var(--acento);
  box-shadow: 0 0 6px rgba(var(--acento-rgb), 0.2);
  animation: st-chip-on 0.55s ease;
}

@keyframes st-chip-on {
  0%   { box-shadow: 0 0 0   rgba(var(--acento-rgb), 0); }
  55%  { box-shadow: 0 0 16px rgba(var(--acento-rgb), 0.55); }
  100% { box-shadow: 0 0 6px rgba(var(--acento-rgb), 0.2); }
}

/* ── Julián speech — subtitle style ─────────────────────── */
.st-julian-text {
  position: absolute;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* top / left / width / padding set by JS */
}
.st-julian-text.visible { opacity: 1; }

/* ── Duda badge ─────────────────────────────────────────── */
.st-duda-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--acento);
  box-shadow: 0 0 18px rgba(var(--acento-rgb), 0.14);
  left: 50%;
  transform: translateX(-50%);
  max-width: 420px;
  width: max-content;
  animation: st-fade-up 0.3s ease;
  z-index: 6;
  /* bottom set by JS */
}

.st-duda-question {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-duda-badge button {
  font-family: var(--font-mono);
  font-size: 10px;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
  cursor: pointer;
  padding: 4px 12px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
  transition: border-color 0.14s, color 0.14s;
}
#st-duda-respond {
  border-color: var(--acento);
  color: var(--acento);
}
.st-duda-badge button:hover { color: var(--ink); border-color: var(--ink-2); }

/* ── Voice horizon canvas ───────────────────────────────── */
.st-voz-canvas {
  position: absolute;
  display: block;
  /* bottom / left / width / height set by JS */
  z-index: 3;
}

/* ── Input bar ──────────────────────────────────────────── */
.st-input-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  z-index: 6;
}

.st-mic-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  flex-shrink: 0;
  transition: background 0.3s;
}
.st-mic-dot.active {
  background: var(--acento);
  box-shadow: 0 0 6px rgba(var(--acento-rgb), 0.6);
  animation: st-mic-pulse 1.9s ease-in-out infinite;
}

@keyframes st-mic-pulse {
  0%, 100% { box-shadow: 0 0 3px rgba(var(--acento-rgb), 0.4); }
  50%       { box-shadow: 0 0 10px rgba(var(--acento-rgb), 0.85); }
}

.st-interim {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.st-input-right {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.st-text-input {
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 190px;
  transition: border-color 0.14s;
}
.st-text-input:focus {
  outline: none;
  border-color: var(--acento);
}
.st-text-input::placeholder { color: var(--muted-2); }

.st-send-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.06em;
  transition: border-color 0.14s, color 0.14s;
}
.st-send-btn:hover { border-color: var(--acento); color: var(--acento); }

/* ── Shared animations ──────────────────────────────────── */
@keyframes st-fade-up {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes st-blink {
  0%, 100% { opacity: 0.4; }
  50%       { opacity: 0.85; }
}

/* ── Timer: urgent state ────────────────────────────────── */
.st-timer.urgent {
  color: var(--acento);
  animation: st-blink 1s ease-in-out infinite;
}

/* ── Timer expiry prompt ────────────────────────────────── */
.st-timer-prompt {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  max-width: 480px;
  width: max-content;
  z-index: 8;
  animation: st-fade-up 0.35s ease;
}

.st-timer-msg {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
  flex: 1;
  min-width: 200px;
}

.st-timer-msg strong {
  color: var(--acento);
}

.st-timer-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.st-tp-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 5px 12px;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: border-color 0.14s, color 0.14s;
  white-space: nowrap;
}
.st-tp-btn:hover { border-color: var(--muted); color: var(--ink); }
.st-tp-primary {
  border-color: var(--acento);
  color: var(--acento);
}
.st-tp-primary:hover { box-shadow: 0 0 10px rgba(var(--acento-rgb), 0.25); }

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .st-chip { max-width: 150px; font-size: 10px; padding: 2px 8px; }
  .st-text-input { width: 130px; }
  .st-topbar-topic { max-width: 160px; }
  .st-timer-prompt { bottom: 58px; padding: 8px 12px; }
}
