.popup-container {
  position: relative;
  z-index: 1000;
}

.popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  z-index: 1000;
}

.popup--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.popup--visible {
  opacity: 1;
  visibility: visible;
}

.popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.popup__dialog {
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--color-surface, #ffffff);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 40px 60px;
  width: 100%;
  max-width: 640px;
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}
.booking-form__label {
  margin-bottom: 1px;
}
.booking-form__group {
  margin-bottom: 40px;
}
.booking-form__group-title-note {
  font-size: 12px;
  font-weight: 400;
  color: rgba(0 0 0 / 40%);
}
.wpcf7 .booking-form__actions input {
  margin: 0;
}
.popup--visible .popup__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.popup--size-small .popup__dialog {
  max-width: 480px;
}

.popup--size-large .popup__dialog {
  max-width: 880px;
}

.popup--size-huge .popup__dialog {
  max-width: 1030px;
}

.popup__content {
  position: relative;
}

.popup__title {
  margin: 0 0 46px;
  text-align: center;
  display: flex;
  justify-content: center;
  font-size: 46px;
}

.popup__body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
}
.popup__close {
  position: absolute;

  width: 38px;
  height: 38px;
  cursor: pointer;

  padding: 0;
  background: transparent;
  border: none;
  z-index: 99;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
  display: flex;
  justify-content: center;
  top: 0;
  right: 0;
  align-items: center;
}
.popup__close:focus-visible {
  outline: none;
}
.popup__close:hover {
  opacity: 0.8;
}
.popup__close svg {
  width: 13px;
  height: 13px;
}
html.has-open-popup,
body.has-open-popup {
  overflow: hidden;
}
/* Контейнер всего списка */
.wpcf7-form-control-wrap[data-name="preferred-specialized-options"] {
  display: block;
}

/* Хоризонтальный список с отступами между пунктами */
.booking-form__checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
}
@media (max-width: 768px) {
  .booking-form__checkbox-list {
    gap: 12px;
  }
  .wpcf7 label.booking-form__group-title {
    margin-bottom: 6px;
  }
  .booking-form__group {
    margin-bottom: 12px;
  }
  .popup__title {
    margin: 0 0 20px;
  }
}
/* Один пункт списка */
.booking-form__checkbox-list .wpcf7-list-item {
  margin: 0;
}

/* Область клика по пункту */
.booking-form__checkbox-list .wpcf7-list-item label {
  display: inline-flex;
  align-items: center; /* counterAxisAlignItems: CENTER */
  gap: 10px; /* itemSpacing: 10 */
  padding: 5px 0; /* paddingTop/paddingBottom: 5 */
  cursor: pointer;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* Кастомный чекбокс (квадратик 18x18 с рамкой #022837) */
.booking-form__checkbox-list .wpcf7-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 18px;
  height: 18px;
  border: 1px solid #022837;
  border-radius: 2px;
  background-color: #fff;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

/* Галочка при checked */
.booking-form__checkbox-list .wpcf7-list-item input[type="checkbox"]::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  background-color: transparent;
  transition: background-color 0.15s ease-out;
}

.booking-form__checkbox-list
  .wpcf7-list-item
  input[type="checkbox"]:checked::before {
  background-color: #022837;
}

/* Текст пункта */
.booking-form__checkbox-list .wpcf7-list-item-label {
  font-size: 14px;
  line-height: 1.4; /* ~140% */
  color: #000000;
  font-weight: 400;
}
.wpcf7-not-valid-tip {
  font-size: 12px;
}
.booking-form__checkbox-list .wpcf7-list-item label {
  margin: 0;
  padding: 0;
}
@media (max-width: 768px) {
  .popup {
    padding: var(--space-4);
  }

  .popup__dialog {
    max-width: 100%;
    padding: var(--space-5);
  }

  .popup__title {
    font-size: clamp(20px, 4vw + 0.25rem, 28px);
  }
}
.special-popup__kicker {
  text-align: center;
  display: flex;
  justify-content: center;
  margin: 10px 0 10px;
}

/* Modal layout with gallery */
.popup__content--with-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.popup__media,
.popup__main {
  min-width: 0;
}
.popup__content--with-gallery .title {
  text-align: left;
  justify-content: left;
  margin-bottom: 10px;
}
.popup__content--with-gallery .popup__body {
  font-size: 14px;
}
/* Gallery inside modal */
.popup__media .yacht-gallery {
  width: 100%;
  min-width: 0;
  height: 420px;
  background: var(--color-bg-alt);
  overflow: hidden;
}

.popup__media .yacht-gallery__image {
  width: 100%;
  height: 420px;
  overflow: hidden;
}

.popup__media .yacht-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup__media .yacht-gallery__nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  pointer-events: none;
  z-index: 10;
}

.popup__media .yacht-gallery__nav .swiper-nav-btn {
  width: 30px;
  height: 30px;
  pointer-events: auto;
}

.popup__media .yacht-gallery__nav .swiper-nav-btn svg {
  width: 12px;
  height: 11px;
}

.popup__media .yacht-gallery-thumbs {
  margin-top: 10px;
  height: 75px;
  margin-inline: 35px;
}

.popup__media .yacht-gallery-thumbs__image {
  width: 100%;
  height: 60px;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.popup__media .yacht-gallery-thumbs__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup__media .yacht-gallery-thumbs .swiper-slide {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.popup__media .yacht-gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
}

@media (max-width: 1024px) {
  .popup__media .yacht-gallery {
    height: 360px;
  }

  .popup__media .yacht-gallery-thumbs {
    margin-inline: 10px;
    height: 70px;
  }

  .popup__media .yacht-gallery-thumbs__image {
    height: 100%;
  }
}

@media (max-width: 768px) {
  .popup__content--with-gallery {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .popup__media .yacht-gallery {
    aspect-ratio: 16/10;
    height: auto;
  }

  .popup__media .yacht-gallery__image {
    height: 100%;
  }

  .popup__media .yacht-gallery-thumbs {
    height: 100px;
  }
}

@media (max-width: 520px) {
  .popup__media .yacht-gallery-thumbs {
    height: 50px;
    margin-inline: 65px;
  }
}

@media (max-width: 400px) {
  .popup__media .yacht-gallery-thumbs {
    margin-inline: 24px;
  }
}
