/* modal.css — фикс размера кнопок: одинаковые размеры, компактный текст */
:root {
  --app-height: 100vh;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; 
  overflow: hidden;
}

.modal-wrapper {
  width: 100%;
  max-height: var(--app-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.1), rgba(0, 100, 255, 0.15));
  border: 1px solid rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.2);
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  max-height: calc(var(--app-height, 100vh) - 40px);
  overflow-y: auto;
  color: #e0f7fa;
  font-family: 'Orbitron', sans-serif;
}

/* Стили заголовка и центрирование как в загруженном оригинале */
.modal-content h2 {
  text-align: center;
  font-size: 22px;
  color: #00f0ff;
  text-shadow: 0 0 10px #00f0ff;
  margin-bottom: 18px;
}

/* Центрируем подзаголовки (label для input) */
.modal-content label {
  text-align: center;
  display: block; /* гарантируем центрирование */
  font-size: 16px;
  margin-top: 14px;
}

/* Стили полей ввода */
.modal-content input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(0, 255, 255, 0.3);
  font-size: 16px;
  text-align: center; /* центрируем текст в input */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Стили placeholders (подсказок) */
.modal-content input::placeholder {
  color: rgba(255, 255, 255, 0.3); /* еле видимые подсказки */
  text-align: center; /* центрируем текст подсказок */
}


.modal-buttons {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.submit-btn, .cancel-btn {
  flex: 1;
  padding: 10px;
  font-size: 15px;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s;
}

.submit-btn {
  background: linear-gradient(135deg, #2979ff, #00b0ff);
  color: white;
}

.cancel-btn {
  background: linear-gradient(135deg, #ff1744, #d50000);
  color: white;
}

.submit-btn:hover, .cancel-btn:hover {
  transform: scale(1.05);
}

body.modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}



/* ЮРЕДИЧЕСКИЕ ДОКУМЕНТЫ ////
/* Юридическая модалка ConnectApp — с бумажным стилем фона и читаемым текстом */
.legal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

.legal-modal-content {
  background: #fdfcf9 url('./images/registration_a4.png') center/cover no-repeat;
  border-radius: 12px;
  padding: 16px;
  width: 96vw;
  max-width: 900px;
  max-height: calc(var(--app-height) * 0.96);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: 'Georgia', serif;
  color: #2a2a2a;
}

.legal-modal-content::after {
  content: 'ConnectApp';
  position: absolute;
  font-size: 72px;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.03);
  bottom: 250px;
  right: -14px;
  transform: rotate(-30deg);
  pointer-events: none;
}

.legal-scroll-text {
  background: transparent;
  border-radius: 10px;
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 16px;
  position: relative;
  color: #2a2a2a;
}

.legal-scroll-inner h3 {
  margin-top: 20px;
  font-size: 18px;
  color: #003c57;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 6px;
  margin-bottom: 10px;
}

.legal-scroll-inner p {
  margin-bottom: 16px;
  color: #2a2a2a;
  font-size: 15px;
}


.legal-checkbox {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  color: #2a2a2a;
  margin-top: 10px;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.modal-buttons button {
  padding: 12px;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.5px;
  min-width: 140px;
  flex: 1 1 45%;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.2);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.accept-btn {
  background: linear-gradient(135deg, #00e676, #00c853);
  color: black;
}

.decline-btn, .cancel-btn {
  background: linear-gradient(135deg, #ff1744, #d50000);
  color: white;
  font-size: 15px;
}

.accept-btn:hover,
.decline-btn:hover,
.cancel-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

/* раскрывающиеся документы */
.legal-accordion-header {
  cursor: pointer;
  font-size: 17px;
  font-weight: bold;
  color: #004b6b;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

.legal-accordion-header:hover {
  color: #0077a3;
  text-shadow: 0 0 4px rgba(0, 119, 163, 0.2);
}

.legal-accordion-body {
  padding: 12px 0;
  transition: all 0.3s ease;
}

/* ПЛАВНОЕ ОТКРЫТИЕ МОДАЛОК //// */
/* Плавное появление модалок */
.legal-modal-overlay,
.modal-overlay {
  animation: fadeInModal 0.3s ease;
}
.modal-alert-overlay {
  background: rgba(0, 0, 0, 0.85); /* чуть плотнее затемнение */
  z-index: 10001; /* поверх основной модалки */
}


@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/*  модалка алерта при регистрации  */
/* модалка уведомления */
/* 📄 Текст сообщения */
.modal-message {
  text-align: center;
  font-size: 16px;
  color: #00f0ff;
  text-shadow: 0 0 6px #00f0ff;
  font-family: 'Orbitron', sans-serif;
  margin-bottom: 20px;
  line-height: 1.6;
}


/* ✅ Кнопка "ОК" */
.accept-ok-btn {
  background: transparent;
  border: none;
  color: #00f0ff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  font-family: 'Orbitron', sans-serif;
  outline: none;
  animation: pulseGlow 2s infinite ease-in-out;
  text-shadow: 0 0 8px #00f0ff, 0 0 14px #00f0ff;
  padding: 12px 24px;
  transition: transform 0.3s ease;
}

.accept-ok-btn:hover {
  transform: scale(1.05);
  text-shadow: 0 0 14px #00f0ff, 0 0 24px #00f0ff;
}

.modal-content .accept-ok-btn {
  display: block;
  margin: 0 auto;
}



/* 🌫️ Анимация появления */
@keyframes fadeIn {
  from { opacity: 0 }
  to   { opacity: 1 }
}
