/* ==============================================
   KALKULAČKA CENY WEBU (/calculator/)
   Barvy a písmo přebírá z style.css (proměnné v :root).
   ============================================== */

[hidden] { display: none !important; }

.calc-hero {
  padding-block: 72px 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.calc-hero .eyebrow { margin-bottom: 0.85rem; }

.calc-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.8rem;
}

.calc-hero p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 56ch;
}

.calc-body { padding-block: 48px 96px; }

.calc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.calc-main { min-width: 0; }

/* ---------- Karty kroků ---------- */
.calc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 0 0 1.25rem;
  min-width: 0;
}

.calc-card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  float: left;          /* legend: přestane sedět na rámečku fieldsetu */
  width: 100%;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.calc-card > :not(.calc-card-title) { clear: both; }

.calc-card-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.card-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-left: 3px solid var(--border-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 0.85rem;
  line-height: 1.55;
}

.card-note--hint { margin-top: 0.85rem; }
.card-note strong { color: var(--text); }

/* Nativní inputy zůstávají kvůli klávesnici a čtečkám, jen jsou vizuálně skryté.
   Vybraná volba má třídu .is-checked (nastavuje JS) — :has() starší prohlížeče neumí. */
.package-card input,
.feature-chip input[type="checkbox"],
.domain-opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* ---------- Krok 1: balíčky ---------- */
.package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.1rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.package-card:hover { border-color: var(--accent); }

.package-card.is-checked {
  border-color: var(--accent);
  background: var(--accent-lite);
  box-shadow: 0 0 0 1px var(--accent);
}

.package-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.package-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.package-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.package-card.is-checked .package-name { color: var(--accent); }

.package-radio {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 1.5px solid var(--border-light);
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}

