/* Poptávkový formulář — barvy a rozměry původní komponenty. */
.inquiry-form {
  --form-bg: #916e97;
  /* Růžovější plocha bloků jako na původním webu. */
  --choice-bg: #ae84b5;
  --selected: #fff;
  position: relative;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding: 42px 42px 34px;
  border: 1px solid #ffffff24;
  border-radius: 32px;
  background: var(--form-bg);
  color: white;
}
.inquiry-form :focus-visible {
  outline-color: white;
}
.form-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 34px;
  list-style: none;
}
.form-progress li {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  height: 36px;
  margin-right: 76px;
  border: 1px solid #ffffff38;
  border-radius: 50%;
  background: #ffffff21;
  color: #ffffffd9;
  font-size: 14px;
  font-weight: 700;
  transition:
    background 0.3s,
    border-color 0.3s;
}
.form-progress li:last-child {
  margin-right: 0;
}
.form-progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 16px;
  width: 77px;
  height: 2px;
  background: #ffffff2e;
  transition: background 0.3s;
}
/* Hotové kroky: růžový okraj a růžová spojnice, aktuální krok: světlý okraj. */
.form-progress li[aria-current] {
  border-color: #ffffffd9;
  color: white;
  background: #ffffff2e;
}
.form-progress li.is-complete {
  border-color: #e9a6f5;
  color: white;
}
.form-progress li.is-complete::after {
  background: #e9a6f5;
}
.form-step {
  min-width: 0;
  min-height: 460px;
  margin: 0;
  padding: 0;
  border: 0;
  animation: fade-in 0.32s ease;
}
/* Nadpis kroku dostane po přechodu fokus kvůli čtečkám; bez bílého rámečku. */
.form-step legend:focus {
  outline: none;
}
.form-step legend {
  width: 100%;
  max-width: 650px;
  margin: 0 auto 34px;
  padding: 0;
  text-align: center;
  color: #ffffffe0;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 500;
}
.form-step h3 {
  margin: 0 0 16px;
  font:
    700 18px/1.4 "Figtree",
    Arial,
    sans-serif;
  text-transform: none;
}
.service-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.service-choice {
  position: relative;
  cursor: pointer;
}
.service-choice input,
.urgency-choices input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.service-choice > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 150px;
  padding: 22px 18px;
  border: 2px solid transparent;
  border-radius: 24px;
  background: var(--choice-bg);
  text-align: center;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  transition:
    transform 0.22s,
    border-color 0.22s;
}
.service-choice img {
  box-sizing: content-box;
  width: 28px;
  height: 28px;
  padding: 15px;
  border-radius: 18px;
  background: #ffffff29;
}
.service-choice input:checked + span {
  border-color: var(--selected);
  transform: translateY(-2px);
}
.service-choice input:checked + span::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--selected);
  color: #916e97;
  font-size: 13px;
}
.service-choice input:focus-visible + span,
.urgency-choices input:focus-visible + span {
  outline: 3px solid white;
  outline-offset: 3px;
}
.form-help,
.form-privacy {
  margin: 0 0 18px;
  color: #ffffffad;
  font-size: 12px;
  line-height: 1.55;
}
.form-privacy {
  margin: 24px 0 0;
  text-align: center;
}
.form-privacy a {
  text-decoration: underline;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 15px;
}
.form-field input {
  width: 100%;
  min-height: 48px;
  padding: 6px 0 10px;
  border: 0;
  border-bottom: 1px solid #ffffff73;
  border-radius: 0;
  background: transparent;
  color: white;
  transition: border-color 0.25s;
}
.form-field textarea {
  width: 100%;
  min-height: 190px;
  padding: 22px 24px;
  border: 0;
  border-radius: 22px;
  background: var(--choice-bg);
  color: white;
  resize: vertical;
  transition: background 0.25s;
}
/* Při psaní bez bílého rámečku; aktivní pole jen zvýrazní linku. */
.form-field :is(input, textarea):focus-visible {
  outline: none;
}
.form-field input:focus {
  border-bottom-color: white;
}
/* Pole nemá rámeček, aktivní stav proto mírně zesvětlí pozadí. */
.form-field textarea:focus {
  background: #b891bf;
}
/* Automatické vyplnění prohlížečem nemění barvu pole (jinak světle modrá). */
.form-field :is(input, textarea):-webkit-autofill {
  -webkit-text-fill-color: white;
  caret-color: white;
  box-shadow: 0 0 0 1000px var(--form-bg) inset;
  transition: background-color 9999s;
}
.form-field textarea:-webkit-autofill {
  box-shadow: 0 0 0 1000px var(--choice-bg) inset;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #ffffff9e;
}
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  outline: 2px solid white;
  outline-offset: 3px;
}
.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.contact-fields .form-field {
  margin: 0;
}
.urgency-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.urgency-choices label {
  position: relative;
  cursor: pointer;
}
.urgency-choices span {
  display: block;
  padding: 12px 18px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--choice-bg);
  font-weight: 700;
}
.urgency-choices input:checked + span {
  border-color: var(--selected);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
}
.form-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
  min-width: 210px;
  height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--purple);
  color: white;
  font-size: 16px;
  font-weight: 600;
}
.form-button--back {
  margin-right: auto;
  min-width: 120px;
  padding-inline: 22px;
  border: 1px solid #ffffff61;
  background: transparent;
  color: white;
}
/* Hlavní tlačítko formuláře (Další krok / Odeslat) je bílé s fialovým textem. */
.form-button:not(.form-button--back) {
  background: white;
  color: #91509c;
  font-weight: 700;
}
.form-button:not(.form-button--back):hover {
  background: #f4e6ff;
}
.form-button--back:hover {
  background: var(--purple);
  border-color: transparent;
}
.form-button:not(.form-button--back)::after {
  content: "";
  width: 14px;
  height: 13px;
  flex-shrink: 0;
  background: url("../assets/icons/arrow-form.svg") center / contain no-repeat;
  transition: transform 0.3s;
}
.form-button:not(.form-button--back)::before {
  content: none;
}
.form-button:not(.form-button--back):is(:hover, :focus-visible)::after {
  animation: none;
  transform: translateX(4px);
}
.form-button:active {
  transform: scale(0.98);
}
.form-error {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #ffffff29;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}
.form-success {
  padding: 30px 0;
  text-align: center;
}
.form-success > span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: var(--selected);
  color: var(--form-bg);
  font-size: 34px;
  user-select: none;
}
/* Po odeslání: koště vyskočí z malého na velké, zamete, prach odletí,
   koště zmizí a pod ním se objeví poděkování. */
