/* ==========================================================================
   Schlieger, samostatný vstupní dotazník (varianta A)
   ========================================================================== */

:root {
  --bg: #0E0F11;
  --accent: #DA000F;
  --accent-ink: #F2545B;
  --accent-deep: #B00010;
  --light-ink: #17181B;
  --light-ink-2: #6E7379;
  --light-ink-3: #3D4046;
  --light-line: #E5E5E8;
  --light-line-2: #B9BDC3;
  --light-sel-bg: #FDECEC;
  --warn: #8A5A00;
  --mont: Montserrat, sans-serif;
  --sans: 'Open Sans', system-ui, sans-serif;
}

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

html, body { max-width: 100%; overflow-x: hidden; }

body {
  font: 400 17px/1.55 var(--sans);
  color: var(--light-ink-3);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: #F4F4F5; text-decoration: none; transition: color .25s ease; }
a:hover { color: var(--accent); }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; }
fieldset { border: 0; min-width: 0; }
legend { display: block; width: 100%; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Rozvržení
   -------------------------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.shell > * { min-width: 0; }

.aside {
  background: var(--bg);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  border-right: 1px solid #1E2024;
}
.aside__logo { width: 120px; height: auto; }
.aside__eyebrow {
  font: 600 12px var(--mont);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7E848B;
}
.aside h2 {
  font: 700 28px/1.12 var(--mont);
  letter-spacing: -.025em;
  color: #F4F4F5;
  margin-top: 12px;
}
.aside__head { margin-top: 32px; }
.aside__steps { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.aside__steps li { display: flex; align-items: center; gap: 14px; list-style: none; }
.aside__num { font: 600 12px var(--mont); color: #5E646B; }
.aside__label { font: 600 15px var(--sans); color: #5E646B; transition: color .25s ease; }
.aside__steps li.is-done .aside__label { color: #F4F4F5; }

.progress {
  height: 3px;
  background: #26282D;
  border-radius: 99px;
  overflow: hidden;
}
.progress__fill {
  height: 3px;
  width: 33%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .35s cubic-bezier(.22, .61, .36, 1);
}
.progress__label {
  font: 600 12px var(--mont);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7E848B;
  margin-top: 14px;
}

.main {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 36px;
  overflow-x: hidden;
}
.main__inner { width: 100%; max-width: 520px; }

/* --------------------------------------------------------------------------
   Kroky
   -------------------------------------------------------------------------- */

.step[hidden] { display: none; }
.step { animation: fadeDown .32s cubic-bezier(.22, .61, .36, 1) both; }
.step__label {
  font: 600 12px var(--mont);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--light-ink-2);
}
.step h1 {
  font: 700 27px/1.15 var(--mont);
  letter-spacing: -.02em;
  color: var(--light-ink);
  margin-top: 10px;
}
.step h1.is-big {
  font-size: 40px;
  line-height: 1.1;
  letter-spacing: -.028em;
  margin-top: 0;
}
.step__text {
  font: 400 17px/1.55 var(--sans);
  color: var(--light-ink-3);
  margin-top: 18px;
  max-width: 52ch;
}

.opts { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.opt { position: relative; display: block; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt span {
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--light-line);
  background: #fff;
  border-radius: 12px;
  font: 600 15px var(--sans);
  color: var(--light-ink);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.opt:hover span { border-color: var(--light-ink-3); }
.opt input:checked + span {
  border-color: var(--accent);
  background: var(--light-sel-bg);
  color: var(--accent-deep);
}
.opt input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Pole
   -------------------------------------------------------------------------- */

.fields { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; }
.field__label {
  display: block;
  font: 600 15px var(--sans);
  color: var(--light-ink);
  margin-bottom: 8px;
}
.req { color: var(--accent); }
.input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--light-line);
  border-radius: 10px;
  padding: 0 16px;
  font: 400 16px var(--sans);
  color: var(--light-ink);
  background: #fff;
}
.input:focus { outline: none; border-color: var(--light-line-2); }
.input:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }

.phone { position: relative; display: flex; gap: 10px; }
.phone .input { flex: 1; min-width: 0; }

.dial {
  width: 140px;
  flex: none;
  height: 52px;
  border: 1px solid var(--light-line);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color .2s ease;
}
.dial:hover { border-color: var(--light-line-2); }
.dial__flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  flex: none;
  background: #EDEDEF;
  object-fit: cover;
}
.dial__value { font: 400 16px var(--sans); color: var(--light-ink); }
.dial__caret { margin-left: auto; font-size: 11px; color: var(--light-ink-2); }

.dial__list {
  position: absolute;
  top: 58px;
  left: 0;
  width: 220px;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--light-line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(23, 24, 27, .12);
  z-index: 30;
  padding: 6px;
}
.dial__list[hidden] { display: none; }
.dial__list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.dial__list button:hover,
.dial__list button:focus-visible { background: #F4F4F5; }
.dial__list button[aria-selected='true'] { background: var(--light-sel-bg); }
.dial__list .dial__dial { font: 400 15px var(--sans); color: var(--light-ink); }
.dial__list .dial__name { font: 400 14px var(--sans); color: var(--light-ink-2); margin-left: auto; }

.note { font-size: 14px; color: var(--light-ink-2); }

.gdpr {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--light-line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.gdpr input { position: absolute; opacity: 0; width: 0; height: 0; }
.gdpr__box {
  width: 20px;
  height: 20px;
  border: 1.6px solid var(--light-line-2);
  background: #fff;
  border-radius: 5px;
  flex: none;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font: 700 12px var(--sans);
  transition: background .2s ease, border-color .2s ease;
}
.gdpr input:checked + .gdpr__box { border-color: var(--accent); background: var(--accent); }
.gdpr input:checked + .gdpr__box::after { content: '✓'; }
.gdpr input:focus-visible + .gdpr__box { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.gdpr:has(input:checked) { border-color: var(--accent); background: var(--light-sel-bg); }
.gdpr.is-warn { border-color: var(--warn); }
.gdpr p { font-size: 15px; color: var(--light-ink-3); }

/* --------------------------------------------------------------------------
   Ovládání
   -------------------------------------------------------------------------- */

.actions { display: flex; gap: 12px; margin-top: 28px; }
.actions--split {
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  border-top: 1px solid var(--light-line);
  padding-top: 16px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 10px;
  font: 600 16px var(--sans);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, filter .2s ease, opacity .2s ease;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent); color: #fff; filter: brightness(1.08); }
.btn--ghost { border: 1px solid var(--light-line); color: var(--light-ink); }
.btn--ghost:hover { border-color: var(--light-line-2); color: var(--light-ink); }
.btn[aria-disabled='true'] { background: #EDEDEF; color: #9AA0A6; cursor: not-allowed; filter: none; }
.hint { font-size: 14px; margin-top: 12px; color: var(--warn); }
.hint[hidden] { display: none; }

@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .step, .progress__fill { animation: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Responzivita
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  /* Panel na výšku obsahu, dotazník dopadá zbytek okna. */
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .aside { border-right: 0; border-bottom: 1px solid #1E2024; gap: 24px; }
  .main { padding: 40px 28px; align-items: flex-start; }
}

@media (max-width: 640px) {
  .aside { padding: 18px; }
  .aside__logo { width: 104px; }
  .aside h2 { font-size: 21px; }
  .aside__head { margin-top: 22px; }
  .main { padding: 26px 18px 34px; }
  .step h1 { font-size: 23px; line-height: 1.2; }
  .step h1.is-big { font-size: 26px; line-height: 1.14; }
  .step__text { max-width: 100%; font-size: 16px; }
  .opt span { padding: 14px 16px; font-size: 15px; }
  .actions { flex-wrap: wrap; }
  .actions .btn { flex: 1 1 140px; min-width: 0; height: 54px; padding: 0 16px; font-size: 15px; line-height: 1.2; }
  .actions--split { flex-direction: column; align-items: stretch; }
  /* Kontejner je tady ve sloupci, takže flex-basis ze .actions .btn (140px)
     by určoval výšku a přebil height: 54px. flex: 0 0 auto vrací výšku
     na stejných 54px jako u ostatních tlačítek formuláře. */
  .actions--split .btn { flex: 0 0 auto; width: 100%; }
  .phone { flex-wrap: wrap; }
  .dial { width: 118px; padding: 0 10px; }
  .dial__list { width: auto; left: 0; right: 0; max-width: 100%; }
  .gdpr { padding: 14px; }
}
