/* jhacal-voice-onboard.css — 042026.1.63 */
/* =====================================================
   JHACAL Voice Onboarding Modal
   First-run voice picker — pops at end of tour. Pete-directed
   in Session 59. Linked to but does not replace the full Voice
   tab in Settings (which remains the canonical advanced UI).
   ===================================================== */

.jvo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9800;                         /* above tutorial overlay (~9000-9500); below settings modal (20000) */
  padding: 16px;
  -webkit-tap-highlight-color: transparent;
}
.jvo-overlay.is-open { display: flex; }

.jvo-panel {
  background: #1f2328;                   /* matches --bg-1 dark theme */
  color: #f6f7f9;                        /* --text-1 */
  border: 1px solid #3d444d;             /* --border */
  border-radius: 14px;
  padding: 24px 22px 18px;
  width: min(440px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  position: relative;
}

.jvo-title {
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f6c177;                        /* --jhacal-gold */
  text-align: center;
}
.jvo-subtitle {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #b9c0c7;                        /* --text-2 */
  text-align: center;
  line-height: 1.4;
}

/* Auto-dismiss countdown ring sits to the right of the title */
.jvo-countdown {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #98a1ac;                        /* --text-3 (g60 lightened token) */
  font-variant-numeric: tabular-nums;
}
.jvo-countdown-ring {
  width: 22px;
  height: 22px;
  border: 2px solid #3d444d;
  border-top-color: #f6c177;
  border-radius: 50%;
  animation: jvo-spin 1s linear infinite;
}
@keyframes jvo-spin { to { transform: rotate(360deg); } }

.jvo-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 8px;
}

.jvo-btn {
  background: #313740;                   /* --bg-3 */
  border: 1px solid #3d444d;
  border-radius: 10px;
  color: #f6f7f9;
  padding: 14px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.08s;
  text-align: center;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.jvo-btn:hover {
  background: #3a4250;
  border-color: #f6c177;
}
.jvo-btn:active { transform: scale(0.97); }
.jvo-btn .jvo-btn-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.jvo-btn .jvo-btn-label {
  font-weight: 700;
}
.jvo-btn .jvo-btn-desc {
  font-size: 0.72rem;
  font-weight: 400;
  color: #b9c0c7;
  margin-top: 2px;
  line-height: 1.25;
}

.jvo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #3d444d;
  gap: 12px;
}
.jvo-skip-btn {
  background: transparent;
  border: 1px solid #3d444d;
  color: #b9c0c7;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.12s;
}
.jvo-skip-btn:hover {
  background: #272b31;                   /* --bg-2 */
  color: #f6f7f9;
}
.jvo-footnote {
  font-size: 0.74rem;
  color: #98a1ac;
  text-align: right;
  flex: 1;
  line-height: 1.35;
}

/* Status row appears after a button is pressed (e.g. "✓ Male voice set: Daniel") */
.jvo-status {
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(64, 192, 87, 0.12);
  border: 1px solid rgba(64, 192, 87, 0.4);
  border-radius: 8px;
  color: #6eda7c;
  font-size: 0.83rem;
  text-align: center;
  display: none;
}
.jvo-status.is-shown { display: block; }
.jvo-status.is-error {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(234, 134, 143, 0.4);
  color: #ea868f;                        /* --color-danger (g60 lightened token) */
}

/* HC mode override */
body.jhacal-high-contrast .jvo-panel {
  background: #000;
  color: #fff;
  border-color: #fff;
}
body.jhacal-high-contrast .jvo-btn {
  background: #000;
  color: #fff;
  border-color: #fff;
}
body.jhacal-high-contrast .jvo-btn:hover {
  background: #ff0;
  color: #000;
}
body.jhacal-high-contrast .jvo-title { color: #ff0; }
