.pba-modal-open {
  overflow: hidden;
}

.pba-modal[hidden] {
  display: none;
}

.pba-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-family: "Public Sans", sans-serif;
}

.pba-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.pba-modal__dialog {
  position: relative;
  width: min(650px, calc(100vw - 32px));
  max-height: calc(100vh - 24px);
  margin: 0;
  overflow: auto;
  background: #fff;
  color: #342b20;
  box-shadow: 0 24px 80px rgba(18, 15, 11, 0.24);
}

.pba-modal__inner {
  padding: 38px 54px 34px;
}

.pba-modal__confirmation {
  display: none;
}

.pba-modal.is-confirmed .pba-modal__booking {
  display: none;
}

.pba-modal.is-confirmed .pba-modal__confirmation {
  display: grid;
}

.pba-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 28px;
}

.pba-modal__close {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border: 1px solid #e6e2dc;
  border-radius: 50%;
  background: #fff;
  color: #666;
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.pba-modal__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  color: #342b20;
  font-family: "Public Sans", sans-serif;
  font-size: clamp(38px, 5vw, 43px);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1;
}

.pba-modal__title--confirmation {
  max-width: 520px;
  margin-bottom: 0;
}

.pba-modal__confirmation-text {
  max-width: 610px;
  margin: 0 0 30px;
  color: #666;
  font-size: 17px;
  line-height: 1.45;
}

.pba-modal__confirmation-signoff {
  margin: 0 0 30px;
  color: #666;
  font-size: 16px;
  font-weight: 700;
}

.pba-modal__confirmation-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 76px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}

.pba-modal__service-field {
  display: grid;
  gap: 10px;
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 16px;
  line-height: 1.2;
}

.pba-modal.is-loading-services .pba-modal__service-field {
  opacity: 0.55;
}

.pba-modal__loader {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: #666;
  font-size: 15px;
  text-align: center;
}

.pba-modal.is-loading-services .pba-modal__loader {
  display: flex;
}

.pba-modal.is-loading-services .pba-modal__inner {
  pointer-events: none;
  user-select: none;
}

.pba-modal.is-loading-services .pba-modal__close {
  position: relative;
  z-index: 6;
}

.pba-modal__loader-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid #e6e2dc;
  border-top-color: #342b20;
  border-radius: 50%;
  animation: pba-spin 0.75s linear infinite;
}

.pba-modal__loader-text {
  max-width: 16rem;
  line-height: 1.4;
}

.pba-modal__select {
  width: 100%;
  height: 55px;
  border: 1px solid #e6e2dc;
  border-radius: 0;
  background: #fafafa;
  color: #111;
  font: inherit;
  font-size: 15px;
  padding: 0 52px 0 16px;
}

.pba-modal__summary {
  display:none;
  min-height: 20px;
  margin: 8px 0 24px;
  color: #777;
  font-size: 14px;
}

.pba-slots {
  margin: 0 0 34px;
}

.pba-slots.is-expanded {
  max-height: 235px;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

.pba-slots__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  color: #777;
  font-size: 14px;
}

.pba-slots__spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #e6e2dc;
  border-top-color: #342b20;
  border-radius: 50%;
  animation: pba-spin 0.75s linear infinite;
}

.pba-slots__header,
.pba-slots__row {
  display: grid;
  grid-template-columns: 40px repeat(7, minmax(0, 1fr)) 40px;
  gap: 8px;
  align-items: center;
}

.pba-slots__header {
  margin-bottom: 14px;
  position: sticky;
  top: 0;
  z-index: 99;
  background: white;
}

.pba-slots__row + .pba-slots__row {
  margin-top: 10px;
}

.pba-slots__nav {
  width: 35px;
  height: 35px;
  border: 1px solid #342b20;
  border-radius: 50%;
  background: #fff;
  color: #342b20;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pba-slots__nav:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.pba-slots__day {
  display: grid;
  gap: 2px;
  min-height: 40px;
  color: #222;
  text-align: center;
}

.pba-slots__day strong {
  font-size: 14px;
  font-weight: 600;
}

.pba-slots__day span {
  color: #8b8b8b;
  font-size: 13px;
}

.pba-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 28px;
  border: 1px solid #e5e5e5;
  background: #f8f8f8;
  color: #8b8b8b;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 5px 6px;
  text-align: center;
}

.pba-slots__more {
  display: block;
  margin: 18px auto 0;
  border: 0;
  background: transparent;
  color: #342b20;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  text-decoration: underline;
}

.pba-slot.is-selected {
  border-color: #111;
  background: #111;
  color: #fff;
}

.pba-slot.is-disabled {
  border-color: transparent;
  background: transparent;
  color: #6f6f6f;
  cursor: not-allowed;
  text-decoration: line-through;
}

.pba-slot--empty {
  border-color: transparent;
  background: transparent;
  color: #4f4f4f;
  cursor: default;
  text-decoration: none;
}

.pba-modal__empty {
  margin: 0;
  color: #777;
  font-size: 15px;
}

