/* ===== FaiqConscious Tests — Shared CSS =====
   Black/Gold Theme | RTL Arabic | Responsive
   For all 15 psychological tests
   WhatsApp: +1 802-586-1162
*/

:root {
  --bg-dark: #000000;
  --bg-card: #0a0a0a;
  --bg-input: #1a1a1a;
  --primary-gold: #d4af37;
  --primary-gold-hover: #bfa12f;
  --primary-gold-dim: rgba(212, 175, 55, 0.1);
  --text-light: #ffffff;
  --text-muted: #aaaaaa;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --info: #3b82f6;
  --admin-bg: #111111;
  --border-color: rgba(212, 175, 55, 0.3);
  --border-light: #333;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  line-height: 1.7;
  direction: rtl;
  background-image: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.04) 0%, transparent 80%);
}

.container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(212, 175, 55, 0.08);
  max-width: 1000px;
  width: 100%;
  padding: 40px;
  box-sizing: border-box;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* ===== Typography ===== */
h1, h2, h3, h4 { color: var(--primary-gold); margin-bottom: 15px; font-weight: bold; }
h1 { font-size: 1.8em; }
h2 { font-size: 1.5em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.1em; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ===== Disclaimer / Warning Boxes ===== */
.disclaimer {
  font-size: 0.95em;
  color: var(--text-muted);
  border: 1px dashed var(--border-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  background: var(--surface-elevated, #fdfcf8);
  line-height: 1.8;
}

.disclaimer strong { color: var(--danger); }

.warning-box {
  border-right: 5px solid var(--danger);
  background: rgba(239, 68, 68, 0.1);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  text-align: justify;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 25px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--primary-gold);
}

.form-control,
input[type="text"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 1.1em;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-control:focus,
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-gold);
}

/* ===== Steps / Pages ===== */
.step { display: none; animation: fadeIn 0.4s; }
.step.active { display: block; }

.page { display: none; animation: fadeIn 0.4s; }
.page.active { display: block; }

/* ===== Questions ===== */
.question-box {
  margin-bottom: 35px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 25px;
}

.question-text {
  font-size: 1.15em;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-light);
  line-height: 1.6;
}

.question-subtitle {
  color: var(--primary-gold);
  font-size: 0.95em;
  margin-bottom: 5px;
}

/* ===== Options Grid ===== */
.options-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, 1fr);
}

.options-grid.binary { grid-template-columns: repeat(2, 1fr); }
.options-grid.quantum { grid-template-columns: 1fr; }
.options-grid.likert-4 { grid-template-columns: repeat(4, 1fr); }
.options-grid.likert-6 { grid-template-columns: repeat(6, 1fr); }
.options-grid.likert-7 { grid-template-columns: repeat(7, 1fr); }

