/* ═══════════════════════════════════════════════════════════════
   pilot-signup.css — Start-Pilot signup overlay.
   ───────────────────────────────────────────────────────────────
   Loaded after styles.css. z-index 360 so it sits ABOVE the live
   camera (350), See-to-Speak overlay (300), Settings (200), and
   bottom rail (55) — but below toast/alerts (~10000) and the
   page nav (10001). 2-path picker → form → success state, all
   inside one card.
   ═══════════════════════════════════════════════════════════════ */

.pilot-overlay {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-sans);
  color: #fff;
}
.pilot-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.pilot-card {
  position: relative;
  width: min(94vw, 560px);
  max-height: 92vh;
  overflow-y: auto;
  background: #1a1820;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.pilot-card-body { padding: 22px 22px 18px; }

.pilot-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.pilot-close:hover { background: rgba(255, 255, 255, 0.15); }

/* ── Picker (two big path buttons) ─────────────────────────── */

.pilot-form-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--amber);
  margin-bottom: 4px;
  padding-right: 32px;
}
.pilot-form-sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 16px;
  line-height: 1.45;
}
.pilot-picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.pilot-path-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  color: #fff;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.pilot-path-btn:hover,
.pilot-path-btn:focus-visible {
  background: rgba(232, 163, 61, 0.10);
  border-color: rgba(232, 163, 61, 0.55);
  outline: none;
  transform: translateY(-1px);
}
.pilot-path-btn:active { transform: translateY(0); }
.pilot-path-emoji {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.pilot-path-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.pilot-path-label {
  font-size: 1rem;
  font-weight: 700;
}
.pilot-path-sub {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* ── Form view ─────────────────────────────────────────────── */

.pilot-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.pilot-back:hover { border-color: var(--amber); color: var(--amber); }

.pilot-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  margin-top: 4px;
}
.pilot-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
}
.pilot-field-wide { grid-column: 1 / -1; }
.pilot-field input,
.pilot-field select,
.pilot-field textarea {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 16px;                /* prevent iOS zoom */
}
.pilot-field input:focus,
.pilot-field select:focus,
.pilot-field textarea:focus {
  outline: 1px solid var(--amber);
  border-color: var(--amber);
}
.pilot-field textarea { resize: vertical; min-height: 64px; }

.pilot-submit {
  grid-column: 1 / -1;
  padding: 12px 16px;
  background: var(--amber);
  color: #18121b;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 4px;
  -webkit-tap-highlight-color: transparent;
}
.pilot-submit:hover { filter: brightness(1.07); }
.pilot-submit:disabled { opacity: 0.6; cursor: progress; }

.pilot-status {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  min-height: 1.2em;
  text-align: center;
}
.pilot-status[data-tone="error"] { color: #ef5350; }
.pilot-mailto {
  color: var(--amber);
  text-decoration: underline;
}

/* ── Success state ─────────────────────────────────────────── */

.pilot-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 6px 4px;
  text-align: center;
}
.pilot-success-emoji { font-size: 2.8rem; line-height: 1; }
.pilot-success-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--amber);
}
.pilot-success-msg {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  max-width: 38em;
}
.pilot-success-msg strong { color: var(--amber); }
.pilot-success-close {
  margin-top: 10px;
  padding: 10px 28px;
  background: var(--amber);
  color: #18121b;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
}
.pilot-success-close:hover { filter: brightness(1.07); }

/* Phones — single-column form, full-screen card */
@media (max-width: 520px) {
  .pilot-card { width: 100vw; max-height: 100vh; border-radius: 0; }
  .pilot-form { grid-template-columns: 1fr; }
}

.light-mode .pilot-card { background: #fff; color: #18121b; }
.light-mode .pilot-close { background: rgba(0,0,0,0.08); color: #18121b; }
.light-mode .pilot-form-sub { color: rgba(0,0,0,0.6); }
.light-mode .pilot-path-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.10); color: #18121b; }
.light-mode .pilot-path-sub { color: rgba(0,0,0,0.6); }
.light-mode .pilot-field { color: rgba(0,0,0,0.7); }
.light-mode .pilot-field input,
.light-mode .pilot-field select,
.light-mode .pilot-field textarea {
  background: #f7f7fb; border-color: rgba(0,0,0,0.12); color: #18121b;
}
.light-mode .pilot-status { color: rgba(0,0,0,0.7); }
.light-mode .pilot-success-msg { color: rgba(0,0,0,0.78); }
