/* === УНИКАЛЬНАЯ ОБЁРТКА ДЛЯ ИЗОЛЯЦИИ ОТ ГЛОБАЛЬНЫХ СТИЛЕЙ === */
#unique-callback-wrapper {
  position: relative !important;
  z-index: 10000 !important;
}

/* === СБРОС И НАСЛЕДОВАНИЕ СТИЛЕЙ ВНУТРИ ОБЁРТКИ === */
#unique-callback-wrapper *,
#unique-callback-wrapper *::before,
#unique-callback-wrapper *::after {
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  font-weight: normal !important;
  text-decoration: none !important;
  list-style: none !important;
  line-height: 1.2 !important;
}

/* === ОВЕРЛЕЙ === */
#unique-callback-wrapper .modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-color: rgba(28, 32, 35, 0.85) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.3s ease, visibility 0.3s ease !important;
  z-index: 1001 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

#unique-callback-wrapper .modal-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
}

/* === КОНТЕЙНЕР ФОРМЫ === */
#unique-callback-wrapper .callback-form-container {
  position: relative !important;
  width: 350px !important;
  height: 300px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
  font-family: 'Geologica', sans-serif !important;
  background-color: #ffffff !important;
}

/* === ЗАГОЛОВОК ФОРМЫ === */
#unique-callback-wrapper #content .callback-form-header p,
#unique-callback-wrapper #right .callback-form-header p,
#unique-callback-wrapper .callback-form-header p {
  width: 350px !important;
  height: 73px !important;
  background-color: #AB261B !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #D9D9D9 !important;
  font-family: 'Geologica', sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  text-align: center !important;
  padding: 10px 30px !important;
  box-sizing: border-box !important;
  line-height: 1.3 !important;
  overflow: hidden !important;
  margin: 0 !important;
}

/* === ТЕЛО ФОРМЫ === */
#unique-callback-wrapper .callback-form-body {
  position: relative !important;
  height: calc(300px - 73px) !important;
  background-color: white !important;
  box-sizing: border-box !important;
}

/* === ПОЛЯ ВВОДА === */
#unique-callback-wrapper #content .input-field,
#unique-callback-wrapper #right .input-field,
#unique-callback-wrapper .input-field {
  position: absolute !important;
  width: 292px !important;
  height: 54px !important;
  left: 29px !important;
  border: 1px solid #B5B5B5 !important;
  border-radius: 5px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  font-family: 'Geologica', sans-serif !important;
  font-size: 14px !important;
  outline: none !important;
  background-color: white !important;
  color: #000 !important;
}

#unique-callback-wrapper .input-field::placeholder {
  color: #696969 !important;
  opacity: 1 !important;
}

#unique-callback-wrapper .callback-name {
  top: calc(99px - 73px) !important;
}

#unique-callback-wrapper .callback-phone {
  top: calc(163px - 73px) !important;
}

/* === КНОПКА ОТПРАВКИ === */
#unique-callback-wrapper #content .callback-btn,
#unique-callback-wrapper #right .callback-btn,
#unique-callback-wrapper .callback-btn {
  position: absolute !important;
  width: 292px !important;
  height: 44px !important;
  left: 29px !important;
  top: calc(236px - 73px) !important;
  background-color: #5B5B5B !important;
  color: white !important;
  border: none !important;
  border-radius: 40px !important;
  font-family: 'Geologica', sans-serif !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
  opacity: 0.7 !important;
  pointer-events: none !important;
}

#unique-callback-wrapper .callback-btn.valid {
  background-color: #AB261B !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#unique-callback-wrapper .callback-btn.valid:hover {
  background-color: #D93B27 !important;
}

/* === КРЕСТИК ЗАКРЫТИЯ ФОРМЫ === */
#unique-callback-wrapper .modal-close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 13px !important;
  height: 13px !important;
  cursor: pointer !important;
  z-index: 1002 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#unique-callback-wrapper .modal-close::before,
#unique-callback-wrapper .modal-close::after {
  content: '' !important;
  position: absolute !important;
  width: 100% !important;
  height: 2px !important;
  top: 50% !important;
  left: 0 !important;
  background-color: #920000 !important;
  transform-origin: center !important;
  border-radius: 1px !important;
}

#unique-callback-wrapper .modal-close::before {
  transform: rotate(45deg) !important;
}

#unique-callback-wrapper .modal-close::after {
  transform: rotate(-45deg) !important;
}