.form-sweep {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.form-sweep__broom {
  position: relative;
  width: 96px;
  height: 140px;
  background: url("../assets/icons/koste-button.svg") center / contain
    no-repeat;
  filter: drop-shadow(0 12px 24px #5a3a6066);
  transform-origin: 50% 15%;
  animation: form-sweep-broom 2s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}
.form-sweep__broom::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 150px;
  height: 46px;
  margin-left: -75px;
  background:
    radial-gradient(circle at 18px 30px, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 46px 14px, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 70px 34px, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 98px 12px, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 128px 28px, #fff 0 4px, transparent 5px);
  opacity: 0;
  animation: form-sweep-dust 2s ease-out both;
}
.form-sweep ~ .form-success {
  animation: form-success-in 0.6s 1.45s ease-out both;
}
@keyframes form-sweep-broom {
  0% {
    opacity: 0;
    transform: scale(0.15) rotate(-20deg);
  }
  16% {
    opacity: 1;
    transform: scale(1.15) rotate(0);
  }
  28% {
    transform: scale(1) translateX(-34px) rotate(24deg);
  }
  42% {
    transform: scale(1) translateX(34px) rotate(-28deg);
  }
  56% {
    transform: scale(1) translateX(-26px) rotate(20deg);
  }
  70% {
    opacity: 1;
    transform: scale(1) translateX(22px) rotate(-18deg);
  }
  100% {
    opacity: 0;
    transform: scale(0.2) translate(60px, -40px) rotate(0);
  }
}
@keyframes form-sweep-dust {
  0%,
  24% {
    opacity: 0;
    transform: scale(0.6);
  }
  40% {
    opacity: 0.9;
    transform: scale(1) translateX(-10px);
  }
  62% {
    opacity: 0.7;
    transform: scale(1.3) translate(30px, -18px);
  }
  80%,
  100% {
    opacity: 0;
    transform: scale(1.7) translate(60px, -40px);
  }
}
@keyframes form-success-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .form-sweep {
    display: none;
  }
  .form-sweep ~ .form-success {
    animation: none;
  }
}
@media (max-width: 640px) {
  .inquiry-form {
    padding: 22px 14px;
    border-radius: 24px;
  }
  .form-progress {
    margin-bottom: 22px;
  }
  .form-progress li {
    flex-basis: 30px;
    height: 30px;
    margin-right: 30px;
    font-size: 12px;
  }
  .form-progress li:not(:last-child)::after {
    width: 31px;
    top: 13px;
    left: 29px;
  }
  .form-step legend {
    font-size: 13px;
    margin-bottom: 18px;
  }
  .service-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .service-choice > span {
    min-height: 112px;
    padding: 14px 7px;
    border-radius: 16px;
    gap: 8px;
    font-size: 11px;
  }
  .service-choice img {
    width: 24px;
    height: 24px;
    padding: 6px;
    border-radius: 12px;
  }
  .service-choice input:checked + span::after {
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    font-size: 10px;
  }
  .contact-fields {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .form-actions {
    gap: 10px;
  }
  .form-button {
    min-width: 0;
    padding-inline: 18px;
    height: 50px;
  }
  .urgency-choices {
    flex-direction: column;
  }
  .urgency-choices span {
    text-align: center;
  }
}
