/* ============================================================
   Модальное окно «Парк приключений Хотьково»
   Вёрстка один-в-один по макету Figma (modal-desktop / modal-mob)
   Все селекторы под .apm — стили сайта не затрагиваются.
   ============================================================ */

.apm,
.apm *,
.apm *::before,
.apm *::after {
  box-sizing: border-box;
}

/* ---------- Каркас ---------- */
.apm {
  position: relative;
  width: 1522px;
  max-width: 100%;
  background: #fff;
  border-radius: 32px;
  padding: 24px;
  display: flex;
  gap: 28px;
  font-family: 'Mulish', sans-serif;
  color: #25262b;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Крестик ---------- */
.apm__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: #25262b;
  line-height: 0;
  z-index: 3;
}
.apm__close svg {
  display: block;
  width: 24px;
  height: 24px;
}

/* ---------- Левая часть: фото ---------- */
.apm__media {
  position: relative;
  flex: 0 0 750px;
  width: 750px;
  height: 546px;
  border-radius: 24px;
  overflow: hidden;
}
.apm__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.apm__brush {
  position: absolute;
  left: -20px;
  top: 345px;
  width: 567px;
  height: 279px;
  pointer-events: none;
}
.apm__brush img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.apm__brush-text {
  position: absolute;
  left: 106px;
  top: 144px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 35px;
  color: #25262b;
  white-space: nowrap;
}

/* ---------- Правая часть ---------- */
.apm__content {
  position: relative;
  z-index: 4;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.apm__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Заголовок + часы */
.apm__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.apm__title {
  margin: 0;
  max-width: 696px;
  font-family: 'Unbounded', sans-serif;
  font-weight: 500;
  font-size: 36px;
  line-height: 45px;
  color: #25262b;
}
.apm__hours {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  color: #25262b;
}
.apm__hours svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}
.apm__hours b {
  font-weight: 700;
}

/* Акции */
.apm__deals {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.apm__deals-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 20px;
}
.apm__cards {
  display: flex;
  gap: 8px;
}
.apm__card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border-radius: 8px;
}
.apm__card--child {
  background: #ddf4ff;
}
.apm__card--adult {
  background: rgba(135, 188, 45, 0.2);
}
.apm__card-ic {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.apm__card-ic img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.apm__card-txt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.apm__card-label {
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  color: #25262b;
}
.apm__card-price {
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  color: #0077df;
}

/* Телеграм */
.apm__tg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: #f3f2f5;
  border-radius: 10px;
}
.apm__tg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}
.apm__tg-ic {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #25262b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.apm__tg-ic svg {
  width: 16px;
  height: 14px;
  display: block;
}
.apm__tg-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.apm__tg-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 16px;
}
.apm__tg-sub {
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
}
.apm__tg-btn {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: #25262b;
  color: #fff;
  font-weight: 500;
  font-size: 12px;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: opacity .2s;
}
.apm__tg-btn:hover {
  opacity: .85;
  color: #fff;
}

/* Форма */
.apm__form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.apm__q {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 4px;
}
.apm__radios {
  display: flex;
  gap: 8px;
}
.apm__radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 24px;
  color: #383838;
  font-weight: 400;
}
.apm__radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.apm__radio-box {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.apm__radio-box::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #c9c8cf;
  background: #fff;
  transition: all .15s;
}
.apm__radio input:checked + .apm__radio-box::before {
  width: 18px;
  height: 18px;
  border-color: #19b2ff;
  background: #19b2ff;
}
.apm__radio-box::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .15s;
  margin-top: -2px;
}
.apm__radio input:checked + .apm__radio-box::after {
  transform: rotate(-45deg) scale(1);
}

/* Телефон */
.apm__phone {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 372px;
  max-width: 100%;
  height: 40px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #eae9ee;
  border-radius: 10px;
}
.apm__phone-flag {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.apm__phone-flag img {
  width: 24px;
  height: 16px;
  display: block;
  border-radius: 2px;
}
.apm__phone-flag svg {
  width: 10px;
  height: 6px;
  display: block;
}
.apm__phone-code {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 21px;
  color: #25262b;
  flex: 0 0 auto;
}
.apm__phone input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  padding: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 21px;
  color: #25262b;
}
.apm__phone input::placeholder {
  color: #9593a0;
}

