/* Špecifické štýly kalkulačky. Načítavajú sa po tokens.css a web.css.
   Hlavička, pätička, typografia a tlačidlá používajú spoločný web.css. */

.gate {
  padding: 1.6em;
}
#unlock-status:not(:empty) {
  margin: 16px 24px;
}
.gate h3 {
  margin: 0 0 8px;
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.gate .field {
  margin-top: 14px;
}
.gate .check {
  margin-top: 16px;
}
.gate .btn {
  width: 100%;
  margin-top: 20px;
}
.locked-preview {
  padding: 1.2em;
  margin-bottom: 22px;
  background: var(--bg);
  border-radius: var(--radius-md);
  color: var(--muted);
}
.locked-preview span {
  display: block;
  height: 12px;
  margin: 14px 0;
  border-radius: 8px;
  background: #dce0e6;
  width: 80%;
}
.locked-preview span:last-child {
  width: 55%;
}
.benefits {
  margin-top: var(--space-lg);
}
.benefit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
}
.benefit {
  padding: 1.4em;
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.benefit h3 {
  margin: 0 0 10px;
  font-size: var(--fs-md);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.benefit p,
.benefit ul {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.benefit strong {
  color: var(--red-text);
}
@media (max-width: 600px) {
  .benefit-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: block;
  background: var(--surface);
  border-bottom: 1px solid #eef1f5;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.breadcrumb .wrap {
  width: 100%;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-block: 12px;
}
.breadcrumb a {
  font-size: inherit;
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--red);
}
.breadcrumb span[aria-current] {
  color: var(--ink);
}

/* ---------- Hero ---------- */
/* Fotka na pozadí so svetlým prechodom zľava – rovnako ako úvod landing page.
   Desktop: kalkulacka-hero.webp (človek vpravo), mobil: kalkulacka-hero-mobil.webp */
.calc-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: flex;
  align-items: center;
  min-height: 480px;
  overflow: hidden;
  background-color: #fff;
  background-image: linear-gradient(
      90deg,
      #fff 0%,
      rgba(255, 255, 255, 0.98) 31%,
      rgba(255, 255, 255, 0.62) 47%,
      rgba(255, 255, 255, 0) 64%
    ),
    url("../img/kalkulacka-hero.webp");
  background-position: center, right center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-copy {
  width: min(50%, 560px);
  padding-block: var(--space-2xl);
}
.calc-hero h1 {
  max-width: 16ch;
  margin: 0 0 var(--space-md);
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.03em;
  font-weight: 800;
}
.calc-hero p {
  margin: 0 0 var(--space-lg);
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: var(--fs-md);
}

/* ---------- Čo vám kalkulačka ukáže ---------- */
.outputs {
  padding-block: var(--section-y) var(--space-2xl);
  background: var(--bg);
}
.outputs-head {
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}
.outputs-head h2 {
  margin: 0 0 var(--space-sm);
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.outputs-head p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-md);
}
.outputs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.output-card {
  display: flex;
  flex-direction: column;
  padding: 1.6em 1.5em 1.5em;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: translate var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.output-card:hover {
  translate: 0 -6px;
  border-color: rgba(227, 6, 19, 0.25);
  box-shadow: var(--shadow-lg);
}
/* hlavný výsledok – zvýraznený červeným okrajom */
.output-card.is-key {
  border-color: rgba(227, 6, 19, 0.3);
  box-shadow: 0 0 0 3px var(--red-soft), var(--shadow-sm);
}
.output-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-md);
  border-radius: 14px;
  background: var(--red-soft);
  transition: transform var(--dur) var(--ease-out);
}
.output-card:hover .output-icon {
  transform: rotate(-6deg) scale(1.08);
}
.output-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.output-card h3 {
  margin: 0 0 6px;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.output-card p {
  margin: 0 0 var(--space-md);
  color: var(--muted);
  font-size: var(--fs-sm);
}
/* skutočný vzorec z kalkulačky */
.formula {
  align-self: flex-start;
  margin-top: auto;
  padding: 0.45em 0.8em;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--ink-soft);
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.formula b {
  color: var(--red-text);
}
.outputs-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: var(--space-lg) 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  text-align: center;
}
.outputs-note svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Calculator layout ---------- */
.calc-section .wrap {
  padding-block: 8px var(--space-2xl);
}
/* Kontakty na pomoc s vyplnením – nad kalkulačkou */
.calc-help {
  margin-bottom: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid rgba(227, 6, 19, 0.25);
  border-radius: var(--radius-md);
  background: var(--red-soft);
  font-size: var(--fs-sm);
}
.calc-help ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-lg);
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.calc-help a {
  font-weight: 700;
  white-space: nowrap;
}
.calc-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--grid-gap);
  align-items: start;
}
.calc-section .card {
  padding: 0;
}
.card-head {
  padding: 1.4em 1.6em 0;
}
.card-head h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.card-head p {
  margin: 6px 0 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.card-body {
  padding: 1.2em 1.6em 1.6em;
}

/* ---------- Form ---------- */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}
.field {
  gap: 0;
  min-width: 0;
}
.field.is-full {
  grid-column: 1 / -1;
}
.field label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.field label .dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--red);
  flex: 0 0 auto;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.65em 0.85em;
  transition: border-color var(--dur-fast) ease,
    box-shadow var(--dur) var(--ease-out);
}
/* natívny select (bez JS) – vlastná šípka a viac miesta vpravo */
.field select {
  appearance: none;
  padding-right: 3em;
  background: var(--surface) var(--icon-chevron) right 0.9em center / 1.15em no-repeat;
  cursor: pointer;
}
.field input:hover,
.field select:hover {
  border-color: #aab1bb;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}
.field input:focus-visible,
.field select:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.field input.has-unit {
  padding-right: 52px;
}
.unit {
  position: absolute;
  right: 12px;
  font-size: var(--fs-sm);
  color: var(--muted);
  pointer-events: none;
}
.hint {
  margin: 5px 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.4;
}
/* Chybové stavy – ponechané bez zmeny */
.field.has-error input {
  border-color: var(--red);
  background: var(--red-soft);
}
.error {
  display: none;
  margin: 5px 0 0;
  font-size: 12px;
  color: var(--red);
  font-weight: 500;
}
.field.has-error .error {
  display: block;
}
.field.has-error .hint {
  display: none;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

/* ---------- Result ---------- */
.result-card {
  position: sticky;
  top: 92px;
}
.result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 1.4em 1.6em 0;
}
.result-head h2 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.result-head span {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.result-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.result-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 0.75em 0;
  border-bottom: 1px solid #eef1f5;
}
.result-list li:last-child {
  border-bottom: 0;
}
.result-list .r-label {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
}
.result-list .r-value {
  font-size: var(--fs-base);
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-highlight {
  margin-top: 14px;
  padding: 1em 1.15em;
  border-radius: var(--radius-md);
  background: var(--red-soft);
  border: 1px solid rgba(227, 6, 19, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.result-highlight .rh-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink);
}
.result-highlight .rh-sub {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-soft);
}
.result-highlight .rh-value {
  font-family: var(--font-heading);
  font-stretch: var(--heading-stretch);
  font-size: var(--fs-xl);
  font-weight: 800;
  color: var(--red-text);
  white-space: nowrap;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.result-secondary {
  margin-top: 10px;
  padding: 0.9em 1.15em;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.result-secondary .rs-label {
  font-size: var(--fs-sm);
  font-weight: 600;
}
.result-secondary .rs-sub {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--muted);
}
.result-secondary .rs-value {
  font-family: var(--font-heading);
  font-stretch: var(--heading-stretch);
  font-size: var(--fs-lg);
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 24px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.5;
}
.result-notice svg,
.result-tip-icon {
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.result-notice svg {
  width: 24px;
  height: 24px;
}
.result-tip {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: #f7f7f7;
  color: var(--ink-soft);
}
.result-tip-icon {
  width: 44px;
  height: 44px;
}
.result-tip h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 700;
}
.result-tip p {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.result-tip a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  color: var(--red-text);
  font-size: var(--fs-sm);
  font-weight: 700;
  text-decoration: none;
}
.result-tip a span {
  font-size: 26px;
  line-height: 1;
}
.result-tip a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .result-tip {
    gap: 12px;
    padding: 18px 14px;
  }
  .result-tip-icon {
    width: 34px;
    height: 34px;
  }
}

/* ---------- Lead form ---------- */
.lead {
  margin-top: var(--space-lg);
}
.lead-body {
  padding: 1.4em 1.6em 1.6em;
}
.lead h2 {
  margin: 0 0 4px;
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.lead > .lead-body > p.sub {
  margin: 0 0 18px;
  font-size: var(--fs-sm);
  color: var(--muted);
}
.lead-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.checks {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.check {
  margin-top: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: var(--fs-xs);
  color: var(--ink-soft);
  line-height: 1.45;
  max-width: 46ch;
}
.check input {
  padding: 0;
  margin: 2px 0 0;
  accent-color: var(--red);
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.disclaimer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 0.9em 1em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner {
    min-height: 420px;
    background-image: linear-gradient(
        90deg,
        #fff 0%,
        rgba(255, 255, 255, 0.96) 42%,
        rgba(255, 255, 255, 0.25) 72%
      ),
      url("../img/kalkulacka-hero.webp");
    background-position: center, 70% center;
  }
  .hero-copy {
    width: 60%;
  }
  .calc-grid {
    grid-template-columns: 1fr;
  }
  .result-card {
    position: static;
  }
  .outputs-grid {
    grid-template-columns: 1fr;
  }
  .lead-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  /* mobil – text hore, fotka dole, prechod zhora nadol */
  /* fotka má pomer 3:2 – pod textom jej vyhradíme miesto podľa šírky obrazovky */
  .hero-inner {
    min-height: 0;
    align-items: flex-start;
    padding-bottom: calc(66.7vw + var(--space-md));
    background-image: linear-gradient(
        180deg,
        #fff calc(100% - 66.7vw),
        rgba(255, 255, 255, 0) calc(100% - 50vw)
      ),
      url("../img/kalkulacka-hero-mobil.webp");
    background-position: center, center bottom;
    background-size: cover, 100% auto;
  }
  .hero-copy {
    width: 100%;
    padding-block: var(--space-xl) 0;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .lead-grid {
    grid-template-columns: 1fr;
  }
  .lead-grid .btn {
    width: 100%;
  }
  .form-actions .btn {
    flex: 1 1 100%;
  }
  .card-head,
  .result-head {
    padding: 1.2em 1.25em 0;
  }
  .card-body {
    padding: 1em 1.25em 1.25em;
  }
  .lead-body {
    padding: 1.2em 1.25em 1.25em;
  }
}

/* Drobnosti, ktoré boli predtým priamo v HTML (style="…") */
.field-grid-spaced {
  margin-top: 16px;
}

#result-content {
  padding-top: 0;
}

#out-fuel-share {
  margin-top: 10px;
}

.disclaimer .ico {
  color: var(--red);
  font-weight: 700;
}
