/* Modal Styles */
.mcf-hidden {
  display: none;
}

#mcf-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

#mcf-modal {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: mcfFadeIn 0.3s ease-out;
}

@keyframes mcfFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

#mcf-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

#mcf-modal-close:hover {
  color: #333;
}

#mcf-modal-content {
  padding: 30px;
}

/* Form Styles */
#mcf-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mcf-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcf-form-group label {
  font-weight: 500;
  color: #333;
  font-size: 16px;
}

.mcf-form-group input,
.mcf-form-group textarea {
  padding: 12px 15px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 16px !important;
  transition: border-color 0.2s !important;
  background-color: #fff !important;
}

.mcf-form-group input:focus,
.mcf-form-group textarea:focus {
  outline: none !important;
  border-color: #4285f4 !important;
}

#mcf-submit {
  background-color: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  text-transform: uppercase;
}

#mcf-submit:hover {
  background-color: #3367d6;
}

#mcf-form-response {
  text-align: center;
  font-weight: 500;
}

.mcf-success {
  color: #4CAF50;
}

.mcf-error {
  color: #f44336;
}

/* Button Styles */
#mcf-open-modal {
  background-color: #F44336;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s;
}

#mcf-open-modal:hover {
  background-color: #3367d6;
}

/* Обновленные стили для модального окна на мобильных устройствах */

/* Базовые стили модального окна */
#mcf-modal {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: mcfFadeIn 0.3s ease-out;
  margin: 0 auto;
}

#mcf-modal-content {
  padding: 30px;
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 767px) {
  #mcf-modal {
    width: 95%;
    max-width: 350px;
    max-height: 90vh;
    overflow-y: auto;
  }

  #mcf-contact-form{
    gap: 0;
  }

  .mcf-form-group{
    gap: 0;
  }

  #mcf-modal-content {
    padding: 20px 15px;
  }

  .mcf-form-group {
    margin-bottom: 12px;
  }

  .mcf-form-group label {
    font-size: 14px !important;
    margin-bottom: 0;
  }

  .mcf-form-group input,
  .mcf-form-group textarea {
    padding: 10px !important;
    font-size: 14px !important;
  }

  #mcf-submit {
    padding: 12px;
    font-size: 14px;
  }

  #mcf-modal-close {
    top: 8px;
    right: 10px;
    font-size: 22px;
  }

  /* Уменьшаем высоту текстового поля сообщения */
  #mcf-message {
    height: 60px;
  }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
  #mcf-modal {
    width: 95%;
    max-width: 300px;
  }

  #mcf-modal-content {
    padding: 15px 12px;
  }

  .mcf-form-group label {
    font-size: 13px !important;
  }

  .mcf-form-group input,
  .mcf-form-group textarea {
    padding: 8px;
    font-size: 13px;
  }

  #mcf-submit {
    padding: 10px;
    font-size: 13px;
  }
}

/* Убедимся, что модальное окно правильно центрировано */
#mcf-modal-overlay {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Стили для заголовка модального окна */
.mcf-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.4;
}

/* Стиль для номера телефона */
.mcf-phone-number {
  color: #e53935; /* Красный цвет */
  font-weight: 700;
  white-space: nowrap; /* Предотвращает перенос номера на новую строку */
}

/* Адаптивные стили для заголовка на мобильных устройствах */
@media (max-width: 767px) {
  .mcf-modal-title {
    font-size: 18px;
    margin-bottom: 15px;
  }
}

@media (max-width: 360px) {
  .mcf-modal-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
}
