/* Единая модалка записи (denta-booking.js) — в стиле нового дизайна, без зависимости от landing-shared.css */
.denta-bk-sr,
.denta-bk-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#bookingModal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
    max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(11, 37, 69, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* Вертикальное центрирование без margin:auto (не дёргает карточку при открытии) */
#bookingModal::before,
#bookingModal::after {
  content: "";
  flex: 1 1 0;
  min-height: 12px;
  width: 100%;
  pointer-events: none;
}
#bookingModal.is-open,
#bookingModal.active {
  opacity: 1;
  visibility: visible;
}
#bookingModal .denta-booking-modal__panel,
#bookingModal .modal-content {
  width: min(100%, 480px);
  max-width: 480px;
  min-width: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
  margin: 0;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(11, 37, 69, 0.2);
  padding: 32px 28px 28px;
  position: relative;
  transform: scale(0.97);
  opacity: 0;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
  overflow: visible;
}
#bookingModal.is-open .denta-booking-modal__panel,
#bookingModal.active .denta-booking-modal__panel,
#bookingModal.is-open .modal-content,
#bookingModal.active .modal-content {
  transform: scale(1);
  opacity: 1;
}
.denta-booking-modal__close,
#bookingModal .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 37, 69, 0.08);
  color: #0b2545;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.denta-booking-modal__close:hover,
#bookingModal .modal-close:hover {
  background: rgba(62, 207, 178, 0.25);
}
#bookingModal .denta-booking-modal__inner,
#bookingModal #modal-form-wrap {
  min-width: 0;
  max-width: 100%;
}
#bookingModal .denta-booking-modal__title,
#bookingModal .modal-title {
  font-family: var(--font-head, "Unbounded", system-ui, sans-serif);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  color: #0b2545;
  margin: 0 0 8px;
  line-height: 1.25;
  padding-right: 32px;
}
#bookingModal .denta-booking-modal__sub,
#bookingModal .modal-subtitle {
  font-size: 15px;
  color: #5a6e8a;
  line-height: 1.5;
  margin: 0 0 20px;
}
#bookingModal .denta-booking-modal__sub .denta-booking-modal__calc-line,
#bookingModal .modal-subtitle .denta-booking-modal__calc-line {
  font-weight: 700;
  color: #0b2545;
}
#bookingModal .denta-booking-modal__form,
#bookingModal .modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}
#bookingModal .denta-booking-modal__grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
#bookingModal .denta-booking-modal__cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
#bookingModal .denta-booking-modal__full {
  width: 100%;
  min-width: 0;
}
#bookingModal .denta-booking-label {
  font-size: 13px;
  font-weight: 600;
  color: #2c4767;
  margin: 0;
}
@media (min-width: 720px) {
  #bookingModal .denta-booking-modal__panel,
  #bookingModal .modal-content {
    width: min(100%, 680px);
    max-width: 680px;
    padding: 36px 36px 32px;
  }
  #bookingModal .denta-booking-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
  }
  #bookingModal .denta-booking-modal__form textarea {
    min-height: 88px;
  }
}
#bookingModal .denta-booking-modal__form input[type="text"],
#bookingModal .denta-booking-modal__form input[type="tel"],
#bookingModal .denta-booking-modal__form select,
#bookingModal .denta-booking-modal__form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8eef5;
  border-radius: 14px;
  font-family: var(--font-body, "Manrope", system-ui, sans-serif);
  font-size: 15px;
  color: #0b2545;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
}
#bookingModal .denta-booking-modal__form textarea {
  min-height: 64px;
  min-width: 0;
  max-width: 100%;
  resize: vertical;
}
#bookingModal .denta-booking-modal__form input:focus,
#bookingModal .denta-booking-modal__form select:focus,
#bookingModal .denta-booking-modal__form textarea:focus {
  border-color: #2b7fff;
}
#bookingModal .denta-booking-modal__form textarea.mf-err {
  border-color: #e53e3e;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.12);
}
#bookingModal .calc-preview {
  width: 100%;
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e8eef5;
  background: #f7fbff;
  font-size: 12px;
  line-height: 1.45;
  color: #5a6e8a;
}
#bookingModal .calc-preview__title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1b4f8a;
}
#bookingModal .calc-preview__line {
  margin: 0;
}
#bookingModal .denta-booking-modal__form input.mf-err,
#bookingModal .denta-booking-modal__form select.mf-err {
  border-color: #e53e3e;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.12);
}
/* Перебиваем inline .modal-content с посадок, где ещё свой #bookingModal */
#bookingModal.modal-overlay .modal-content {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  transform: scale(0.97);
}
#bookingModal.modal-overlay.active .denta-booking-modal__panel,
#bookingModal.modal-overlay.is-open .denta-booking-modal__panel,
#bookingModal.modal-overlay.active .modal-content,
#bookingModal.modal-overlay.is-open .modal-content {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
}
#bookingModal .denta-booking-modal__submit {
  width: 100%;
  margin-top: 4px;
  padding: 16px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #3ecfb2 0%, #2bbfa0 100%);
  color: #fff;
  font-family: var(--font-head, "Unbounded", sans-serif);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(62, 207, 178, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
#bookingModal .denta-booking-modal__submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(62, 207, 178, 0.5);
}
#bookingModal .denta-booking-modal__submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}
#bookingModal .denta-booking-modal__policy,
#bookingModal .modal-policy {
  font-size: 12px;
  color: #5a6e8a;
  text-align: center;
  line-height: 1.45;
  margin: 0;
}
#bookingModal .denta-booking-modal__policy a,
#bookingModal .modal-policy a {
  color: #2b7fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.denta-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  background: rgba(11, 37, 69, 0.04);
  border: 1px solid #e8eef5;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #5a6e8a;
  text-align: left;
  box-sizing: border-box;
}
.denta-form-consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: #3ecfb2;
  cursor: pointer;
}
.denta-form-consent__text {
  flex: 1;
  min-width: 0;
}
.denta-form-consent__text label {
  cursor: pointer;
  color: #0b2545;
  font-weight: 500;
}
.denta-form-consent__text a {
  color: #2b7fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.denta-form-consent.mf-err {
  border-color: #e53e3e;
  background: rgba(229, 62, 62, 0.06);
}

