/* Попапы (Fancybox 6) */

/* Контейнер Fancybox */
.fancybox__content:has(> .popup) {
  padding: 0 !important;
  background: transparent !important;
  max-width: none;
  box-shadow: none;
  overflow: visible;
}

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

/* База */
.popup {
  font-family: 'Roboto', sans-serif;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(19, 28, 41, .14);
}

/* Заголовки */
.popup__title {
  font-size: 28px;
  font-weight: 700;
  color: #131C29;
  line-height: 1.25;
  margin: 0 0 8px;
}
.popup__sub {
  font-size: 16px;
  font-weight: 400;
  color: #131C29;
  line-height: 1.5;
  margin: 0;
}

/* Инпуты */
.popup__input-wrap { position: relative; }
.popup__input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  display: block;
  pointer-events: none;
}
.popup__input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1.5px solid #E8ECF2;
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  color: #131C29;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.popup__input:focus { border-color: #0C78ED; }
.popup__input::placeholder { color: #9A9A9A; }

/* Кнопка */
.popup__submit {
  width: 100%;
  height: 48px;
  background: #E60000;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: background .2s;
}
.popup__submit:hover { background: #cc0000; }

/* Согласие */
.popup__consent {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 400;
  color: #131C29;
  line-height: 1.4;
}
.popup__consent-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.popup__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.popup__check-mark {
  width: 18px;
  height: 18px;
  border: 1px solid #E3EAF0;
  border-radius: 4.5px;
  background: #fff;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.popup__checkbox:checked + .popup__check-mark {
  background-image: url('../img/ui/checkbox.svg');
  border-color: transparent;
}
.popup__consent a { color: #E60000; text-decoration: none; }
.popup__consent a:hover { text-decoration: underline; }

/* Обратный звонок */
.popup--callback {
  width: 460px;
  padding: 32px 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popup--callback .popup__title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  margin-bottom: 6px;
}
.popup--callback .popup__sub {
  text-align: center;
  line-height: 1.4;
  margin-bottom: 8px;
}
.popup--callback .popup__input-wrap,
.popup--callback .popup__submit,
.popup--callback .popup__consent {
  width: 100%;
  align-self: stretch;
}
.popup--callback .popup__input { height: 50px; font-size: 15px; }
.popup--callback .popup__submit {
  height: 54px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 14px;
  margin-top: 4px;
}
.popup--callback .popup__consent { margin-top: 4px; }

/* Бронирование */
.popup--booking {
  width: 660px;
  padding: 32px 32px 28px;
}
.popup--booking .popup__header {
  text-align: center;
  margin-bottom: 12px;
}
.popup--booking .popup__car-name {
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #131C29;
  margin-bottom: 3px;
}
.popup--booking .popup__car-config {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #0C78ED;
  margin-bottom: 16px;
}
.popup--booking .popup__body {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.popup--booking .popup__left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 auto;
}
.popup--booking .popup__photo {
  width: 202px;
  height: 142.9px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}
.popup--booking .popup__price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #9A9A9A;
}
.popup--booking .popup__price-val {
  font-size: 14px;
  font-weight: 600;
  color: #131C29;
}
.popup--booking .popup__price-val--green {
  font-size: 16px;
  font-weight: 500;
  color: #36B555;
}
.popup--booking .popup__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}
.popup--booking .popup__consent { margin-top: auto; }

/* Кредит */
.popup--credit {
  width: 700px;
  padding: 32px 32px 28px;
  overflow: visible;
  position: relative;
}
.popup--credit .popup__header {
  text-align: center;
  margin-bottom: 14px;
}
.popup--credit .popup__title { margin-bottom: 6px; }
.popup--credit .popup__sub   { margin-bottom: 4px; }
.popup--credit .popup__car-name {
  font-size: 16px;
  font-weight: 500;
  color: #131C29;
}
.popup--credit .popup__body {
  display: flex;
  gap: 28px;
  align-items: center;
}
.popup--credit .popup__form {
  flex: 0 0 340px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.popup--credit .popup__consent { align-items: flex-start; }
.popup--credit .popup__consent-label { margin-top: 1px; }
.popup--credit .popup__right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
}
.popup--credit .popup__photo {
  width: 350.2px;
  height: 178px;
  display: block;
  object-fit: contain;
  margin-right: -110px;
}

/* Спасибо */
.popup--thanks {
  width: 380px;
  height: 310px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.popup--thanks .popup__text {
  flex-shrink: 0;
  padding: 18px 20px 4px;
  text-align: center;
}
.popup--thanks .popup__title { text-align: center; line-height: 1.2; margin-bottom: 4px; }
.popup--thanks .popup__sub   { text-align: center; margin-bottom: 0; }
.popup--thanks .popup__img {
  width: 100%;
  display: block;
}

/* Мобильный */
@media (max-width: 768px) {
  .fancybox__content:has(> .popup) {
    width: auto !important;
    max-width: calc(100vw - 24px);
  }

  .popup--callback {
    width: auto;
    max-width: calc(100vw - 24px);
    padding: 24px 20px 20px;
    gap: 10px;
  }
  .popup--callback .popup__title { font-size: 24px; }
  .popup--callback .popup__sub { font-size: 14px; }
  .popup--callback .popup__input { height: 46px; }
  .popup--callback .popup__submit { height: 48px; font-size: 15px; }

  .popup--booking {
    width: auto;
    max-width: calc(100vw - 24px);
    padding: 22px 18px 20px;
  }
  .popup--booking .popup__title { font-size: 22px; }
  .popup--booking .popup__sub   { font-size: 14px; }
  .popup--booking .popup__car-name { font-size: 15px; }
  .popup--booking .popup__car-config { font-size: 13px; margin-bottom: 12px; }
  .popup--booking .popup__body {
    flex-direction: column;
    gap: 14px;
  }
  .popup--booking .popup__left {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }
  .popup--booking .popup__photo {
    width: 140px;
    height: 100px;
    flex-shrink: 0;
  }
  .popup--booking .popup__form { width: 100%; }
  .popup--booking .popup__submit { height: 46px; font-size: 15px; }

  .popup--credit {
    width: auto;
    max-width: calc(100vw - 24px);
    padding: 22px 18px 20px;
    overflow: hidden;
  }
  .popup--credit .popup__title { font-size: 22px; line-height: 1.2; }
  .popup--credit .popup__title br { display: none; }
  .popup--credit .popup__sub { font-size: 14px; }
  .popup--credit .popup__car-name { font-size: 15px; }
  .popup--credit .popup__body {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }
  .popup--credit .popup__form {
    flex: none;
    width: 100%;
    order: 2;
  }
  .popup--credit .popup__right {
    width: 100%;
    justify-content: center;
    order: 1;
  }
  .popup--credit .popup__photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin-right: 0;
  }
  .popup--credit .popup__submit { height: 46px; font-size: 15px; }

  .popup--thanks {
    width: auto;
    max-width: calc(100vw - 24px);
    height: auto;
    min-height: 280px;
  }
  .popup--thanks .popup__title { font-size: 24px; }
  .popup--thanks .popup__sub   { font-size: 14px; }
}

@media (max-width: 480px) {
  .popup__title { font-size: 20px !important; }
  .popup--booking .popup__photo { width: 120px; height: 84px; }
}
