/* =========================
   CybeXplorer Conversational Form
   Scope: anything inside .cx-wizard
   Works with current classes in quiz_content.php
   ========================= */

.cx-wizard {
  --brand: rgb(31,196,120);
  --brand-2: #12b886;
  --ink: #0f172a;
  --muted: #6b7280;
  --muted-200: #e5e7eb;
  --bg: #0b0e13;            /* matches dark header vibe you've used */
  --surface: #0f141b;       /* card bg */
  --line: #1f2a37;          /* subtle borders */
  --gap: 24px;
  color: #cbd5e1;
}

/* Container width to match dashboard cards */
.cx-wizard #axisContent,
.cx-wizard .questionSection,
.cx-wizard .wizard-card {
  max-width: 960px;
  margin-inline: auto;
}

/* Card shell (re-uses your card aesthetics) */
.cx-wizard .wizard-card,
.cx-wizard .question,
.cx-wizard .solution-container,
.cx-wizard .chat-options-container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

/* Section paddings */
.cx-wizard .wizard-card { padding: 18px; }
.cx-wizard .question { padding: 18px; margin: var(--gap) 0; }
.cx-wizard .solution-container { padding: 16px; }

/* Headings + helper text */
.cx-wizard h5,
.cx-wizard .question-container1 > label b,
.cx-wizard .question > label b {
  display: inline-block;
  color: #e6edf3;
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 10px;
}
.cx-wizard h5 + p,
.cx-wizard .question small,
.cx-wizard .last-option-text,
.cx-wizard h5 + div,
.cx-wizard h5 + span {
  color: var(--muted);
  font-size: 15px;
}

/* Conversational bubbles */
.cx-wizard .question-container1 > label,
.cx-wizard .question > label {
  display:block;
  background: #0b1118;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

/* Options -> pill buttons */
.cx-wizard .option-btn,
.cx-wizard .option-btn-category,
.cx-wizard .option-btn-sub-category,
.cx-wizard .option-btn-sub-category-solution,
.cx-wizard .btn.btn-secondary,
.cx-wizard .next-button,
.cx-wizard .back-btn,
.cx-wizard .buttons .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 8px 8px 0 0;
  font-weight: 600;
  font-size: 14px !important;
  border-radius: 999px !important;
  border:1px solid var(--line) !important;
  background: #0b1118 !important;
  color:#e6edf3 !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 6px 16px rgba(0,0,0,.25);
  transition: transform .06s, box-shadow .2s, border-color .2s, background .2s;
  cursor: pointer;
}

/* Hover/active */
.cx-wizard .option-btn:hover,
.cx-wizard .option-btn-category:hover,
.cx-wizard .option-btn-sub-category:hover,
.cx-wizard .option-btn-sub-category-solution:hover,
.cx-wizard .btn.btn-secondary:hover,
.cx-wizard .next-button:hover,
.cx-wizard .back-btn:hover {
  transform: translateY(-1px);
  border-color: var(--muted-200) !important;
  box-shadow: 0 2px 0 rgba(255,255,255,.02) inset, 0 10px 22px rgba(0,0,0,.35);
}

/* Selected state (you toggle .is-selected in JS or rely on :focus) */
.cx-wizard .is-selected,
.cx-wizard .option-btn:focus,
.cx-wizard .option-btn-category:focus,
.cx-wizard .option-btn-sub-category:focus {
  outline: none !important;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
  border-color: transparent !important;
  color: #0b1118 !important;
}

/* Option groups grid */
.cx-wizard .chat-options-container,
.cx-wizard .solution-options-container {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
  gap: 10px;
  padding: 10px;
  background: transparent;
  border: 0;
}

/* Checkboxes displayed as chips */
.cx-wizard .option-checkbox {
  accent-color: var(--brand);
  transform: translateY(1px);
}

/* Selects and inputs */
.cx-wizard .custom-select-modal,
.cx-wizard input[type="text"],
.cx-wizard input[type="email"],
.cx-wizard input[type="tel"],
.cx-wizard textarea {
  width: 100%;
  background:#0b1118;
  border:1px solid var(--line);
  border-radius: 12px;
  color:#e6edf3;
  padding: 10px 12px;
  font-size: 14px;
}
.cx-wizard .custom-select-modal:focus,
.cx-wizard input:focus,
.cx-wizard textarea:focus {
  outline: 2px solid var(--brand);
  border-color: transparent;
}

