/* Steps */
.flow { max-width: 640px; margin: 0 auto }
.step { display: none }
.step.active { display: block }
.step-header { margin-bottom: 24px }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; margin-bottom: 10px;
}
.step h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px }
.step-sub { color: var(--muted); font-size: 14px }

/* Fields */
.fields { display: grid; gap: 16px; margin-bottom: 20px }
.field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px }
.field-head label { margin-bottom: 0 }
.btn-optimize {
  font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 8px;
  background: rgba(224,168,50,.1); border: 1px solid rgba(224,168,50,.25); color: var(--amber);
  cursor: pointer; letter-spacing: .02em;
}
.btn-optimize:hover { background: rgba(224,168,50,.18) }
.btn-optimize:disabled { opacity: .4; cursor: default }
.btn-verify {
  font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 8px;
  background: rgba(91,163,245,.1); border: 1px solid rgba(91,163,245,.25); color: var(--accent);
  cursor: pointer;
}
.btn-verify:hover { background: rgba(91,163,245,.2) }
@keyframes flash-red {
  0%, 100% { border-color: var(--line) }
  25%, 75% { border-color: var(--red); box-shadow: 0 0 8px rgba(224,88,88,.3) }
  50% { border-color: var(--red); box-shadow: 0 0 14px rgba(224,88,88,.4) }
}
.field-flash input, .field-flash select { animation: flash-red .8s ease }
.optimize-result {
  margin-top: 8px; padding: 12px 14px; background: rgba(224,168,50,.06);
  border: 1px solid rgba(224,168,50,.15); border-radius: 10px; font-size: 13px; line-height: 1.6;
}
.optimize-result .opt-loading { color: var(--amber); font-style: italic }
.optimize-result .opt-suggestion { color: var(--text); margin-bottom: 6px }
.optimize-result .opt-why { color: var(--muted); font-size: 14px; margin-bottom: 8px }
.opt-items { display: grid; gap: 6px; margin-bottom: 8px }
.opt-item {
  padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; font-size: 13px;
}
.opt-item:hover { border-color: var(--amber); background: rgba(224,168,50,.06) }
.field-row { display: flex; gap: 12px; align-items: flex-end }
.field-grow { flex: 1 }
.field-fixed { width: 100px; flex-shrink: 0 }
.field label {
  display: block; font-size: 14px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); font-size: 15px; font-family: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
}
.field textarea { resize: vertical }
.field select { cursor: pointer }

/* Browser autofill paints its own light background via :-webkit-autofill, which a normal
   background rule can't override. Paint over it with an inset box-shadow + force text color
   so autofilled fields keep the dark theme instead of flashing white. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s; /* delays the browser's bg from showing */
}

/* Emphasised helper note under an important field (e.g. Industry drives ads + research). */
.field-note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 8px;
  padding: 9px 12px; border-radius: 9px;
  background: rgba(91,163,245,.08); border: 1px solid rgba(91,163,245,.35);
  font-size: 12.5px; line-height: 1.45; color: var(--text); text-transform: none; letter-spacing: 0;
}
.field-note .fn-icon { flex-shrink: 0; font-size: 14px; line-height: 1.3 }
.field-note strong { font-weight: 800 }

/* Read-only radius shown next to Target Location (radius is edited in Setup → Service Areas) */
.radius-readonly { padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 15px; text-align: center; white-space: nowrap }
.target-radius-tip { margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.5 }
.target-radius-tip .trt-link { border: none; background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline }
.target-radius-tip .trt-link:hover { filter: brightness(1.1) }

/* Create tab: "no service areas yet" empty state for the Target Location dropdown */
.target-loc-empty { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: rgba(91,163,245,.08); border: 1px solid rgba(91,163,245,.4) }
.target-loc-empty span { font-size: 14px; color: var(--text); line-height: 1.5 }
.tle-btn { border: none; border-radius: 9px; padding: 10px 18px; background: var(--accent); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(91,163,245,.35); transition: transform .1s, filter .15s }
.tle-btn:hover { transform: translateY(-1px); filter: brightness(1.06) }

