/*
 * GPS Help — Guided Worker Support Flow Styles
 * ===============================================
 * Designed for tired, frustrated, non-technical workers.
 * Large tap targets. Clean card. One question at a time.
 *
 * All selectors scoped under #gpsHelpModal for specificity
 * so STK base .btn / .modal rules cannot override.
 *
 * Mobile-first. Refactored 2026-03-21.
 */

/* ═══ Modal overlay ═══ */
#gpsHelpModal.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 480px) {
  #gpsHelpModal.modal {
    align-items: center;
    padding: 24px;
  }
}
#gpsHelpModal.modal.hidden {
  display: none;
}

/* ═══ Card ═══ */
#gpsHelpModal .gps-help-card {
  background: #111119;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -4px 48px rgba(0, 0, 0, 0.55);
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 480px) {
  #gpsHelpModal .gps-help-card {
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
  }
}

/* ═══ Header — minimal top bar ═══ */
#gpsHelpModal .gps-help-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px 8px;
  border-bottom: none;
}
#gpsHelpModal .gps-help-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}
#gpsHelpModal .gps-help-close-btn {
  background: none;
  border: none;
  color: #475569;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}
#gpsHelpModal .gps-help-close-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

/* ═══ Wizard body ═══ */
#gpsHelpModal .gps-help-wizard-body {
  padding: 12px 24px 36px;
  min-height: 200px;
}

/* ═══ Navigation (Back / Start Over) ═══ */
#gpsHelpModal .wiz-nav {
  display: flex;
  flex-direction: row;
  gap: 20px;
  margin-bottom: 28px;
}
#gpsHelpModal .wiz-nav-btn {
  background: none;
  border: none;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 2px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
#gpsHelpModal .wiz-nav-btn:hover {
  color: #cbd5e1;
}
#gpsHelpModal .wiz-nav-btn::before {
  content: "\2190\00a0";
}
#gpsHelpModal .wiz-nav-btn:last-child::before {
  content: "\21BA\00a0";
}

/* ═══ Intro block (start screen) ═══ */
#gpsHelpModal .wiz-intro {
  font-size: 0.92rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
#gpsHelpModal .wiz-intro strong {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ═══ Question text ═══ */
#gpsHelpModal .wiz-question {
  font-size: 1.3rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.35;
  margin-bottom: 8px;
}
#gpsHelpModal .wiz-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.55;
  margin-bottom: 28px;
}

/* ═══ Choice buttons — full-width stacked, large tap targets ═══ */
#gpsHelpModal .wiz-choices {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px;
  width: 100%;
}
#gpsHelpModal .wiz-btn {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
  padding: 18px 22px;
  background: #1a2332;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: #e2e8f0;
  font-size: 1.05rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  line-height: 1.4;
  min-height: 0;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
#gpsHelpModal .wiz-btn:hover,
#gpsHelpModal .wiz-btn:focus {
  background: #1e3a5f;
  border-color: rgba(59, 130, 246, 0.4);
  outline: none;
}
#gpsHelpModal .wiz-btn:active {
  background: #1e3a5f;
  transform: scale(0.98);
}

/* Secondary — ghost, visually quiet */
#gpsHelpModal .wiz-btn.wiz-btn--secondary {
  background: transparent;
  border-color: transparent;
  color: #64748b;
  font-weight: 400;
}
#gpsHelpModal .wiz-btn.wiz-btn--secondary:hover,
#gpsHelpModal .wiz-btn.wiz-btn--secondary:focus {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

/* Alert / escalation — warm amber */
#gpsHelpModal .wiz-btn.wiz-btn--alert {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  font-weight: 600;
}
#gpsHelpModal .wiz-btn.wiz-btn--alert:hover,
#gpsHelpModal .wiz-btn.wiz-btn--alert:focus {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.35);
}

/* ═══ Spinner ═══ */
#gpsHelpModal .wiz-checking {
  text-align: center;
  padding: 48px 0;
}
#gpsHelpModal .wiz-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid #1e293b;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: wiz-spin 0.8s linear infinite;
  margin-bottom: 20px;
}
@keyframes wiz-spin {
  to { transform: rotate(360deg); }
}

/* ═══ Result message ═══ */
#gpsHelpModal .wiz-result-message {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.35;
  margin-bottom: 20px;
}

/* ═══ Fix steps ═══ */
#gpsHelpModal .wiz-steps {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
#gpsHelpModal .wiz-steps li {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  color: #cbd5e1;
  line-height: 1.55;
}
#gpsHelpModal .wiz-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.12);
  color: #7fb3fc;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ═══ Send status ═══ */
#gpsHelpModal .wiz-send-status {
  font-size: 0.9rem;
  text-align: center;
  margin-top: 14px;
  min-height: 20px;
  color: #94a3b8;
}
#gpsHelpModal .wiz-send-status--warn {
  color: #fbbf24;
}

/* ═══ Done icon ═══ */
#gpsHelpModal .wiz-done-icon {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 16px;
}

/* ═══ Textarea ═══ */
#gpsHelpModal .wiz-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 16px 18px;
  background: #1a2332;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  min-height: 90px;
  margin-bottom: 16px;
  -webkit-appearance: none;
}
#gpsHelpModal .wiz-textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
}
#gpsHelpModal .wiz-textarea::placeholder {
  color: #475569;
}

/* ═══ Live chat ═══ */
#gpsHelpModal .wiz-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
#gpsHelpModal .wiz-chat-status {
  font-size: 0.92rem;
  font-weight: 600;
  color: #4ade80;
}
#gpsHelpModal .wiz-chat-log {
  background: #0a0a14;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 16px;
  min-height: 200px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
#gpsHelpModal .wiz-chat-empty {
  text-align: center;
  color: #475569;
  font-size: 0.92rem;
  padding: 48px 0;
}
#gpsHelpModal .wiz-chat-bubble {
  margin-bottom: 14px;
  max-width: 85%;
}
#gpsHelpModal .wiz-chat-bubble--worker {
  margin-left: auto;
  text-align: right;
}
#gpsHelpModal .wiz-chat-bubble--greg {
  margin-right: auto;
  text-align: left;
}
#gpsHelpModal .wiz-chat-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
#gpsHelpModal .wiz-chat-text {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
}
#gpsHelpModal .wiz-chat-bubble--worker .wiz-chat-text {
  background: #1d4ed8;
  color: #fff;
  border-bottom-right-radius: 4px;
}
#gpsHelpModal .wiz-chat-bubble--greg .wiz-chat-text {
  background: #1a2332;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

/* ── Chat input ── */
#gpsHelpModal .wiz-chat-input-row {
  display: flex;
  gap: 10px;
}
#gpsHelpModal .wiz-chat-input {
  flex: 1;
  padding: 14px 18px;
  background: #1a2332;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 1rem;
  -webkit-appearance: none;
}
#gpsHelpModal .wiz-chat-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.5);
}
#gpsHelpModal .wiz-chat-input::placeholder {
  color: #475569;
}
#gpsHelpModal .wiz-chat-send-btn {
  padding: 14px 20px;
  background: #1d4ed8;
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
#gpsHelpModal .wiz-chat-send-btn:hover {
  background: #2563eb;
}
#gpsHelpModal .wiz-chat-send-btn:active {
  transform: scale(0.97);
}
#gpsHelpModal .wiz-chat-limit {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 14px 0 4px;
}
