/* =============================================================================
   FoodTruckBattery.com — Generator-Based Calculator UI
   Matches the existing PowerCheck wizard (wizard-r4.css) design language:
   Cabinet Grotesk headings, --pc-accent (#FF6B35), .wizard-card, rounded 10px.
   ============================================================================= */

#generator-calc-mount, #path-chooser-mount {
  max-width: 720px;
  margin: 1rem auto;
  padding: 0 1rem;
}

/* ---------- Path chooser ---------- */
.path-chooser-card {
  background: var(--pc-bg-card, #ffffff);
  border: 1px solid var(--pc-border, #e2e8f0);
  border-radius: 10px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.path-chooser-h2 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--pc-text-heading, #1a202c);
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
  text-align: center;
}
.path-chooser-sub {
  font-size: 0.95rem;
  color: var(--pc-text-secondary, #4a5568);
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
  text-align: center;
}
.path-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.path-option {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 1.25rem 1.1rem;
  background: var(--pc-bg-card, #ffffff);
  border: 2px solid var(--pc-border, #e2e8f0);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 160px;
}
.path-option:hover {
  border-color: var(--pc-accent, #FF6B35);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.12);
}
.path-option-icon { font-size: 1.9rem; margin-bottom: 0.6rem; }
.path-option-title {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--pc-text-heading, #1a202c);
  margin-bottom: 0.4rem;
}
.path-option-desc {
  font-size: 0.86rem;
  color: var(--pc-text-secondary, #4a5568);
  line-height: 1.5;
  flex: 1;
}
.path-option-cta {
  margin-top: 0.9rem;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pc-accent, #FF6B35);
}

/* ---------- Generator wizard (reuses wizard tokens) ---------- */
.gen-card {
  background: var(--pc-bg-card, #ffffff);
  border: 1px solid var(--pc-border, #e2e8f0);
  border-radius: 10px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.gen-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 1.25rem;
}
.gen-progress-dot {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: var(--pc-border, #e2e8f0);
  transition: background 0.2s ease;
}
.gen-progress-dot.active { background: var(--pc-accent, #FF6B35); }
.gen-progress-dot.done { background: #fbbf24; }

.gen-h2 {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--pc-text-heading, #1a202c);
  margin: 0 0 0.4rem 0;
  line-height: 1.2;
}
.gen-sub {
  font-size: 0.92rem;
  color: var(--pc-text-secondary, #4a5568);
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
}
.gen-label {
  display: block;
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pc-text-heading, #1a202c);
  margin: 1.1rem 0 0.4rem 0;
}
.gen-label .req { color: var(--pc-accent, #FF6B35); }
.gen-label .gen-optional {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--pc-text-secondary, #718096);
  text-transform: none;
  letter-spacing: 0;
}
.gen-help {
  font-size: 0.8rem;
  color: var(--pc-text-secondary, #4a5568);
  line-height: 1.45;
  margin: 0.2rem 0 0.5rem 0;
}

.gen-input, .gen-select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid var(--pc-border, #e2e8f0);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--pc-text, #2d3748);
  background: #fff;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}
.gen-input:focus, .gen-select:focus {
  outline: none;
  border-color: var(--pc-accent, #FF6B35);
}
.gen-input-row {
  display: flex;
  gap: 0.6rem;
}
.gen-input-row > * { flex: 1; }
.gen-input-unit {
  display: flex;
  align-items: center;
}
.gen-input-unit .gen-input { border-radius: 8px 0 0 8px; }
.gen-input-unit .gen-select {
  max-width: 110px;
  border-radius: 0 8px 8px 0;
  border-left: none;
}

/* selectable option grid (fuel type, gen class, voltage) */
.gen-opt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.6rem;
  margin: 0.4rem 0 0.5rem 0;
}
.gen-opt-btn {
  padding: 0.8rem 0.6rem;
  background: #fff;
  border: 1.5px solid var(--pc-border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pc-text, #2d3748);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 52px;
  text-align: center;
  line-height: 1.3;
}
.gen-opt-btn:hover { border-color: var(--pc-accent, #FF6B35); }
.gen-opt-btn.selected {
  background: var(--pc-accent, #FF6B35);
  border-color: var(--pc-accent, #FF6B35);
  color: #fff;
}
.gen-opt-btn .opt-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 2px;
}

.gen-tip {
  background: rgba(255, 107, 53, 0.06);
  border-left: 3px solid var(--pc-accent, #FF6B35);
  padding: 0.75rem 1rem;
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--pc-text, #2d3748);
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
}
.gen-tip strong { color: var(--pc-text-heading, #1a202c); }

/* page-1 disclaimer: subtle amber note steering the wrong-fit user to the equipment calc */
.gen-disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #78500f;
  margin: 0.5rem 0 1.25rem 0;
}
.gen-disclaimer strong { color: #92400e; }
.gen-disclaimer a { color: var(--pc-accent, #FF6B35); font-weight: 700; text-decoration: underline; cursor: pointer; }

/* hours slider */
.gen-slider-row { display: flex; align-items: center; gap: 1rem; margin: 0.5rem 0; }
.gen-slider { flex: 1; accent-color: var(--pc-accent, #FF6B35); height: 6px; }
.gen-slider-val {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--pc-accent, #FF6B35);
  min-width: 84px;
  text-align: right;
}
.gen-slider-unit { font-size: 0.85rem; font-weight: 600; color: var(--pc-text-secondary, #4a5568); }

/* upload (optional) */
.gen-upload-zone {
  border: 2px dashed var(--pc-border, #cbd5e0);
  border-radius: 10px;
  padding: 1.1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin: 0.5rem 0;
}
.gen-upload-zone:hover { border-color: var(--pc-accent, #FF6B35); background: rgba(255,107,53,0.03); }
.gen-upload-zone .up-icon { font-size: 1.5rem; }
.gen-upload-zone .up-text { font-size: 0.85rem; color: var(--pc-text-secondary, #4a5568); margin-top: 0.3rem; }
.gen-upload-filename { font-size: 0.82rem; color: var(--pc-accent, #FF6B35); font-weight: 600; margin-top: 0.4rem; }

/* nav */
.gen-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--pc-border, #e2e8f0);
  gap: 0.5rem;
}
.gen-btn-back, .gen-btn-next {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1.6rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  min-height: 48px;
}
.gen-btn-back {
  background: transparent;
  color: var(--pc-text-secondary, #4a5568);
  border: 1.5px solid var(--pc-border, #e2e8f0);
}
.gen-btn-back:hover { border-color: var(--pc-text-secondary, #4a5568); }
.gen-btn-next { background: var(--pc-accent, #FF6B35); color: #fff; }
.gen-btn-next:hover { background: #e85a25; }
.gen-btn-next:disabled { opacity: 0.45; cursor: not-allowed; }

.gen-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin: 0.75rem 0;
}
.gen-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.83rem;
  margin: 0.6rem 0;
  line-height: 1.5;
}
.gen-example {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #075985;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  margin: 0.75rem 0 0.25rem;
  line-height: 1.5;
}
.gen-inline-btn {
  background: #b91c1c;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-left: 0.35rem;
}
.gen-inline-btn:hover { background: #991b1b; }

/* live watts-vs-kW auto-detect hint under a rating field */
.gen-detect {
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0.3rem 0 0.15rem;
  padding: 0.4rem 0.6rem;
  border-radius: 7px;
  display: none;
}
.gen-detect.show { display: block; }
.gen-detect.is-w {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.gen-detect.is-kw {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.gen-detect.is-warn {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.gen-detect strong { font-weight: 700; }

/* =========================================================================
   RESULTS SCREEN — matches the buy-now matcher card design language below it
   (navy pill, white rounded card, consistent stat treatment).
   ========================================================================= */
.gen-result-card { border: 1.5px solid #0c4a6e; }

.gen-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.gen-result-pill {
  background: #0c4a6e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.gen-result-sub {
  font-size: 0.88rem;
  color: var(--pc-text-secondary, #4a5568);
  line-height: 1.5;
  margin: 0.15rem 0 1rem 0;
}

/* Headline stat — the recommended installed battery (the number that matters) */
.gen-headline-stat {
  background: linear-gradient(180deg, #f0f7fb 0%, #f8fafc 100%);
  border: 1.5px solid #bfdbeb;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 0.8rem;
  text-align: center;
}
.gen-headline-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #0c4a6e;
  margin-bottom: 0.15rem;
}
.gen-headline-value {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 2.9rem;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.01em;
}
.gen-headline-unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pc-text-secondary, #4a5568);
  margin-left: 0.25rem;
}
.gen-headline-note {
  font-size: 0.82rem;
  color: var(--pc-text-secondary, #4a5568);
  line-height: 1.5;
  margin-top: 0.5rem;
}
.gen-headline-note strong { color: #0f172a; }

/* Supporting stat grid — now 2-up (inverter + surge) */
.gen-result-hero {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  margin: 0 0 1rem 0;
}
.gen-stat {
  background: #f8fafc;
  border: 1px solid var(--pc-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 0.6rem;
  text-align: center;
}
.gen-stat-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: var(--pc-text-secondary, #4a5568);
  margin-bottom: 0.25rem;
}
.gen-stat-value {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--pc-text-heading, #1a202c);
  line-height: 1.1;
}
.gen-stat-unit { font-size: 0.78rem; font-weight: 600; color: var(--pc-text-secondary, #4a5568); }

.gen-conf {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}
.gen-conf.HIGH { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.gen-conf.MEDIUM { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.gen-conf.LOW { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* "How we got there" — collapsible stepped panel, matches card system */
.gen-how {
  background: #f8fafc;
  border: 1px solid var(--pc-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.4rem 0.9rem;
  margin: 0.25rem 0 0.5rem 0;
}
.gen-how-summary {
  font-family: 'Cabinet Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--pc-text-heading, #1a202c);
  cursor: pointer;
  padding: 0.55rem 0;
  list-style: none;
  outline: none;
}
.gen-how-summary::-webkit-details-marker { display: none; }
.gen-how-summary::after {
  content: '\203A';
  float: right;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--pc-text-secondary, #4a5568);
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}
.gen-how[open] .gen-how-summary::after { transform: rotate(-90deg); }
.gen-how-body { padding: 0.2rem 0 0.7rem 0; }
.gen-how-step {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--pc-text, #2d3748);
  line-height: 1.5;
  margin-bottom: 0.55rem;
}
.gen-how-step:last-child { margin-bottom: 0; }
.gen-how-num {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #0c4a6e;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.gen-how-step strong { color: #0f172a; }

/* mobile */
@media (max-width: 600px) {
  #generator-calc-mount, #path-chooser-mount { padding: 0 0.6rem; margin: 0.5rem auto; }
  .gen-card, .path-chooser-card { padding: 1.1rem 0.9rem; border-radius: 8px; }
  .gen-h2, .path-chooser-h2 { font-size: 1.2rem; }
  .path-options { grid-template-columns: 1fr; }
  .gen-headline-value { font-size: 2.4rem; }
  .gen-result-hero { grid-template-columns: repeat(2, 1fr); gap: 0.45rem; }
  .gen-stat { padding: 0.65rem 0.35rem; }
  .gen-stat-value { font-size: 1.15rem; }
  .gen-stat-label { font-size: 0.6rem; }
}