/* Согласие */
.apm__consent {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  cursor: pointer;
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  color: #25262b;
}
.apm__consent input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.apm__check {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.apm__check::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #c9c8cf;
  background: #fff;
  transition: all .15s;
}
.apm__consent input:checked + .apm__check::before {
  border-color: #19b2ff;
  background: #19b2ff;
}
.apm__check::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .15s;
  margin-top: -2px;
}
.apm__consent input:checked + .apm__check::after {
  transform: rotate(-45deg) scale(1);
}

/* Кнопка */
/* в макете отступ от согласия до кнопки 32px; форма даёт 15px, добираем 17px */
.apm__submit {
  margin-top: 17px;
  width: 246px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: #19b2ff;
  color: #fff;
  font-family: 'Mulish', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 23px;
  cursor: pointer;
  transition: background .2s;
}
.apm__submit:hover {
  background: #0f9ce5;
}

/* Мобильные элементы скрыты на десктопе */
.apm__title--mob {
  display: none;
}

/* ============================================================
   МОБИЛЬНАЯ ВЕРСИЯ — макет modal-mob (модалка 320x805, r12)
   ============================================================ */
@media (max-width: 767px) {
  .apm {
    width: 320px;
    max-width: calc(100vw - 24px);
    margin: 0 auto;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
  }

  .apm__close {
    top: 20px;
    right: 16px;
    width: 16px;
    height: 16px;
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, .55));
  }
  .apm__close svg {
    width: 16px;
    height: 16px;
  }

  .apm__media {
    flex: 0 0 auto;
    width: 100%;
    height: 213px;
    border-radius: 0;
    overflow: visible;
  }
  .apm__photo {
    height: 213px;
    border-radius: 0;
  }
  /* мазок заходит на фото снизу и вылезает за края */
  .apm__brush {
    left: -31px;
    top: 66px;
    width: 409px;
    height: 201px;
    z-index: 2;
  }
  .apm__brush-text {
    display: none;
  }

  /* заголовок поверх мазка */
  .apm__title--mob {
    display: block;
    position: absolute;
    left: 12px;
    top: 163px;
    width: 224px;
    margin: 0;
    z-index: 3;
    font-family: 'Unbounded', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 17px;
    color: #25262b;
  }
  .apm__title--desk {
    display: none;
  }

  .apm__content {
    gap: 20px;
    padding: 12px 12px 20px;
    background: #fff;
    border-radius: 0 0 12px 12px;
  }
  .apm__body {
    gap: 20px;
  }

  /* часы — плашка на всю ширину */
  .apm__head {
    gap: 0;
  }
  .apm__hours {
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    white-space: nowrap;
    background: #f3f2f5;
    border-radius: 7px;
    font-size: 12px;
    line-height: 15px;
    text-align: center;
  }
  .apm__hours svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
  }

  .apm__deals-title {
    font-size: 14px;
    line-height: 18px;
  }
  .apm__card {
    gap: 4px;
    align-items: center;
  }
  .apm__card-ic {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
  }
  .apm__card-label {
    font-size: 12px;
    line-height: 15px;
  }

  /* телеграм — колонкой, кнопка на всю ширину */
  .apm__tg {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 8px;
  }
  .apm__tg-row {
    gap: 8px;
    align-items: flex-start;
  }
  .apm__tg-ic {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }
  .apm__tg-txt {
    gap: 1px;
  }
  .apm__tg-title {
    font-size: 13px;
  }
  .apm__tg-btn {
    width: 100%;
    height: 28px;
  }

  /* форма */
  .apm__form {
    gap: 16px;
  }
  .apm__q {
    font-size: 14px;
  }
  .apm__radios {
    flex-direction: column;
    gap: 8px;
  }
  .apm__phone {
    width: 100%;
    gap: 12px;
  }
  .apm__consent {
    font-size: 13px;
    line-height: 18px;
    align-items: flex-start;
  }
  .apm__submit {
    margin-top: 0;
    width: 100%;
    height: 40px;
    border-radius: 10px;
    font-size: 15px;
  }
}

/* ============================================================
   Contact Form 7 внутри модалки — приводим разметку плагина
   к макету (CF7 генерирует свои span/label)
   ============================================================ */