.denta-booking-success {
  text-align: center;
  padding: 24px 8px 12px;
  color: #0b2545;
  font-size: 16px;
  line-height: 1.5;
}
.denta-booking-success strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-head, "Unbounded", sans-serif);
  font-size: 18px;
}
html.denta-booking-open,
body.denta-booking-open {
  overflow: hidden;
}
body.denta-booking-open {
  padding-right: var(--denta-scroll-lock-pad, 0);
}

html[data-theme="dark"] #bookingModal .denta-booking-modal__panel,
html[data-theme="dark"] #bookingModal .modal-content {
  background: var(--white);
}
html[data-theme="dark"] .denta-booking-modal__close,
html[data-theme="dark"] #bookingModal .modal-close {
  background: rgba(232, 240, 255, 0.12);
  color: var(--ink);
}
html[data-theme="dark"] #bookingModal .denta-booking-modal__title,
html[data-theme="dark"] #bookingModal .modal-title,
html[data-theme="dark"] #bookingModal .denta-booking-modal__sub .denta-booking-modal__calc-line,
html[data-theme="dark"] #bookingModal .modal-subtitle .denta-booking-modal__calc-line {
  color: var(--ink);
  font-weight: 700;
}
html[data-theme="dark"] #bookingModal .denta-booking-modal__sub,
html[data-theme="dark"] #bookingModal .modal-subtitle,
html[data-theme="dark"] #bookingModal .denta-booking-label,
html[data-theme="dark"] #bookingModal .denta-booking-modal__policy,
html[data-theme="dark"] #bookingModal .modal-policy,
html[data-theme="dark"] .denta-form-consent,
html[data-theme="dark"] .denta-form-consent__text label,
html[data-theme="dark"] .denta-booking-success {
  color: var(--ink);
}
html[data-theme="dark"] #bookingModal .denta-booking-modal__form input[type="text"],
html[data-theme="dark"] #bookingModal .denta-booking-modal__form input[type="tel"],
html[data-theme="dark"] #bookingModal .denta-booking-modal__form select,
html[data-theme="dark"] #bookingModal .denta-booking-modal__form textarea,
html[data-theme="dark"] .denta-form-consent,
html[data-theme="dark"] #bookingModal .calc-preview {
  background: var(--cream);
  border-color: var(--gray-light);
  color: var(--ink);
}

/* Один CTA вместо фейковых полей — без белой «капсулы» от .cta-form посадочных */
.cta-form.cta-form--denta-booking {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  justify-content: center;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  max-width: none;
}
.cta-form--denta-booking .btn,
.cta-form--denta-booking .btn-primary {
  width: 100%;
  max-width: 360px;
  margin: 0;
  justify-content: center;
}