/* === СКРЫТИЕ LABEL (для доступности) === */
#unique-callback-wrapper .callback-form-body label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* === КОНТЕЙНЕР LOTTIE CTA === */
#unique-callback-wrapper .lottie-cta-wrapper {
  position: fixed !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0)) !important;
  right: 20px !important;
  width: 80px !important;
  height: 80px !important;
  pointer-events: auto !important;
  z-index: 9999 !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: block !important;
}

/* === ЗАЩИТА ОТ ГЛОБАЛЬНЫХ СТИЛЕЙ КНОПОК === */
#unique-callback-wrapper .lottie-cta-wrapper,
#unique-callback-wrapper .lottie-cta-wrapper button,
#unique-callback-wrapper .lottie-cta-wrapper div {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* === ФИКСЫ ДЛЯ LOTTIE SVG === */
#unique-callback-wrapper #lottie-cta {
  width: 100% !important;
  height: 100% !important;
}

#unique-callback-wrapper #lottie-cta svg {
  width: 100% !important;
  height: 100% !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  border-radius: 50% !important;
  background-color: transparent !important;
}

/* === СООБЩЕНИЕ ПОСЛЕ ОТПРАВКИ === */
#unique-callback-wrapper .callback-message-container {
  position: absolute !important;
  top: 319px !important;
  left: 541px !important;
  width: 400px !important;
  height: 89px !important;
  background-color: #AB261B !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Geologica', sans-serif !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden !important;
}

#unique-callback-wrapper .callback-message-container p {
  margin: 0 !important;
  padding: 0 20px !important;
  font-size: 18px !important;
  line-height: 19px !important;
  color: #D9D9D9 !important;
  text-align: center !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

/* === КРЕСТИК ЗАКРЫТИЯ СООБЩЕНИЯ === */
#unique-callback-wrapper .callback-message-close {
  position: absolute !important;
  top: 335px !important;
  right: 27px !important;
  width: 13px !important;
  height: 13px !important;
  cursor: pointer !important;
  z-index: 1002 !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

#unique-callback-wrapper .callback-message-close::before,
#unique-callback-wrapper .callback-message-close::after {
  content: '' !important;
  position: absolute !important;
  width: 100% !important;
  height: 2px !important;
  top: 50% !important;
  left: 0 !important;
  background-color: #7D0000 !important;
  transform-origin: center !important;
  border-radius: 1px !important;
}

#unique-callback-wrapper .callback-message-close::before {
  transform: rotate(45deg) !important;
}

#unique-callback-wrapper .callback-message-close::after {
  transform: rotate(-45deg) !important;
}

/* === АДАПТИВНОСТЬ: экраны до 350px === */
@media (max-width: 350px) {
  #unique-callback-wrapper .callback-form-container {
    width: 320px !important;
    height: 280px !important;
  }

  #unique-callback-wrapper .callback-form-header p {
    width: 320px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    padding: 8px 20px !important;
  }

  #unique-callback-wrapper .input-field {
    width: 262px !important;
    height: 50px !important;
    font-size: 14px !important;
  }

  #unique-callback-wrapper .callback-name { top: calc(85px - 73px) !important; }
  #unique-callback-wrapper .callback-phone { top: calc(145px - 73px) !important; }

  #unique-callback-wrapper .callback-btn {
    width: 262px !important;
    height: 40px !important;
    font-size: 15px !important;
    top: calc(215px - 73px) !important;
  }
}

/* === АДАПТИВНОСТЬ: экраны 351px–480px === */
@media (min-width: 351px) and (max-width: 480px) {
  #unique-callback-wrapper .callback-form-container {
    width: 330px !important;
    height: 290px !important;
  }

  #unique-callback-wrapper .callback-form-header p {
    font-size: 15px !important;
    padding: 9px 25px !important;
  }

  #unique-callback-wrapper .input-field {
    width: 272px !important;
    height: 52px !important;
    font-size: 14px !important;
  }

  #unique-callback-wrapper .callback-name { top: calc(92px - 73px) !important; }
  #unique-callback-wrapper .callback-phone { top: calc(155px - 73px) !important; }

  #unique-callback-wrapper .callback-btn {
    width: 272px !important;
    height: 42px !important;
    top: calc(225px - 73px) !important;
  }
}

/* === АДАПТИВНОСТЬ: маленькие экраны по высоте === */
@media (max-height: 600px) {
  #unique-callback-wrapper .callback-form-container {
    transform: scale(0.9) !important;
    transform-origin: center top !important;
  }
}