.apm .wpcf7 { margin: 0; }
.apm .wpcf7-form { display: flex; flex-direction: column; gap: 15px; }
.apm .wpcf7-form-control-wrap { display: contents; }
.apm .wpcf7-spinner { display: none; }
.apm .wpcf7-not-valid-tip { font-size: 12px; line-height: 16px; color: #e02b2b; margin-top: 4px; }
.apm .wpcf7-response-output {
  margin: 8px 0 0; padding: 8px 12px; border-radius: 8px;
  font-size: 13px; line-height: 18px; border-width: 1px;
}

/* радиокнопки */
.apm .wpcf7-radio { display: flex; gap: 8px; }
.apm .wpcf7-acceptance .wpcf7-list-item,
.apm .wpcf7-radio .wpcf7-list-item { margin: 0; }
.apm .wpcf7-list-item label { display: inline-flex; align-items: flex-start; cursor: pointer; margin: 0; }
.apm .wpcf7-list-item input[type='radio'],
.apm .wpcf7-list-item input[type='checkbox'] { position: absolute; opacity: 0; width: 0; height: 0; }
.apm .wpcf7-radio .wpcf7-list-item-label {
  position: relative; padding-left: 30px;
  font-size: 14px; line-height: 24px; color: #383838; font-weight: 400;
}
.apm .wpcf7-radio .wpcf7-list-item-label::before {
  content: ''; position: absolute; left: 4px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #c9c8cf; background: #fff; transition: all .15s;
}
.apm .wpcf7-radio input:checked + .wpcf7-list-item-label::before {
  left: 3px; top: 3px; width: 18px; height: 18px;
  border-color: #19b2ff; background: #19b2ff;
}
.apm .wpcf7-radio .wpcf7-list-item-label::after {
  content: ''; position: absolute; left: 8px; top: 9px;
  width: 8px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s;
}
.apm .wpcf7-radio input:checked + .wpcf7-list-item-label::after { transform: rotate(-45deg) scale(1); }

/* согласие */
.apm .wpcf7-acceptance .wpcf7-list-item-label {
  position: relative; padding-left: 28px; display: inline-block;
  font-weight: 300; font-size: 16px; line-height: 24px; color: #25262b;
}
.apm .wpcf7-acceptance .wpcf7-list-item-label::before {
  content: ''; position: absolute; left: 4px; top: 4px;
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid #c9c8cf; background: #fff; transition: all .15s;
}
.apm .wpcf7-acceptance input:checked + .wpcf7-list-item-label::before {
  border-color: #19b2ff; background: #19b2ff;
}
.apm .wpcf7-acceptance .wpcf7-list-item-label::after {
  content: ''; position: absolute; left: 8px; top: 9px;
  width: 8px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); transition: transform .15s;
}
.apm .wpcf7-acceptance input:checked + .wpcf7-list-item-label::after { transform: rotate(-45deg) scale(1); }

/* поле телефона от CF7 */
.apm .apm__phone input.wpcf7-tel {
  flex: 1 1 auto; min-width: 0; width: auto;
  border: 0; outline: 0; background: none; padding: 0; box-shadow: none;
  font-family: 'Montserrat', sans-serif; font-size: 14px; line-height: 21px; color: #25262b;
}
.apm .apm__phone input.wpcf7-tel:focus { border: 0; box-shadow: none; }

/* кнопка отправки */
.apm input.apm__submit,
.apm .wpcf7-submit {
  margin-top: 17px; width: 246px; height: 48px;
  border: 0; border-radius: 12px; background: #19b2ff; color: #fff;
  font-family: 'Mulish', sans-serif; font-weight: 600; font-size: 16px; line-height: 23px;
  cursor: pointer; transition: background .2s;
}
.apm input.apm__submit:hover,
.apm .wpcf7-submit:hover { background: #0f9ce5; }

@media (max-width: 767px) {
  .apm .wpcf7-form { gap: 16px; }
  .apm .wpcf7-radio { flex-direction: column; gap: 8px; }
  .apm .wpcf7-acceptance .wpcf7-list-item-label { font-size: 13px; line-height: 18px; }
  .apm input.apm__submit,
  .apm .wpcf7-submit { margin-top: 0; width: 100%; height: 40px; border-radius: 10px; font-size: 15px; }
}

/* служебные элементы CF7 не должны влиять на вёрстку */
.apm .screen-reader-response {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.apm .wpcf7-form > input[type='hidden'] { display: none !important; }
.apm .hidden-fields-container,
.apm fieldset.hidden-fields-container { display: none !important; }
/* пустой блок ответа CF7 не должен добавлять высоту до отправки */
.apm .wpcf7-response-output:empty { display: none !important; margin: 0; padding: 0; border: 0; }