/* Progress bar (uses existing #quiz-progress-*) */
.cx-wizard #quiz-progress-container {
  display:flex; align-items:center; gap:10px; height:12px; margin: 10px 0 14px;
}
.cx-wizard #quiz-progress-bar {
  flex:1;
  height: 8px;
  border-radius: 999px;
  background: #0b1118;
  border:1px solid var(--line);
  overflow:hidden;
  position: relative;
}
.cx-wizard #progress-bar-inner {
  position:absolute; inset:0 100% 0 0;
  height:100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-radius: 999px;
  transition: width .3s ease-in-out;
}

/* Typing indicator (for conversational feel) */
.cx-wizard .typing {
  display:inline-flex; gap:4px; padding:8px 12px; border-radius:12px;
  background:#0b1118; border:1px solid var(--line);
}
.cx-wizard .typing i {
  width:6px; height:6px; border-radius:50%; background:#9aa4af; opacity:.6;
  animation: cx-bounce 1.2s infinite;
}
.cx-wizard .typing i:nth-child(2){ animation-delay:.15s }
.cx-wizard .typing i:nth-child(3){ animation-delay:.3s }
@keyframes cx-bounce {
  0%,80%,100%{ transform: translateY(0); opacity:.6 }
  40%{ transform: translateY(-3px); opacity:1 }
}

/* Nav buttons row */
.cx-wizard .buttons,
.cx-wizard .submit-button-container,
.cx-wizard #submit-button-container {
  display:flex; flex-wrap:wrap; gap:10px; margin-top: 14px;
}
.cx-wizard .next-button.btn,
.cx-wizard .btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
  color:#062b2b !important; border-color: transparent !important;
}

/* Tables/lists inside the wizard */
.cx-wizard table { width:100%; color:#cbd5e1; border-collapse: collapse; }
.cx-wizard th, .cx-wizard td { padding: 8px 10px; border-bottom:1px solid var(--line); }
.cx-wizard thead th { color:#94a3b8; font-weight:600; }

/* Modal from quiz_content.php */
#questionSection[style*="position: fixed"] .question-container1,
#modal, #questionSection {
  background: rgba(5,7,10,.6) !important; /* backdrop */
}
#questionSection > div[style*="background: white"] {
  background: var(--surface) !important;
  border:1px solid var(--line) !important;
  color:#e6edf3 !important;
  border-radius: 16px !important;
}

/* Kill leftover bootstrap-y colors where present */
.cx-wizard .btn.btn-secondary { background:#0b1118 !important; color:#e6edf3 !important; }

/* Mobile tweaks */
@media (max-width: 640px) {
  .cx-wizard { --gap: 18px; }
  .cx-wizard .question { padding: 14px; }
  .cx-wizard .chat-options-container { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
}

/* Intro header */
.cx-wizard .page-title{ margin:6px 0 2px; font-size:28px; color:#e6edf3 }
.cx-wizard .subtitle{ color:var(--muted); margin:0 }
.cx-wizard .hint{ color:#9aa4af }
.cx-wizard .eyebrow{ font-size:12px; letter-spacing:.04em; text-transform:uppercase; color:#9aa4af }

/* Trust badges */
.cx-wizard .badge-group{ display:flex; gap:8px }
.cx-wizard .badge{ padding:6px 10px; border:1px solid var(--line); border-radius:999px; background:#0b1118; color:#cbd5e1; font-size:12px }

/* 3-column grid that collapses */
.cx-wizard .intro-grid{ display:grid; gap:16px; grid-template-columns: repeat(3, minmax(0,1fr)); margin:18px 0 }
.cx-wizard .intro-block{ background:#0b1118; border:1px solid var(--line); border-radius:12px; padding:14px }
.cx-wizard .intro-block h3{ margin:0 0 8px; font-size:16px; color:#e6edf3 }
.cx-wizard .intro-block ul{ margin:0; padding-left:18px; color:#cbd5e1 }
.cx-wizard .intro-block li{ margin:6px 0 }

/* Steps preview */
.cx-wizard .preview-steps{ margin-top:8px }
.cx-wizard .preview-steps summary{ cursor:pointer; color:#cbd5e1 }
.cx-wizard .preview-steps ol{ margin:6px 0 0 18px; color:#9aa4af }

/* Consent */
.cx-wizard .consent-row{ margin-top:14px }
.cx-wizard .consent{ display:flex; gap:10px; align-items:flex-start }
.cx-wizard .consent input{ transform: translateY(2px); accent-color: var(--brand) }
.cx-wizard .legal-note{ color:#9aa4af; font-size:12px; margin-top:4px }

/* Button row */
.cx-wizard .buttons{ display:flex; align-items:center; gap:12px; margin-top:16px }
.cx-wizard .btn.primary[disabled]{ opacity:.5; cursor:not-allowed }

/* Responsive */
@media (max-width: 900px){
  .cx-wizard .intro-grid{ grid-template-columns: 1fr }
}