.option-label {
  background: var(--surface-elevated, #fdfcf8);
  padding: 12px 5px;
  text-align: center;
  color: var(--text-light);
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
  border: 1px solid var(--border-light);
  font-size: 0.9em;
  font-weight: bold;
}

.options-grid.quantum .option-label {
  text-align: right;
  font-weight: normal;
  line-height: 1.6;
  padding: 15px 18px;
}

.option-label:hover {
  border-color: var(--primary-gold);
  background: var(--primary-gold-dim);
}

.option-label.selected {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.option-label.danger:hover { border-color: var(--danger); }
.option-label.warning:hover { border-color: var(--warning); }

/* ===== Scenario Cards ===== */
.scen-card {
  background: rgba(124, 58, 237, 0.05);
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 20px;
  border-right: 4px solid #7c3aed;
}

.scen-opt {
  display: block;
  width: 100%;
  text-align: right;
  padding: 15px;
  margin-top: 10px;
  background: var(--surface-elevated, #fdfcf8);
  border: 1px solid var(--border-light);
  color: var(--text-primary, #1c1914);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  font-size: 1em;
}

.scen-opt:hover { border-color: var(--primary-gold); }
.scen-opt.selected {
  border-color: var(--primary-gold);
  background: rgba(212, 175, 55, 0.1);
}

/* ===== Checkboxes ===== */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  background: var(--surface-elevated, #fdfcf8);
  padding: 15px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  gap: 12px;
}

.checkbox-label input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary-gold);
  flex-shrink: 0;
}

.checkbox-label:hover { border-color: var(--primary-gold); }

/* ===== Event Cards (Trauma Triage) ===== */
.event-card {
  background: var(--surface-elevated, #fdfcf8);
  border: 1px solid var(--primary-gold);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.event-card h4 {
  margin-top: 0;
  color: var(--text-primary, #1c1914);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

/* ===== Buttons ===== */
.btn {
  background-color: var(--primary-gold);
  color: #000;
  border: none;
  padding: 15px 30px;
  font-size: 1.2em;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
  width: 100%;
  margin-top: 20px;
  font-family: inherit;
}

.btn:hover { background-color: var(--primary-gold-hover); }

.btn-outline {
  background: transparent;
  color: var(--primary-gold);
  border: 2px solid var(--primary-gold);
  width: 30%;
}

.btn-outline:hover { background: var(--primary-gold-dim); }

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  border: none;
  margin-top: 15px;
}

.btn-whatsapp:hover { background-color: #128C7E; }

.btn-danger {
  background-color: var(--danger);
  color: #fff;
}

.btn-success {
  background-color: var(--success);
  color: #fff;
}

/* ===== Progress Bar ===== */
.progress-container { margin-bottom: 30px; }

.progress-bar {
  height: 6px;
  background: var(--surface-elevated, #fdfcf8);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-gold);
  width: 0%;
  transition: 0.3s;
}

/* ===== Report Cards ===== */
.report-card {
  background: var(--surface-elevated, #fdfcf8);
  padding: 25px;
  border-radius: 10px;
  border-right: 4px solid var(--primary-gold);
  margin-bottom: 25px;
}

.report-card h3 {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
  margin-top: 0;
  color: var(--primary-gold);
  font-size: 1.4em;
}

.report-card h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--text-primary, #1c1914);
}

.report-card p {
  line-height: 1.8;
  font-size: 1.05em;
  color: var(--text-primary, #1c1914);
  margin-bottom: 15px;
}

.report-card ul {
  margin-top: 10px;
  padding-right: 20px;
}

.report-card li {
  margin-bottom: 12px;
  color: var(--text-primary, #1c1914);
  line-height: 1.6;
  font-size: 1.05em;
}

/* ===== Alerts ===== */
.alert-red {
  border-right-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.alert-orange {
  border-right-color: var(--warning);
  background: rgba(245, 158, 11, 0.1);
}

.alert-success {
  border-right-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

/* ===== Dimension Blocks ===== */
.dimension-block {
  background: var(--surface-elevated, #fdfcf8);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 1px solid var(--border-light);
}

.dimension-block h4 {
  margin-top: 0;
  color: var(--text-primary, #1c1914);
  display: flex;
  justify-content: space-between;
}

.dim-high { color: var(--danger); }
.dim-low { color: var(--success); }

.axis-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
}

.axis-row:last-child { border-bottom: none; }

.status-pass { color: var(--success); font-weight: bold; }
.status-fail { color: var(--danger); font-weight: bold; }

/* ===== Highlight ===== */
.highlight { color: var(--primary-gold); font-weight: bold; }

/* ===== Diagnosis Title ===== */
.diagnosis-title {
  font-size: 1.6em;
  color: var(--primary-gold);
  text-align: center;
  padding: 15px;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--primary-gold);
}

/* ===== Admin Dashboard ===== */
#admin-dashboard {
  display: none;
  background: var(--admin-bg);
  padding: 25px;
  border-radius: 10px;
  border: 1px dashed var(--danger);
  margin-top: 40px;
}

.toggle-admin {
  background: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  font-size: 0.9em;
}

/* ===== Diff-Diagnosis Box ===== */
.diff-diag {
  background: var(--surface-elevated, #fdfcf8);
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border-right: 3px solid var(--warning);
  font-size: 0.9em;
  color: var(--text-muted);
}

/* ===== Bypass Box ===== */
.bypass-box {
  background: var(--surface-elevated, #fdfcf8);
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border-right: 4px solid var(--warning);
}

/* ===== CTA Boxes ===== */
.cta-box {
  padding: 25px;
  border-radius: 8px;
  text-align: center;
  margin-top: 30px;
}

.cta-danger {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid var(--danger);
}

.cta-success {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid var(--success);
}

/* ===== Metric Cards ===== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 25px 0;
}

.metric-card {
  background: var(--surface-elevated, #fdfcf8);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  border-top: 4px solid var(--gold);
}

.metric-val {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  display: block;
}

/* ===== Seal / Badge ===== */
.seal {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border: 3px solid var(--primary-gold);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.seal b { color: var(--primary-gold); font-size: 1.3rem; }

/* ===== Steps Navigation ===== */
.steps-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  background: rgba(255,255,255,0.02);
  padding: 15px;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,0.1);
}

.step-nav {
  opacity: 0.2;
  text-align: center;
  flex: 1;
  transition: 0.3s;
  font-size: 0.7rem;
}

.step-nav.active {
  opacity: 1;
  color: var(--primary-gold);
  font-weight: bold;
}

.step-num {
  width: 30px;
  height: 30px;
  border: 2px solid var(--primary-gold);
  border-radius: 50%;
  margin: 0 auto 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* ===== Disorder Sections ===== */
.disorder-section {
  border: 1px solid var(--border-light);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  background: var(--surface-elevated, #fdfcf8);
}

.disorder-section h2 {
  border-bottom: 2px solid var(--primary-gold);
  padding-bottom: 10px;
  margin-top: 0;
  font-size: 1.5em;
  text-align: center;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 20px; margin-top: 10px; }
  .options-grid { grid-template-columns: 1fr !important; }
  .options-grid.likert-6,
  .options-grid.likert-7 { grid-template-columns: repeat(3, 1fr) !important; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .btn-outline { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .dim-grid { grid-template-columns: 1fr 1fr; }
  .steps-nav { display: none; }
  h1 { font-size: 1.4em; }
}

@media (max-width: 480px) {
  .options-grid.likert-6,
  .options-grid.likert-7 { grid-template-columns: repeat(2, 1fr) !important; }
  .dim-grid { grid-template-columns: 1fr; }
}

/* ===== Follow the site theme (theme.js sets these tokens on <html>) ===== */
:root {
  --bg-dark: var(--black, #faf8f3);
  --bg-card: var(--surface, #ffffff);
  --bg-input: var(--surface-elevated, #fdfcf8);
  --primary-gold: var(--gold, #a07d2e);
  --primary-gold-hover: var(--gold-light, #c49a3a);
  --primary-gold-dim: color-mix(in srgb, var(--gold, #a07d2e) 10%, transparent);
  --text-light: var(--text-primary, #1c1914);
  --admin-bg: var(--surface-elevated, #fdfcf8);
  --border-color: color-mix(in srgb, var(--gold, #a07d2e) 30%, transparent);
  --border-light: color-mix(in srgb, var(--text-primary, #1c1914) 14%, transparent);
}
body { background-image: none; }
.container { box-shadow: 0 10px 40px rgba(0,0,0,.06); }

/* the test is part of the page, not a box inside it */
body { padding: 0 16px; display: block; }
.container { border: 0; box-shadow: none; background: transparent; max-width: 860px; margin: 0 auto; padding: 24px 0 48px; }
h1, h2 { line-height: 1.4; }
.disclaimer { background: color-mix(in srgb, var(--gold, #a07d2e) 5%, transparent); }
