﻿@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --primary: #FE4C20;
  --primary-dark: #e0431a;
  --primary-tint: rgba(254, 76, 32, 0.07);
  --secondary: #333333;
  --bg: #f5f5f5;
  --card: #ffffff;
  --border: #e8e8e8;
  --muted: #666666;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);
  --anim-out: 400ms;
  --anim-in: 400ms;
  --anim-confirm: 200ms;
}

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

body {
  font-family: 'Open Sans', Arial, sans-serif;
  background: var(--bg);
  color: var(--secondary);
  line-height: 1.5;
  min-height: 100vh;
}

html.equipmentcalc-embed,
body.equipmentcalc-embed {
  overflow: hidden !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

body.equipmentcalc-embed {
  min-height: 0 !important;
  background: var(--bg);
}

body.equipmentcalc-embed .wrap {
  position: relative;
  overflow: visible;
}

html.equipmentcalc-embed.equipmentcalc-embed-fullscreen {
  overflow: hidden !important;
  height: 100% !important;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen {
  overflow: hidden !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen .wrap {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 960px;
  height: 100%;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
  padding: 56px 16px 20px;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen header,
body.equipmentcalc-embed.equipmentcalc-embed-fullscreen .progress {
  flex-shrink: 0;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card.step.active {
  display: flex;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen .sub-scroll,
body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card > .photo-cards {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card {
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 0;
}

body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card > h2,
body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card > .hint,
body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card > .limit-hint,
body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card > .env-rec,
body.equipmentcalc-embed.equipmentcalc-embed-fullscreen #quiz > .card > .nav {
  flex-shrink: 0;
}

.ec-fullscreen-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  width: auto;
  height: 40px;
}

.ec-fullscreen-btn {
  position: relative;
  inset: auto;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--secondary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ec-fullscreen-btn[hidden] {
  display: none !important;
}

.ec-fullscreen-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff7f5;
  box-shadow: 0 4px 16px rgba(254, 76, 32, 0.15);
}

.ec-fullscreen-btn:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(254, 76, 32, 0.2);
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header {
  text-align: center;
  margin-bottom: 28px;
}

header h1 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 8px;
}

header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}

.progress span {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}

.progress span.done { background: var(--primary); }
.progress span.active { background: var(--primary); opacity: 0.6; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.card-anim {
  transition: opacity var(--anim-out) ease, transform var(--anim-out) ease;
}

.card-anim.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.card-anim.is-entering {
  animation: cardEnter var(--anim-in) ease forwards;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.card .hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.options {
  display: grid;
  gap: 10px;
  padding: 2px;
}

.options.cols-2 { grid-template-columns: repeat(2, 1fr); }
.options.cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .options.cols-2,
  .options.cols-3 { grid-template-columns: 1fr; }
}

@media (min-width: 721px) and (max-width: 900px) {
  .options.cols-3 { grid-template-columns: repeat(2, 1fr); }
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.option-btn:hover {
  box-shadow: var(--shadow-hover);
  border-color: #ddd;
}

.option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.option-btn.is-confirming {
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  background: var(--primary-tint);
}

.option-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.option-btn .opt-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.option-btn .opt-label { flex: 1; }

.option-check {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.option-check:hover:not(.disabled) {
  box-shadow: var(--shadow-hover);
}

.option-check.selected {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.option-check.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.option-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.option-check.disabled input { cursor: not-allowed; }

.option-check .opt-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.option-check .opt-label { flex: 1; font-size: 0.92rem; }

.limit-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.limit-hint strong { color: var(--primary); }

.photo-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 720px) {
  .photo-cards { grid-template-columns: 1fr; }
}

.photo-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.photo-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.photo-card.selected {
  border-color: var(--primary);
  background: var(--primary-tint);
}

.photo-card.is-confirming {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary);
  background: var(--primary-tint);
}

.photo-card__img {
  flex: 1;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #F5F5F5;
}

.photo-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #F5F5F5;
}

.photo-card__title {
  padding: 14px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary);
}

.sub-scroll {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 8px;
  margin-bottom: 4px;
}

body.equipmentcalc-embed:not(.equipmentcalc-embed-fullscreen) .sub-scroll.results-scroll,
body.equipmentcalc-embed:not(.equipmentcalc-embed-fullscreen) .sub-scroll.photo-scroll {
  max-height: none;
  overflow: visible;
  padding: 0;
  margin-bottom: 0;
}

.sub-scroll::-webkit-scrollbar { width: 6px; }
.sub-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.subsection-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin: 16px 0 8px;
}

.subsection-title:first-child { margin-top: 0; }

.zone-group { margin-bottom: 18px; }

.zone-group h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.slider-row input[type="range"] {
  flex: 1;
  min-width: 180px;
  accent-color: var(--primary);
}

.area-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.area-input-wrap input[type="number"] {
  width: 100px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.area-input-wrap input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
}

.area-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.env-rec {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f9f9f9;
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.nav.nav-end { justify-content: flex-end; }

.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--border);
}

.btn-ghost:hover { border-color: #ccc; }

.step { display: none; }
.step.active { display: block; }

.results-budget {
  text-align: center;
  padding: 24px 20px;
  background: linear-gradient(135deg, #fff5f2, #fff);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.results-budget .range {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--primary);
  margin: 8px 0;
}

.summary-list {
  list-style: none;
  margin: 16px 0;
}

.summary-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.summary-list li strong { color: var(--secondary); }

.equipment-block h3 { margin: 20px 0 10px; font-size: 1rem; }

.equipment-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.equipment-tags span {
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.lead-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

.lead-form input:not([type="checkbox"]):not([type="file"]),
.lead-form textarea {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}

.lead-form input[type="file"] {
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 400;
}

.lead-form input:focus,
.lead-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.lead-form label.consent-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 8px;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
}

.lead-form label.consent-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  flex-shrink: 0;
  align-self: center;
}

.lead-form label.consent-check a {
  color: var(--primary);
  text-decoration: underline;
}

.legal {
  margin-top: 16px;
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
}

.legal--header {
  max-width: 720px;
  margin: 12px auto 0;
  text-align: center;
  font-size: 0.78rem;
}

@media (max-width: 600px) {
  .card { padding: 20px 16px; }
  .nav { flex-direction: column-reverse; }
  .btn { width: 100%; }
}

.ec-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 24, 39, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ec-modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

body.ec-modal-open {
  overflow: hidden;
}

.ec-modal {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 28px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s ease;
}

.ec-modal-overlay.is-visible .ec-modal {
  transform: translateY(0) scale(1);
}

.ec-modal__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(254, 76, 32, 0.12);
  color: var(--primary);
  font-size: 32px;
  font-weight: 700;
  line-height: 64px;
}

.ec-modal__title {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
}

.ec-modal__text {
  margin: 0 0 24px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
  white-space: pre-line;
}

.ec-modal__btn {
  width: 100%;
  max-width: 220px;
}
