/* ===== Book Service popup ===== */
body.modal-open {
  overflow: hidden;
}

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

.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 31, 58, 0.6);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  width: min(100%, 620px);
  max-height: calc(100vh - 32px);
  padding: 28px;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(11, 31, 58, 0.35);
  animation: modal-in 0.2s ease;
}

.modal__dialog:focus {
  outline: none;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--navy);
  background: var(--blue-50);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.modal__close:hover {
  background: var(--blue-100);
}

.modal__dialog h2 {
  margin: 0 40px 6px 0;
}

.modal__lead {
  margin: 0 0 18px;
  color: var(--muted);
}

/* The form inside the popup should not look like a second card */
.contact-form--modal {
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
}

.opt {
  font-weight: 400;
  color: var(--muted);
}

/* Honeypot field: hidden from people, visible to bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 560px) {
  .modal {
    align-items: end;
    padding: 0;
  }

  .modal__dialog {
    width: 100%;
    max-height: 92vh;
    padding: 22px 18px 26px;
    border-radius: 20px 20px 0 0;
  }
}

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