/* Минималистичные стили для модальных окон */

/* Оверлей модалки */
.mfp-bg {
  background: rgba(0, 0, 0, 0.5);
}

/* Контейнер модалки */
.white-popup {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  max-width: 420px;
  width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Убираем горизонтальный скролл */
.white-popup * {
  box-sizing: border-box;
  max-width: 100%;
}

.mfp-content {
  overflow-x: hidden;
}

/* Заголовок модалки */
.call-title {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 28px;
  font-family: 'Unbounded', sans-serif;
}

/* Поля ввода */
.popup-form input[type="text"] {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a1a;
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  font-family: inherit;
}

.popup-form input[type="text"]:focus {
  outline: none;
  border-color: #c9a428;
  background: #ffffff;
}

.popup-form input[type="text"].error {
  border-color: #e53935;
  background: #fff5f5;
}

.popup-form input[type="text"].success {
  border-color: #43a047;
  background: #f5fff5;
}

/* Placeholder стилизация */
.popup-form input[type="text"]::placeholder {
  color: #999;
}

/* Чекбокс согласия */
.p-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  margin-top: 4px;
}

.p-confirm input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #c9a428;
  cursor: pointer;
  flex-shrink: 0;
}

.p-confirm label {
  font-size: 13px;
  color: #666;
  line-height: 1.4;
  cursor: pointer;
}

.p-confirm label a {
  color: #c9a428;
  text-decoration: underline;
}

.p-confirm label a:hover {
  text-decoration: none;
}

/* Кнопка отправки */
.page-button.red-button {
  width: 100%;
}

.page-button.red-button a {
  display: block;
  width: 100%;
  padding: 14px 24px;
  /* background: #c9a428; */
  color: #ffffff;
  text-align: center;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
  border: none;
  font-family: inherit;
}

.page-button.red-button a:hover {
  /* background: #b89020; */
  opacity: 0.6;
}

/* .page-button.red-button a:active {
  background: #a88010;
} */

.page-button.red-button a.disabled {
  background: #ccc;
  cursor: not-allowed;
  pointer-events: none;
}

/* Статус отправки */
.js-telegram-status,
.js-form-status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.js-telegram-status.info,
.js-form-status.info {
  background: #f5f5f5;
  color: #666;
}

.js-telegram-status.success,
.js-form-status.success {
  background: #f0f7f0;
  color: #2e7d32;
}

.js-telegram-status.error,
.js-form-status.error {
  background: #fef0f0;
  color: #c62828;
}

/* Текст ошибки под полем */
.field-error {
  display: block;
  font-size: 12px;
  color: #e53935;
  margin-top: -8px;
  margin-bottom: 8px;
  padding-left: 4px;
}

/* Кнопка закрытия */
.mfp-close {
  width: 36px;
  height: 36px;
  line-height: 36px;
  font-size: 28px;
  color: #999;
  opacity: 1;
  right: 8px;
  top: 8px;
}

.mfp-close:hover {
  color: #333;
}

/* Анимация появления */
.mfp-fade.mfp-bg {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mfp-fade.mfp-bg.mfp-ready {
  opacity: 1;
}

.mfp-fade.mfp-wrap .mfp-content {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mfp-fade.mfp-wrap.mfp-ready .mfp-content {
  opacity: 1;
  transform: scale(1);
}

/* Мобильная адаптация */
@media (max-width: 480px) {
  .white-popup {
    /* padding: 28px 20px; */
    width: 95%;
    border-radius: 10px;
  }
  
  .call-title {
    font-size: 20px;
    margin-bottom: 24px;
  }
  
  .popup-form input[type="text"] {
    padding: 12px 14px;
    font-size: 16px; /* Предотвращает зум на iOS */
  }
  
  .page-button.red-button a {
    padding: 12px 20px;
  }
}