/* ==========================================================================
   Mariba — Damage Triage (/assess) page styles
   Palette: Black #0C0C0C · White #F5F5F5 · Yellow #F5C500
   ========================================================================== */

:root {
  --black:     #0C0C0C;
  --white:     #F5F5F5;
  --yellow:    #F5C500;
  --border:    #e2e2e2;
  --muted:     #6b6b6b;
  --bg:        #f8f8f8;
  --emergency: #DC2626;
  --thisweek:  #D97706;
  --routine:   #16A34A;
  --radius:    10px;
  --shadow:    0 2px 12px rgba(0,0,0,.07);
  --max-w:     600px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--white);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────────────────── */
.assess-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--black);
  border-bottom: 3px solid var(--yellow);
}
.assess-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.03em;
}
.assess-logo span { color: var(--yellow); }
.header-back {
  font-size: .78rem;
  color: #aaa;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.header-back:hover { color: #fff; }

/* ── Hero ────────────────────────────────────────────────────────── */
.assess-hero {
  background: var(--black);
  color: #fff;
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
}
.assess-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: .6rem;
}
.assess-hero h1 em {
  color: var(--yellow);
  font-style: normal;
}
.assess-hero p {
  font-size: .95rem;
  color: #bbb;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Wizard container ────────────────────────────────────────────── */
.wizard-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem 4rem;
  position: relative;
  margin-top: -1.5rem;
}

/* ── Progress steps ──────────────────────────────────────────────── */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.75rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
}
.step-pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  flex: 0 0 auto;
}
.step-pip-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #bbb;
  background: #fff;
  transition: all .25s;
}
.step-pip-label {
  font-size: .65rem;
  font-weight: 600;
  color: #bbb;
  white-space: nowrap;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.step-pip.active .step-pip-circle  { border-color: var(--yellow); background: var(--yellow); color: var(--black); }
.step-pip.active .step-pip-label   { color: var(--black); }
.step-pip.done .step-pip-circle    { border-color: var(--black); background: var(--black); color: #fff; }
.step-pip.done .step-pip-label     { color: var(--black); }
.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 .35rem;
  margin-bottom: 1.15rem;
  transition: background .25s;
}
.step-connector.done { background: var(--black); }

/* ── Step panels ─────────────────────────────────────────────────── */
.step-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  display: none;
}
.step-panel.active { display: block; }
.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .25rem;
}
.step-subtitle {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Upload area ─────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--yellow);
  background: #fffef0;
}
.upload-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.upload-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: .5rem;
}
.upload-zone p { font-size: .875rem; color: var(--muted); }
.upload-zone strong { color: var(--black); }
.upload-hint { font-size: .75rem; color: #aaa; margin-top: .35rem; }

/* ── Preview thumbnails ──────────────────────────────────────────── */
.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}
.preview-item {
  position: relative;
  width: 90px;
  height: 80px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.preview-item img, .preview-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .7rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.upload-counter {
  margin-top: .75rem;
  font-size: .8rem;
  color: var(--muted);
  text-align: center;
}

/* ── Description textarea ────────────────────────────────────────── */
.desc-field {
  width: 100%;
  margin-top: 1.25rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: .875rem;
  color: var(--black);
  resize: vertical;
  min-height: 70px;
}
.desc-field:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: transparent; }

/* ── Questions ───────────────────────────────────────────────────── */
.q-label {
  font-weight: 600;
  font-size: .875rem;
  margin-bottom: .6rem;
  display: block;
  margin-top: 1.25rem;
}
.q-label:first-child { margin-top: 0; }

select.q-select {
  width: 100%;
  padding: .65rem .75rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: .9rem;
  background: #fff;
  color: var(--black);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
}
select.q-select:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: transparent; }

.radio-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
}
.radio-card {
  position: relative;
  cursor: pointer;
}
.radio-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card-body {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: .85rem .5rem;
  text-align: center;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.radio-card input:checked + .radio-card-body {
  border-color: var(--yellow);
  background: #fffef0;
}
.radio-card-icon { font-size: 1.5rem; }
.radio-card-label { font-size: .75rem; font-weight: 600; line-height: 1.3; }

.radio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.radio-pill {
  position: relative;
  cursor: pointer;
}
.radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill-body {
  display: inline-block;
  padding: .4rem .85rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-size: .825rem;
  font-weight: 500;
  transition: all .15s;
}
.radio-pill input:checked + .radio-pill-body {
  border-color: var(--black);
  background: var(--black);
  color: #fff;
}

/* ── Processing spinner ──────────────────────────────────────────── */
.processing-wrap {
  text-align: center;
  padding: 2rem 1rem;
}
.spinner-ring {
  width: 56px;
  height: 56px;
  border: 5px solid var(--border);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.25rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .35rem;
}
.processing-sub {
  font-size: .85rem;
  color: var(--muted);
}
.processing-dots span {
  animation: dot 1.4s infinite;
  display: inline-block;
}
.processing-dots span:nth-child(2) { animation-delay: .2s; }
.processing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%,80%,100% { opacity: 0; } 40% { opacity: 1; } }

