.booking-modal {
  position: fixed;
  z-index: 10020;
  display: grid;
  padding: 24px;
  place-items: center;
  inset: 0;
}

.booking-modal__backdrop {
  position: absolute;
  border: 0;
  padding: 0;
  cursor: pointer;
  inset: 0;
  background: rgba(1, 2, 5, 0.74);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.booking-modal__panel {
  position: relative;
  display: flex;
  width: min(920px, 100%);
  max-height: calc(100svh - 48px);
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 110px rgba(1, 2, 5, 0.38);
  font-family: 'M Saans', 'Segoe UI', sans-serif;
}

.booking-modal__panel--step-1,
.booking-modal__panel--step-2 {
  width: min(760px, 100%);
}

.booking-modal__panel--step-3 {
  width: min(820px, 100%);
}

.booking-modal__close {
  position: absolute;
  z-index: 6;
  top: 16px;
  right: 16px;
  display: grid;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  place-items: center;
  color: #fff;
  background: #010205;
  box-shadow: 0 5px 16px rgba(1, 2, 5, 0.08);
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.booking-modal__close:hover {
  color: #010205;
  background: #ff98bc;
}

.booking-modal__close:active {
  transform: scale(0.94);
}

.booking-modal__close svg {
  width: 16px;
  height: 16px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.booking-modal__close:hover svg {
  transform: rotate(90deg);
}

.booking-modal__close:focus-visible,
.booking-form input:focus-visible,
.booking-form textarea:focus-visible,
.booking-form button:focus-visible,
.booking-schedule__bar button:focus-visible {
  outline: 2px solid #ff77a7;
  outline-offset: 2px;
}

.booking-modal__content {
  position: relative;
  min-height: 540px;
  overflow: auto;
  background: #fff;
}

.booking-questionnaire {
  display: flex;
  min-height: 540px;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.booking-form {
  display: flex;
  width: min(620px, 100%);
  margin: 0 auto;
  flex-direction: column;
  transform: translateY(16px);
  justify-content: center;
  gap: 20px;
  padding: clamp(44px, 6vw, 64px);
  background: #fff;
}

.booking-modal__panel--step-2 .booking-form {
  transform: translateY(8px);
}

@media (min-width: 810px) {
  .booking-modal__panel--step-2 .booking-form > label,
  .booking-modal__panel--step-2 .booking-form > .booking-form__row {
    transform: translateY(-6px);
  }
}

.booking-form label {
  display: grid;
  gap: 9px;
}

.booking-form label > span {
  color: #010205;
  font-size: 15px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.025em;
}

.booking-form label em {
  margin-left: 5px;
  color: rgba(1, 2, 5, 0.42);
  font-size: 12px;
  font-style: normal;
  font-weight: var(--font-weight-regular);
}

.booking-form input,
.booking-form textarea,
.booking-form select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(1, 2, 5, 0.68);
  background-color: #f3f3f1;
  font: inherit;
  font-family: 'M Saans', 'Segoe UI', sans-serif;
  font-size: 16px;
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.018em;
  box-shadow: inset 0 0 0 1px rgba(1, 2, 5, 0.06);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.booking-form input,
.booking-form select {
  height: 52px;
  padding: 0 15px;
}

.booking-form select {
  padding-right: 48px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.5332 15.1406V11.501H2.89551V7.85938H6.53613V11.5H10.1738V15.1406H6.5332ZM17.4609 11.501V15.1406H13.8232V18.7813H10.1826V15.1406H13.8203V11.5H17.4609V7.85938H21.1016V11.501H17.4609Z' fill='%23010205' transform='rotate(0 12 12)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 15px 15px;
}

.booking-form textarea {
  min-height: 104px;
  padding: 14px 15px;
  line-height: 1.4;
  resize: vertical;
}

.booking-form input::placeholder,
.booking-form textarea::placeholder {
  color: rgba(1, 2, 5, 0.36);
}

.booking-form input:focus,
.booking-form textarea:focus,
.booking-form select:focus {
  border-color: #010205;
  background-color: #fff;
  box-shadow: 0 0 0 1px #010205, 0 8px 24px rgba(1, 2, 5, 0.08);
  outline: 0;
}

.booking-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.booking-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.booking-form__primary,
.booking-form__back,
.booking-schedule__bar button {
  display: inline-flex;
  min-height: 50px;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: var(--type-button-font-size);
  font-weight: var(--type-button-font-weight);
  letter-spacing: var(--type-button-letter-spacing);
  transition: color 220ms ease, background 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.booking-form > .booking-form__primary {
  align-self: flex-end;
}

.booking-form__primary {
  min-width: 174px;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid #010205;
  border-radius: 999px;
  color: #fff;
  background: #010205;
  font-size: 16px;
}

.booking-form__primary:hover {
  color: #fff;
  border-color: #292929;
  background: #292929;
  transform: translateY(-2px);
}

.booking-form__primary:active {
  transform: scale(0.97);
}

.booking-form__primary svg {
  flex: 0 0 auto;
  color: currentColor;
}

.booking-form__back {
  padding: 0 4px;
  border: 0;
  color: rgba(1, 2, 5, 0.62);
  background: transparent;
}

.booking-form__back:hover {
  color: #010205;
}

.booking-schedule {
  position: relative;
  min-height: 520px;
}

.booking-schedule__bar {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 5px 14px;
  border-bottom: 0;
  background: #fff;
}

.booking-schedule__bar button {
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  color: #010205;
  background: transparent;
}

.booking-schedule__bar button:hover {
  background: #ffd2e1;
}

.booking-modal__calendar {
  width: 100%;
  min-height: 540px;
}

.booking-modal__loading,
.booking-modal__error {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 49px 0 0;
  color: #626262;
  background: #fff;
}

.booking-modal__loading {
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
}

.booking-modal__loading span {
  width: 17px;
  height: 17px;
  border: 2px solid #d8d8d8;
  border-top-color: #010205;
  border-radius: 50%;
  animation: booking-spin 700ms linear infinite;
}

.booking-modal__error {
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.booking-modal__error p {
  margin: 0;
}

.booking-modal__error a {
  padding: 13px 18px;
  border-radius: 12px;
  color: #fff;
  background: #010205;
  text-decoration: none;
}

@keyframes booking-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .booking-form {
    padding: 44px;
  }

  .booking-form__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 809.98px) {
  .booking-modal {
    min-height: 100svh;
    min-height: 100dvh;
    padding: 0;
    background: #fff;
  }

  .booking-modal__backdrop {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .booking-modal__panel {
    width: 100%;
    height: 100svh;
    height: 100dvh;
    max-height: 100svh;
    max-height: 100dvh;
    min-height: 100svh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .booking-modal__close {
    width: 40px;
    height: 40px;
  }

  .booking-modal__content,
  .booking-questionnaire {
    min-height: 100svh;
  }

  .booking-form {
    justify-content: flex-start;
    gap: 18px;
    padding: 28px 22px 40px;
    transform: translateY(10px);
  }

  .booking-modal__panel--step-2 .booking-form {
    transform: translateY(4px);
  }

  .booking-form__actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .booking-form__primary,
  .booking-form > .booking-form__primary {
    width: 100%;
    align-self: stretch;
  }

  .booking-form__back {
    align-self: center;
  }

  .booking-schedule,
  .booking-modal__calendar {
    min-height: 100svh;
  }

  .booking-schedule__bar {
    padding: 8px 10px;
  }
}

@media (max-width: 360px) {
  .booking-modal__close {
    top: 12px;
    right: 12px;
  }

  .booking-form {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .booking-modal__loading span {
    animation: none;
  }
}
