/* ==========================================================================
   Модальное окно «Найди дешевле»
   ========================================================================== */

.chp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.chp-modal-overlay.is-open { display: flex; }

.chp-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  animation: chpModalIn .25s ease;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
}
@keyframes chpModalIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chp-modal__top {
  padding: 28px 24px 0;
  overflow-y: auto;
  position: relative;
  z-index: 2;
}

.chp-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 3;
}
.chp-modal__close:hover { background: #f1f3f6; }
.chp-modal__close:active { transform: scale(.95); }
.chp-modal__close svg { display: block; width: 20px; height: 20px; }

.chp-modal__title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 600;
  color: #3E4653;
  position: relative;
  z-index: 2;
}

/* Блок товара */
.chp-product {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.chp-product__thumb {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #EDF1F8;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chp-product__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.chp-product__title {
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 19px;
  color: #3E4653;
}

/* Поля формы */
.chp-field {
  position: relative;
  margin-bottom: 18px;
}
.chp-field__input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 14px 8px;
  font-size: 15px;
  color: #3E4653;
  background: #fff;
  border: 1px solid #BBC7D8;
  border-radius: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit;
}
.chp-field__input:focus {
  border-color: #3E4653;
  box-shadow: 0 0 0 3px rgba(62, 70, 83, .1);
}
.chp-field__label {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #8a94a3;
  pointer-events: none;
  transition: all .18s ease;
  background: #fff;
  padding: 0 4px;
  z-index: 1;
}
.chp-field:hover .chp-field__label,
.chp-field__input:focus + .chp-field__label,
.chp-field__input:not(:placeholder-shown) + .chp-field__label {
  top: 0;
  font-size: 12px;
  color: #3E4653;
}

.chp-field--labeled { margin-bottom: 12px; }
.chp-field__top-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #3E4653;
  margin-bottom: 6px;
}
.chp-field--labeled .chp-field__input {
  padding: 12px 14px;
  border-radius: 15px;
}
.chp-field__input::placeholder { color: #8a94a3; }

/* Чекбокс */
.chp-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
  line-height: 1.45;
  color: #6b7484;
  position: relative;
  z-index: 1;
}
.chp-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.chp-checkbox__box {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #BBC7D8;
  border-radius: 5px;
  background: #fff;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color .2s;
}
.chp-checkbox__box::after {
  content: "";
  width: 12px;
  height: 12px;
  background: #3E4653;
  border-radius: 2px;
  transform: scale(0);
  transition: transform .15s ease;
}
.chp-checkbox:hover .chp-checkbox__box { border-color: #3E4653; }
.chp-checkbox input:checked + .chp-checkbox__box { border-color: #3E4653; }
.chp-checkbox input:checked + .chp-checkbox__box::after { transform: scale(1); }
.chp-checkbox input:focus-visible + .chp-checkbox__box {
  box-shadow: 0 0 0 3px rgba(62, 70, 83, .2);
}
.chp-checkbox__text a {
  color: #3E4653;
  text-decoration: underline;
}
.chp-checkbox__text a:hover { text-decoration: none; }

.chp-personalInfo__error {
  color: #e04242;
  font-size: 12px;
  margin-bottom: 4px;
  display: none;
}
.chp-personalInfo__error.is-visible { display: block; }

/* Нижний блок */
.chp-highlight {
  background: #EDF1F8;
  padding: 18px 24px 24px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
}
.chp-highlight__decor {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 123px;
  height: 144px;
  pointer-events: none;
  z-index: 0;
}
.chp-highlight__decor svg { display: block; width: 100%; height: 100%; }
.chp-highlight > *:not(.chp-highlight__decor) {
  position: relative;
  z-index: 1;
  margin-bottom: 15px;
}

/* Кнопка отправки */
.chp-submit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  background: #3E4653;
  border-radius: 10px;
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background .2s, transform .15s;
  position: relative;
  z-index: 1;
  font-family: inherit;
  line-height: 1.2;
}
.chp-submit:hover { background: #4c5564; }
.chp-submit:active { transform: scale(.98); }
.chp-submit:disabled { opacity: .6; cursor: not-allowed; }

/* Экран успеха */
.chp-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px 24px 40px;
  position: relative;
  z-index: 1;
}
.chp-success.is-visible { display: flex; }
.chp-success__icon {
  margin-top: 50px;
  display: block;
  width: 59px;
  height: 42px;
}
.chp-success__title {
  margin: 18px 0 0;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 22px;
  color: #64A12F;
  text-align: center;
}
.chp-success__text {
  margin: 30px 0 0;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 21px;
  color: #3E4653;
  text-align: center;
}
.chp-success__email { font-weight: 600; color: #3E4653; }