/* ── Results ─────────────────────────────────────────────────────── */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1.1rem;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: 1rem;
}
.urgency-badge.emergency { background: var(--emergency); color: #fff; }
.urgency-badge.thisweek  { background: var(--thisweek);  color: #fff; }
.urgency-badge.routine   { background: var(--routine);   color: #fff; }

.issue-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .6rem;
  line-height: 1.3;
}
.issue-description {
  font-size: .9rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.result-divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

.causes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}
.causes-list li {
  padding: .3rem 0 .3rem 1.4rem;
  font-size: .875rem;
  color: #444;
  position: relative;
}
.causes-list li::before {
  content: '›';
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--yellow);
}

.cost-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}
.cost-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .25rem;
}
.cost-range {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--black);
}
.cost-disclaimer {
  font-size: .72rem;
  color: #aaa;
  margin-top: .2rem;
}

.next-step-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: .9rem 1.1rem;
  font-size: .875rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.next-step-box strong { display: block; margin-bottom: .2rem; }

.confidence-note {
  font-size: .75rem;
  color: #aaa;
  margin-bottom: 1.25rem;
  font-style: italic;
}

/* ── CTAs ────────────────────────────────────────────────────────── */
.cta-stack {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.btn-primary-assess {
  display: block;
  width: 100%;
  padding: .9rem 1.5rem;
  background: var(--yellow);
  color: var(--black);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-primary-assess:hover { opacity: .88; }
.btn-secondary-assess {
  display: block;
  width: 100%;
  padding: .85rem 1.5rem;
  background: transparent;
  color: var(--black);
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  border: 2px solid var(--black);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all .15s;
}
.btn-secondary-assess:hover { background: var(--black); color: #fff; }
.btn-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .9rem;
  background: var(--emergency);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s;
}
.btn-call:hover { opacity: .9; }

/* ── Contact form ────────────────────────────────────────────────── */
.form-field {
  margin-bottom: 1rem;
}
.form-field label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .35rem;
  letter-spacing: .02em;
}
.form-field .opt-note {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 400;
}
.form-field input {
  width: 100%;
  padding: .7rem .875rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: .9rem;
  color: var(--black);
}
.form-field input:focus { outline: 2px solid var(--yellow); outline-offset: 0; border-color: transparent; }
.form-error { color: var(--emergency); font-size: .8rem; margin-top: .3rem; display: none; }
.form-error.visible { display: block; }

/* ── Confirmation ────────────────────────────────────────────────── */
.confirm-wrap {
  text-align: center;
  padding: 2rem 1rem;
}
.confirm-icon { font-size: 3rem; margin-bottom: .75rem; }
.confirm-title { font-size: 1.35rem; font-weight: 700; margin-bottom: .5rem; }
.confirm-sub { font-size: .875rem; color: var(--muted); line-height: 1.7; }
.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1.75rem;
}

/* ── Error state ─────────────────────────────────────────────────── */
.api-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--emergency);
  margin-top: 1rem;
  display: none;
}
.api-error.visible { display: block; }

/* ── Trust strip ─────────────────────────────────────────────────── */
.trust-strip {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
}
.trust-item .icon { font-size: 1.1rem; }

/* ── POPIA consent ───────────────────────────────────────────────── */
.popia-note {
  font-size: .72rem;
  color: #aaa;
  margin-top: .75rem;
  line-height: 1.5;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .assess-hero { padding: 2rem 1rem 2.5rem; }
  .step-panel   { padding: 1.25rem 1rem; }
  .radio-cards  { grid-template-columns: 1fr 1fr; }
  .radio-cards .radio-card:last-child { grid-column: span 2; }
  .progress-steps { padding: .75rem 1rem; }
  .step-pip-label { display: none; }
}