.package-card.is-checked .package-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.package-card.is-checked .package-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.package-price {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.package-price-extra {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.package-desc {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.package-includes-title {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.package-includes {
  list-style: none;
  margin-top: 0.45rem;
  display: grid;
  gap: 0.3rem;
}

.package-more,
.chip-more {
  align-self: flex-start;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-underline-offset: 2px;
}

.chip-more { display: inline-block; margin-top: 0.35rem; font-size: 0.76rem; }

.package-includes li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

/* Fajfka */
.package-includes li::before,
.hosting-check::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.32em;
  width: 0.62rem;
  height: 0.34rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* ---------- Krok 2: doplňky ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.feature-chip {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), box-shadow var(--ease);
}

.feature-chip:hover { border-color: var(--accent); }

.feature-chip.is-checked {
  border-color: var(--accent);
  background: var(--accent-lite);
  box-shadow: 0 0 0 1px var(--accent);
}

.feature-chip:has(input[type="checkbox"]:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.chip-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1.5px solid var(--border-light);
  border-radius: 4px;
  background: var(--surface);
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.feature-chip.is-checked .chip-check {
  border-color: var(--accent);
  background: var(--accent);
}

.feature-chip.is-checked .chip-check::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.chip-body { flex: 1; min-width: 0; display: block; }

.chip-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.18rem;
}

.feature-chip.is-checked .chip-name { color: var(--accent); }

.chip-desc {
  display: block;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.chip-price {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

/* Doplněk s počtem kusů */
.feature-chip--qty {
  flex-direction: column;
  align-items: stretch;
  cursor: default;
}

.feature-chip--qty .chip-name { cursor: pointer; }

/* ---------- Číselné pole s −/+ ---------- */
.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  align-self: flex-start;
}

.stepper input {
  width: 3.5rem;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: var(--text);
  -moz-appearance: textfield;
  appearance: textfield;
}

.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper input:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.stepper-btn {
  width: 2.5rem;
  min-height: 2.5rem;
  border: none;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.stepper-btn:hover { background: var(--accent-lite); color: var(--accent); }
.stepper-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- Krok 2: počet webů ---------- */
.sites-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.sites-label { font-size: 0.92rem; font-weight: 600; }

.sites-formula {
  margin: 0.85rem 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Krok 3: doména a hosting ---------- */
.hosting-line {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.hosting-check {
  position: relative;
  width: 1rem;
  height: 1.3rem;
  flex-shrink: 0;
}

.hosting-check::before { left: 0.1rem; top: 0.4em; }

.domain-lead {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.domain-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.domain-opt {
  position: relative;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease), color var(--ease);
}

.domain-opt:hover { border-color: var(--accent); }

.domain-opt.is-checked {
  border-color: var(--accent);
  background: var(--accent-lite);
  color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.domain-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

.domain-opt-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--text-muted);
}

.domain-opt.is-checked .domain-opt-sub { color: var(--accent); }

/* ---------- Souhrn ---------- */
.price-card {
  position: sticky;
  top: calc(var(--hdr-h) + 1.25rem);
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.price-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
}

.price-line:last-child { border-bottom: none; }

.pl-label { color: var(--text-muted); min-width: 0; }
.pl-val { font-weight: 600; color: var(--text); white-space: nowrap; }

.price-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding-top: 0.75rem;
  margin: 0.3rem 0 1rem;
  border-top: 2px solid var(--border);
}

.price-total-label { font-size: 0.88rem; font-weight: 600; }

.price-total-val {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  white-space: nowrap;
}

.price-total-row--monthly { margin-bottom: 0.75rem; }

.price-monthly-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.price-note {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-lite);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.6rem;
}

.price-vat {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.price-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.88rem 1.4rem;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.price-cta:hover, .price-cta:focus-visible {
  background: var(--accent-2);
  box-shadow: 0 4px 18px rgba(31, 138, 112, 0.3);
}

.price-cta:disabled { opacity: 0.65; cursor: wait; }

.price-phone {
  display: block;
  margin-top: 0.7rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
}

.price-phone:hover { color: var(--accent); }

/* ---------- Slevový kód (jen při COUPONS_ENABLED) ---------- */
.coupon-row { display: flex; gap: 0.55rem; }

.coupon-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.coupon-input.valid { border-color: #2a7f2a; }
.coupon-input.invalid { border-color: #c75b3a; }

.coupon-btn, .coupon-remove-btn {
  padding: 0.65rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.coupon-btn { background: var(--accent); color: #fff; }
.coupon-btn:hover { background: var(--accent-2); }
.coupon-remove-btn { background: var(--surface-2); color: var(--text-muted); }

.coupon-msg { margin-top: 0.55rem; min-height: 1.2em; font-size: 0.82rem; font-weight: 500; }
.coupon-msg.success { color: #2a7f2a; }
.coupon-msg.error { color: #c75b3a; }

/* ---------- Mobilní lišta ---------- */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  padding: 0.75rem 16px calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 24px rgba(31, 138, 112, 0.1);
}

.mobile-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.mobile-prices { min-width: 0; }

.mobile-total {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--accent);
  white-space: nowrap;
}

.mobile-monthly {
  margin-top: 0.1rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.mobile-bar .btn { flex-shrink: 0; padding-inline: 1.1rem; white-space: nowrap; }

/* ---------- Modal s poptávkou ---------- */
.inquiry-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(26, 46, 38, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.inquiry-overlay.open { opacity: 1; }

.inquiry-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  transform: translateY(14px);
  transition: transform 0.25s ease;
}

.inquiry-overlay.open .inquiry-modal { transform: translateY(0); }

.inquiry-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.inquiry-close:hover { background: var(--surface-3); color: var(--text); }

.inquiry-modal h2 {
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
  padding-right: 2.5rem;
}

.inquiry-lead {
  margin-bottom: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.inquiry-summary {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.81rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.inquiry-summary strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--text);
}

.inquiry-price-highlight {
  display: block;
  margin-top: 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.inquiry-price-monthly { display: block; font-weight: 600; color: var(--text); }

.inquiry-modal .form-field { margin-bottom: 0.9rem; }
.label-optional { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 0.78rem; }

.inquiry-success { padding: 1.25rem 0 0.5rem; text-align: center; }
.inquiry-success .form-success-icon { margin: 0 auto 0.75rem; }

/* ---------- Responzivita ---------- */
@media (max-width: 860px) {
  .calc-layout { grid-template-columns: minmax(0, 1fr); }
  .calc-sidebar { display: none; }
  .mobile-bar { display: block; }
  .calc-body { padding-bottom: 120px; }
}

@media (max-width: 600px) {
  .calc-hero { padding-block: 56px 44px; }
  .calc-body { padding-top: 28px; }
  .calc-card { padding: 1.2rem 1rem; }
  .package-grid,
  .features-grid,
  .domain-opts { grid-template-columns: minmax(0, 1fr); }
  .inquiry-modal { padding: 1.4rem 1.1rem; }
}

@media (max-width: 380px) {
  .mobile-total { font-size: 1.05rem; }
  .mobile-bar .btn { padding-inline: 0.85rem; font-size: 0.85rem; }
}
