/* Booking form (WhatsApp) and floating WhatsApp button */

.booking .split {
  align-items: start;
}

.booking__steps {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
  counter-reset: step;
}

.booking__steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: var(--space-3);
  align-items: center;
  counter-increment: step;
}

.booking__steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--azul-rey);
  color: var(--blanco);
  font-family: var(--font-titulos);
  font-size: 1.2rem;
  font-weight: 600;
}

.booking__direct {
  margin-top: var(--space-6);
}

.booking__form {
  display: grid;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--blanco);
  border: 1px solid var(--borde);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.field--row {
  display: grid;
  gap: var(--space-5);
}

.field label,
.field legend {
  padding: 0;
  font-weight: 600;
  color: var(--azul-rey);
}

.field__optional {
  font-weight: 400;
  color: var(--texto-suave);
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
}

.field input:not([type="radio"]):not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid #b9cbe0;
  border-radius: var(--radius-sm);
  background: var(--blanco);
  font-size: 1rem; /* >= 16px avoids iOS zoom on focus */
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: var(--space-7);
  background-image: linear-gradient(45deg, transparent 50%, var(--azul-rey) 50%),
    linear-gradient(135deg, var(--azul-rey) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--azul-medio);
  box-shadow: 0 0 0 4px rgb(79 195 224 / 0.35);
}

.field [aria-invalid="true"]:not([type="radio"]) {
  border-color: var(--error);
}

.options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.option {
  position: relative;
  flex: 1 1 auto;
}

.option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid #b9cbe0;
  border-radius: 999px;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.option input:checked + span {
  border-color: var(--azul-rey);
  background: var(--azul-rey);
  color: var(--blanco);
}

.option input:focus-visible + span {
  outline: 3px solid var(--azul-cielo);
  outline-offset: 2px;
}

.option input[aria-invalid="true"] + span {
  border-color: var(--error);
}

.field__error {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--error);
}

.field__error:empty {
  display: none;
}

.field__error::before {
  content: "⚠ ";
}

.field__hint {
  justify-self: end;
  font-size: 0.8rem;
  color: var(--texto-suave);
}

.booking__note {
  display: flex;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--texto-suave);
}

.booking__note .bi {
  color: var(--azul-medio);
}

.booking__status:empty {
  display: none;
}

.booking__status {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.booking__status--error {
  background: #fdecea;
  color: var(--error);
}

.booking__status--success {
  background: #e6f6ec;
  color: #0b5a30;
}

.booking__status a {
  color: inherit;
  font-weight: 600;
}

/* Floating WhatsApp button */

.wa-float {
  position: fixed;
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #06351b;
  font-size: 1.9rem;
  box-shadow: 0 10px 25px rgb(18 140 75 / 0.4);
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.wa-float:hover {
  color: #06351b;
  transform: scale(1.06);
  box-shadow: 0 14px 30px rgb(18 140 75 / 0.5);
}

@media (min-width: 600px) {
  .field--row {
    grid-template-columns: 1fr 1fr;
  }

  .booking__form {
    padding: var(--space-7) var(--space-6);
  }
}

@media (min-width: 960px) {
  .booking .split {
    grid-template-columns: 0.9fr 1.1fr;
  }

  .booking__intro {
    position: sticky;
    top: calc(var(--header-h) + var(--space-6));
  }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float:hover {
    transform: none;
  }
}

.booking__privacy {
  display: flex;
  gap: var(--space-2);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--texto-suave);
}

.booking__privacy .bi {
  color: var(--azul-medio);
}