.pba-modal__form {
  display: grid;
  gap: 20px;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.pba-modal:not(.has-service) .pba-modal__form {
  filter: grayscale(0.2);
  opacity: 0.45;
}

.pba-modal__form h3 {
  margin: 0;
  color: #666;
  font-family: "Public Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
}

.pba-modal__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.pba-modal__form label:not(.pba-modal__consent) {
  display: grid;
  min-height: 60px;
  border: 1px solid #e6e2dc;
  background: #fafafa;
  padding: 10px 14px 5px;
}

.pba-modal__form label:not(.pba-modal__consent) span {
  color: #111;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
}

.pba-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.pba-modal__consent input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0.1rem 0 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, #342b20 30%, transparent);
  border-radius: 4px;
  appearance: none;
  background: #fff;
  cursor: pointer;
}

.pba-modal__consent input[type="checkbox"]:checked {
  border-color: #342b20;
  background: #342b20;
  box-shadow: inset 0 0 0 3px #fff;
}

.pba-modal__consent span {
  color: #666;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.pba-modal__form input:not([type="checkbox"]) {
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 14px;
  padding: 0;
  outline: none;
}

.pba-modal__form input:not([type="checkbox"])::placeholder {
  color: #999;
}

.pba-modal__trap {
  position: absolute;
  left: -9999px;
  width: 1px !important;
  height: 1px;
  opacity: 0;
}

.pba-modal__submit {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 999px;
  background: #000;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
}

.pba-modal__submit::after {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 12px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  content: "";
  animation: pba-spin 0.75s linear infinite;
}

.pba-modal.is-submitting .pba-modal__submit {
  cursor: progress;
  opacity: 0.86;
}

.pba-modal.is-submitting .pba-modal__submit::after {
  display: inline-block;
}

.pba-modal__terms {
  margin: 0;
  color: #777;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

.pba-modal__terms a {
  color: inherit;
  text-decoration: underline;
}

.pba-modal__status {
  min-height: 20px;
  margin: -8px 0 0;
  font-size: 14px;
  text-align: center;
}

.pba-modal__status--success {
  color: #247a43;
}

.pba-modal__status--error {
  color: #a53424;
}

.pba-modal.is-loading .pba-modal__dialog {
  cursor: progress;
}

.pba-modal.is-loading .pba-slots button {
  pointer-events: none;
}

@media (width < 760px) and (width >= 576px) {
  .pba-modal {
    align-items: stretch;
    padding: 0;
  }

  .pba-modal__dialog {
    width: 100%;
    max-height: none;
    min-height: 100%;
    margin: 0;
  }

  .pba-modal__inner {
    padding: 32px 20px;
  }

  .pba-modal__header {
    margin-bottom: 1.5rem;
  }

  .pba-modal__close {
    width: 48px;
    height: 48px;
  }

  .pba-modal__title {
    font-size: 38px;
  }

  .pba-slots {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .pba-slots__header {
    position: static;
    z-index: auto;
  }

  .pba-slots__header,
  .pba-slots__row {
    min-width: 620px;
  }

  .pba-modal__fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (width < 576px) {
  .pba-modal {
    align-items: flex-end;
    justify-content: stretch;
    padding: 0;
  }

  .pba-modal__backdrop {
    opacity: 0;
    transition: opacity 220ms ease;
  }

  .pba-modal.is-open .pba-modal__backdrop {
    opacity: 1;
  }

  .pba-modal__dialog {
    display: flex;
    width: 100%;
    max-height: 100dvh;
    min-height: calc(100dvh - 3.75rem - env(safe-area-inset-top, 0px));
    margin: 0;
    overflow: hidden;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -1rem 3rem rgba(0, 0, 0, 0.12);
    transform: translateY(100%);
    transition: transform 280ms ease;
  }

  .pba-modal.is-open .pba-modal__dialog {
    transform: translateY(0);
  }

  .pba-modal__inner {
    flex: 1 1 auto;
    min-height: 0;
    padding: 2rem 1rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .pba-modal__header {
    margin-bottom: 1.25rem;
  }

  .pba-modal__close {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.75rem;
  }

  .pba-modal__title {
    font-family: var(--font-tenor, "Tenor Sans", Georgia, serif);
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.15;
  }

  .pba-modal__service-field {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
  }

  .pba-modal__select {
    height: 3.25rem;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
  }

  .pba-slots {
    margin-bottom: 1.75rem;
    overflow: visible;
    padding-bottom: 0;
  }

  .pba-slots__header {
    position: static;
    z-index: auto;
  }

  .pba-slots__header,
  .pba-slots__row {
    grid-template-columns: 2.25rem repeat(3, minmax(0, 1fr)) 2.25rem;
    gap: 0.5rem;
    min-width: 0;
  }

  .pba-slots__nav {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }

  .pba-slots__day strong {
    font-size: 0.8125rem;
  }

  .pba-slots__day span {
    font-size: 0.75rem;
  }

  .pba-slot {
    min-height: 2rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
  }

  .pba-slots__more {
    margin-top: 1rem;
    font-size: 0.9375rem;
  }

  .pba-modal__form {
    gap: 1rem;
  }

  .pba-modal__form h3 {
    font-size: 0.9375rem;
  }

  .pba-modal__fields {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .pba-modal__form label {
    min-height: 3.75rem;
    border-radius: 0.5rem;
  }

  .pba-modal__submit {
    min-height: 3.25rem;
    margin-top: 0.25rem;
    font-size: 1rem;
  }

  .pba-modal__terms {
    font-size: 0.875rem;
  }
}

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