/* Service Areas manager (multiple locations per business) */
.sa-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px }
.sa-row .sa-city { flex: 1 1 auto; min-width: 0 }
.sa-row .sa-zip { width: 110px; flex: 0 0 auto }
.sa-row .sa-radius { width: 94px; flex: 0 0 auto; cursor: pointer }
.sa-row input, .sa-row select { padding: 11px 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 15px; font-family: inherit }
.sa-row input:focus, .sa-row select:focus { outline: none; border-color: var(--accent) }
.sa-row .sa-remove { flex: 0 0 auto; width: 36px; height: 40px; border: 1px solid var(--line); background: none; color: var(--muted); border-radius: 8px; cursor: pointer; font-size: 13px }
.sa-row .sa-remove:hover { color: var(--red); border-color: var(--red) }
.sa-remove-spacer { width: 36px; flex: 0 0 auto }
.sa-add-btn { margin-top: 4px; border: 1px dashed var(--line); background: none; color: var(--accent); font-weight: 700; font-size: 13.5px; padding: 9px 14px; border-radius: 9px; cursor: pointer }
.sa-add-btn:hover { border-color: var(--accent); background: rgba(91,163,245,.08) }

/* Create Step 1 identity summary (read-only mirror of Setup's name/industry/service) */
.create-identity { margin-bottom: 18px; padding: 16px 18px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line) }
.create-identity.is-missing { background: rgba(91,163,245,.08); border-color: rgba(91,163,245,.45) }
.create-identity .cid-rows { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px }
.create-identity .cid-row { display: flex; gap: 12px; align-items: baseline }
.create-identity .cid-label { width: 92px; flex-shrink: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted) }
.create-identity .cid-value { font-size: 16px; font-weight: 600; color: var(--text) }
.create-identity .cid-missing { color: var(--red); font-weight: 600; font-style: italic }
.create-identity .cid-note { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; line-height: 1.5 }
.create-identity .cid-btn { border: none; border-radius: 9px; cursor: pointer; padding: 11px 20px; font-size: 14px; font-weight: 800; background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(91,163,245,.35); transition: transform .1s, filter .15s }
.create-identity .cid-btn:hover { transform: translateY(-1px); filter: brightness(1.06) }
.create-identity .cid-btn.ghost { background: none; color: var(--accent); box-shadow: none; padding: 8px 12px; font-weight: 700 }
.create-identity .cid-btn.ghost:hover { background: rgba(91,163,245,.12); transform: none }

/* Live "what's left this month" counter at the top of the Create flow */
.create-usage-bar {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  margin-bottom: 16px; padding: 11px 16px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); font-size: 14px;
}
.create-usage-bar .cu-item { color: var(--muted) }
.create-usage-bar .cu-item b { color: var(--text); font-size: 15px }
.create-usage-bar .cu-label { font-weight: 700; color: var(--text); margin-right: 4px }
.create-usage-bar .cu-extra { color: var(--accent); font-weight: 700; margin-left: 4px }
.create-usage-bar .cu-low b { color: #d9a441 }
.create-usage-bar .cu-out b { color: var(--red) }

/* "Not sure? Help me choose" link-button beside a field label */
.field-help-btn {
  border: none; background: none; color: var(--accent); cursor: pointer;
  font-size: 12.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
  text-transform: none; letter-spacing: 0;
}
.field-help-btn:hover { background: rgba(91,163,245,.14) }

/* Spotlight box — for the single most important field (Industry). Made to stand out hard. */
.field-spotlight {
  margin: 22px 0; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(91,163,245,.12), rgba(91,163,245,.05));
  border: 2px solid rgba(91,163,245,.55);
  box-shadow: 0 0 0 4px rgba(91,163,245,.08), 0 6px 20px rgba(91,163,245,.12);
}
.field-spotlight .fs-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 12px;
}
.fs-title { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: var(--text) }
.fs-star { font-size: 17px }
.fs-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: rgba(91,163,245,.16); border: 1px solid rgba(91,163,245,.4);
  padding: 2px 8px; border-radius: 999px;
}
.fs-input {
  width: 100%; padding: 13px 15px; font-size: 16px; font-family: inherit; color: var(--text);
  background: var(--bg); border: 1.5px solid rgba(91,163,245,.45); border-radius: 10px;
}
.fs-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91,163,245,.18) }
.fs-note { margin-top: 11px; font-size: 13px; line-height: 1.5; color: var(--muted) }
.fs-note strong { color: var(--text); font-weight: 700 }

