/* === 📄 /styles_core/front/base/modal.css — стили фронтовых модалок ===
   Универсальное оформление модальных окон для фронта Camp Altai.
   Единый стиль для всех модалок (текст, формы, виджеты, описания и т.д.).
   Подключается глобально в layout / footer сайта.
*/

/* === 🔲 Общая обёртка модалки === */
.modal {
  position: fixed;
  inset: 0; /* top, right, bottom, left = 0 */
  display: none; /* по умолчанию скрыта */
  justify-content: center;
  align-items: center;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.55); /* затемнение */
  backdrop-filter: blur(2px);
  padding: 24px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 🔹 Активное состояние */
.modal.open {
  display: flex;
  opacity: 1;
}

.modal.hidden {
  display: none;
}

/* === 🪟 Контент модалки === */
.modal__content {
  position: relative;
  background: var(--color-surface, #fff);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(-10px);
  animation: modalFadeIn 0.25s ease forwards;
}

/* === ❌ Кнопка закрытия === */
.modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 26px;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted, #666);
  transition: color 0.2s ease;
}
.modal__close:hover {
  color: var(--color-primary, #2d5a42);
}

/* === 📦 Контентная область === */
.modal__body {
  padding: 32px;
  color: var(--color-fg, #1f1e1d);
  line-height: 1.6;
  font-size: 1rem;
}
.modal__body p + p {
  margin-top: 1em;
}

/* === 💫 Анимация появления === */
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}








/* === 🧭 Адаптивность === */
@media (max-width: 640px) {
  .modal__content {
    max-width: 95%;
    padding: 16px;
  }
  .modal__body {
    padding: 24px 16px;
  }
}

