/* ===========================================
   МОДАЛЬНОЕ ОКНО ВЫЗОВА - СТИЛИ
   =========================================== */

/* Модальное окно */
.call-modal {
  position: fixed;
  inset: 0;
  display: none;
  opacity: 0;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.call-modal.is-open {
  display: block;
  opacity: 1;
}

/* Фон модального окна */
.call-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.call-modal.is-open .call-backdrop {
  opacity: 1;
}

/* Диалоговое окно */
.call-dialog {
  position: relative;
  max-width: 500px;
  margin: 12vh auto; /* опускаем модал ниже на десктопах */
  background: #fff;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-height: 90vh; /* не вылезаем за экран по высоте */
  overflow: auto;   /* прокрутка контента внутри при нехватке места */
}

/* Анимация появления */
@keyframes popup-bounce {
  0% { 
    transform: scale(0.7);
    opacity: 0;
  }
  60% { 
    transform: scale(1.05);
    opacity: 1;
  }
  100% { 
    transform: scale(1);
    opacity: 1;
  }
}

.call-modal.is-open .call-dialog {
  animation: popup-bounce 0.4s ease forwards;
}

/* ===========================================
   ЗАГОЛОВОК И ИКОНКА ТЕЛЕФОНА
   =========================================== */

.call-header {
  text-align: center;
  padding: 40px 30px 20px;
  background: #fff;
}

/* Обертка для иконки телефона */
.phone-icon-wrapper {
  display: inline-block;
  width: 80px;          /* РАЗМЕР: измените это значение для изменения размера трубки */
  height: 80px;         /* РАЗМЕР: измените это значение для изменения размера трубки */
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;  /* ПОЗИЦИЯ: центрирование трубки */
  animation: phone-ring 1.5s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Анимация звонка телефона */
@keyframes phone-ring {
  0%, 100% {
    transform: rotate(0deg) scale(1);
  }
  10%, 30% {
    transform: rotate(-15deg) scale(1.1);
  }
  20%, 40% {
    transform: rotate(15deg) scale(1.1);
  }
  50% {
    transform: rotate(0deg) scale(1);
  }
}

/* Иконка телефона */
.phone-icon {
  width: 40px;          /* РАЗМЕР ИКОНКИ: измените для изменения размера самой иконки */
  height: 40px;         /* РАЗМЕР ИКОНКИ: измените для изменения размера самой иконки */
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Заголовок */
.call-title {
  margin: 0 0 12px 0;
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
}

/* Описание */
.call-description {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
  font-weight: 400;
}

/* ===========================================
   ФОРМА
   =========================================== */

/* Форма */
.form-send {
  padding: 30px;
}

.form-box {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row span {
  color: #333;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #fff;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
  color: #9ca3af;
}

.form-row.last {
  margin-bottom: 10px;
}

/* ===========================================
   КНОПКИ
   =========================================== */

/* Кнопка отправки */
.btn {
  display: inline-block;
  padding: 20px 24px !important;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* Кнопка закрытия */
.call-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1; /* фикс выравнивания символа ✕ по вертикали */
  padding: 0;     /* убираем возможные отступы шрифта/браузера */
  cursor: pointer;
  color: #374151;
  border-radius: 50%;
  transition: all 0.3s ease;
  transform-origin: center; /* исключаем «съезд» при scale на hover */
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.call-close:hover {
  background: white;
  color: #1f2937;
  transform: scale(1.1);
}

/* ===========================================
   УВЕДОМЛЕНИЯ
   =========================================== */

.call-note {
  text-align: center;
  color: #2563eb;
  font-weight: 500;
  margin-top: 16px;
  padding: 14px;
  background: #eff6ff;
  border-radius: 8px;
  border: 1px solid #dbeafe;
  display: none;
  font-size: 15px;
  line-height: 1.5;
}

/* Блокировка скролла */
body.modal-open {
  overflow: hidden;
}

/* ===========================================
   АДАПТИВНОСТЬ - МОБИЛЬНЫЕ УСТРОЙСТВА
   =========================================== */

/* Планшеты и маленькие экраны */
@media (max-width: 768px) {
  .call-dialog {
    max-width: 90%;
  }
  
  .call-header {
    padding: 35px 25px 18px;
  }
  
  .call-title {
    font-size: 24px;
  }
  
  .call-description {
    font-size: 15px;
  }
}

/* Мобильные устройства */
@media (max-width: 480px) {
  .call-dialog {
    max-width: 95%;
    margin: 8vh auto; /* опускаем модал ниже на мобильных */
    border-radius: 12px;
  }
  
  .call-header {
    padding: 30px 20px 16px;
  }
  
  .phone-icon-wrapper {
    width: 70px;
    height: 70px;
    margin-bottom: 16px;
  }
  
  .phone-icon {
    width: 35px;
    height: 35px;
  }
  
  .call-title {
    font-size: 22px;
    margin-bottom: 12px;
  }
  
  .call-description {
    font-size: 14px;
  }
  
  .form-send {
    padding: 24px 20px;
  }
  
  .form-control {
    font-size: 16px;
    padding: 12px 14px;
  }
  
  .btn {
    padding: 14px 20px;
    font-size: 16px;
  }
  
  .call-close {
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  
  .call-note {
    font-size: 14px;
    padding: 12px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
  .call-header {
    padding: 25px 16px 14px;
  }
  
  .phone-icon-wrapper {
    width: 60px;
    height: 60px;
  }
  
  .phone-icon {
    width: 30px;
    height: 30px;
  }
  
  .call-title {
    font-size: 20px;
  }
  
  .call-description {
    font-size: 13px;
  }
  
  .form-send {
    padding: 20px 16px;
  }
  
  .form-control {
    padding: 10px 12px;
  }
  
  .btn {
    padding: 12px 16px;
  }
}
