/* ============================================================
   modal.css — AB Agency audit wizard modal
   Overlay, progress bar, step panels, option grid, result panel,
   email form, scan progress UI, and success confirmation screen.
   ============================================================ */

/* ── MODAL OVERLAY ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 46, 0.55);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 18px;
  width: 520px;
  max-width: 95vw;
  overflow: hidden;
  position: relative;
}

.modal-header {
  padding: 28px 32px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--brand);
  line-height: 1.15;
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 300;
}

.modal-close {
  background: var(--surface);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-light);
  flex-shrink: 0;
  margin-left: 16px;
  font-family: inherit;
  transition: background 0.2s;
}

.modal-close:hover { background: var(--border); }

/* ── PROGRESS BAR ── */
.modal-progress {
  display: flex;
  gap: 4px;
  padding: 20px 32px 0;
}

.progress-seg {
  flex: 1;
  height: 2px;
  border-radius: 100px;
  background: #eef0f4;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.modal-body {
  padding: 24px 32px 32px;
}

/* ── STEP PANELS ── */
.step-panel { display: none; }
.step-panel.active { display: block; }

.modal-step-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.modal-question {
  font-size: 17px;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* ── URL INPUT (Step 0) ── */
.url-input-wrap {
  display: flex;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.url-input-wrap:focus-within { border-color: var(--accent); }

.url-prefix {
  padding: 12px 12px 12px 16px;
  font-size: 13px;
  color: var(--text-light);
  background: transparent;
  border-right: 0.5px solid var(--border);
  white-space: nowrap;
}

.url-field {
  border: none;
  background: transparent;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--brand);
  flex: 1;
  outline: none;
}

.url-field::placeholder { color: #b0bac8; }

.hint-text {
  font-size: 11px;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* ── SCAN PROGRESS (Step 1) ── */
.scan-progress {
  margin: 24px 0;
}

.scan-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 6px;
}

.scan-progress-track {
  height: 6px;
  background: #eef0f4;
  border-radius: 100px;
  overflow: hidden;
}

.scan-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 100px;
  transition: width 0.4s ease;
}

.scan-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.scan-result-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.scan-result-label {
  font-size: 10px;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.scan-result-score {
  font-size: 22px;
  font-family: 'DM Serif Display', serif;
  color: var(--brand);
}

.scan-result-score span {
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-light);
}

/* ── OPTIONS GRID (Steps 2–4) ── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.options-grid--single {
  grid-template-columns: 1fr;
}

.option-btn {
  padding: 14px 16px;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--brand);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
  line-height: 1.4;
}

.option-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim2);
}

.option-btn.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--brand);
  font-weight: 500;
}

.option-btn small {
  display: block;
  font-size: 10px;
  color: var(--text-light);
  font-weight: 400;
  margin-top: 2px;
}

/* ── RESULT PANEL (Step 5) ── */
.result-tier {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
  border: 0.5px solid var(--border);
}

.result-tier-eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.result-tier-name {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--brand);
  margin-bottom: 4px;
}

.result-tier-price {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 16px;
}

.result-features {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.result-feature {
  font-size: 12px;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
}

/* ── EMAIL FORM ── */
.email-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.email-field {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--brand);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s;
}

.email-field:focus { border-color: var(--accent); }
.email-field::placeholder { color: #b0bac8; }

.form-footnote {
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-light);
}

/* ── BUTTONS ── */
.primary-action-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-action-btn:hover { background: var(--brand-mid); }

/* Disabled state until user selects an option */
.primary-action-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 20px;
  padding: 0;
}

.back-link:hover { color: var(--brand); }

/* ── SUCCESS SCREEN (Step 6) ── */
.success-screen {
  text-align: center;
  padding: 20px 0 10px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  color: var(--accent);
}

.success-title {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  color: var(--brand);
  margin-bottom: 10px;
  line-height: 1.2;
}

.success-message {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 300;
  line-height: 1.7;
  max-width: 340px;
  margin: 0 auto;
}

.success-screen .primary-action-btn {
  margin-top: 28px;
}