/* The standout "Help me choose" button inside the spotlight */
.fs-help-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 800;
  color: #fff; background: var(--accent); border: none;
  box-shadow: 0 2px 10px rgba(91,163,245,.4); transition: transform .1s, box-shadow .15s, filter .15s;
}
.fs-help-btn:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: 0 4px 16px rgba(91,163,245,.55) }

/* Industry Helper modal results */
.ih-results { margin: 4px 0 2px }
.ih-results-head { font-size: 16.5px; color: var(--muted); margin-bottom: 10px }
.ih-loading { font-size: 17px; color: var(--muted); padding: 14px 0 }
.ih-error { font-size: 17px; color: var(--red); padding: 10px 0 }
.ih-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  padding: 15px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
.ih-card-body { flex: 1 }
.ih-card-name { font-size: 19px; font-weight: 800; color: var(--text) }
.ih-card-why { font-size: 16.5px; color: var(--muted); line-height: 1.55; margin-top: 4px }
.ih-use-btn {
  flex-shrink: 0; border: none; border-radius: 8px; cursor: pointer;
  padding: 11px 20px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700;
}
.ih-use-btn:hover { filter: brightness(1.08) }
.ih-tip { margin-top: 12px; font-size: 16px; color: var(--muted); line-height: 1.55 }

/* Buttons */
.btn-next, .btn-generate, .btn-back, .btn-save {
  padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
}
.btn-next, .btn-generate {
  background: var(--accent); color: #fff;
}
.btn-next:hover, .btn-generate:hover { opacity: .9 }
.btn-back {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
}
.btn-back:hover { color: var(--text); border-color: var(--line2) }
.btn-save {
  background: var(--green); color: #fff; font-size: 14px; padding: 6px 14px;
}
.btn-save:hover { opacity: .9 }
.btn-save:disabled { opacity: .4; cursor: default }
.step-nav { display: flex; gap: 10px; justify-content: space-between }

/* Loading */
.loading { text-align: center; padding: 60px 0 }
.loading p { color: var(--muted); margin-top: 16px }
.loading-sub { font-size: 13px; opacity: .7 }
.spinner {
  width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg) } }

.opt-item-recommended { border-color: var(--green) !important; background: rgba(52,200,138,.06) }
.opt-recommended-badge { font-size: 12px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); z-index: 99999; display: flex; align-items: center; justify-content: center }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px 32px; width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3) }
.modal h2 { font-size: 26px; margin-bottom: 8px }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px }

/* Readability: every .modal popup uses large, easy-to-read text. */
.modal { font-size: 17px; line-height: 1.6 }
.modal h3 { font-size: 20px }
.modal p, .modal .step-sub, .modal li { font-size: 17px; line-height: 1.6 }
.modal .field label { font-size: 15px }
.modal input, .modal textarea, .modal select { font-size: 17px }
.modal .modal-actions button, .modal button.btn-back, .modal button.btn-generate { font-size: 16px }
.biz-modal { width: 520px; max-height: 85vh; display: flex; flex-direction: column }
.biz-form-scroll { overflow-y: auto; flex: 1; margin: 12px 0; padding-right: 8px }
.biz-section-label {
  font-size: 13px; font-weight: 700; color: var(--accent); text-transform: uppercase;
  letter-spacing: .08em; margin-top: 16px; margin-bottom: 8px; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.biz-section-label:first-child { border-top: none; margin-top: 0; padding-top: 0 }
.biz-hours-grid { display: grid; gap: 8px }
.biz-hours-row { display: flex; align-items: center; gap: 12px }
.biz-hours-row span { min-width: 80px; font-size: 14px; color: var(--muted) }
.biz-hours-row input { flex: 1 }
.promo-badge { display: inline-block; padding: 2px 8px; background: rgba(224,168,50,.12); color: var(--amber); border-radius: 6px; font-size: 13px; font-weight: 600; margin-left: 6px }
