:root {
  --popup-bg: rgba(255, 255, 255, 0.85);
  --border: rgba(0, 0, 0, 0.08);
  --text: #1f2937;
  --muted: #6b7280;
  --brand1: #7c3aed; /* фиолетовый акцент */
  --brand2: #06b6d4; /* бирюзовый акцент */
  --ok: #10b981;
  --err: #ef4444;
}

/* Затемнение + мягкий градиент */
.enroll-popup {
  display: none;
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(124,58,237,0.25), transparent 70%),
    radial-gradient(900px 500px at 80% 90%, rgba(6,182,212,0.25), transparent 70%),
    rgba(0,0,0,0.55);
  justify-content: center; align-items: center;
  z-index: 1000;
}

/* Карточка (glassmorphism) */
.enroll-popup-content {
  background: var(--popup-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 28px 24px;
  border-radius: 16px;
  width: min(92vw, 520px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.4);
  border: 1px solid var(--border);
  position: relative;
  animation: cardIn 240ms ease-out;
  color: var(--text);
}

@keyframes cardIn {
  from { transform: translateY(8px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* Заголовки */
.enroll-popup-content h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.enroll-popup-content .subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Форма */
#user-registration {
  display: grid;
  gap: 14px;
}

/* Поля */
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: #374151; }
.field input[type="text"],
.field input[type="email"] {
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: box-shadow .2s, border-color .2s, transform .08s;
}
.field input:focus {
  border-color: rgba(124,58,237,.45);
  box-shadow: 0 0 0 4px rgba(124,58,237,.12);
}
.field input.invalid {
  border-color: var(--err);
  box-shadow: 0 0 0 4px rgba(239,68,68,.12);
}
.hint {
  min-height: 16px;
  font-size: 12px;
  color: var(--muted);
}
.hint.error { color: var(--err); }

/* Блок способов связи */
.contact-section { margin-top: 4px; }
.contact-title {
  font-size: 13px;
  color: #374151;
  margin-bottom: 8px;
}
.contact-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.contact-option { position: relative; }
.contact-option input { display: none; }

.option-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease;
  user-select: none;
}
.option-card img { width: 36px; height: 36px; }
.option-card span { font-size: 13px; color: #111827; }

.contact-option input:checked + .option-card {
  border-color: rgba(124,58,237,.45);
  box-shadow:
    0 10px 22px rgba(124,58,237,.12),
    0 4px 10px rgba(0,0,0,.04);
  transform: translateY(-2px);
}

/* Кнопка CTA */
.cta {
  margin-top: 4px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  border: none; outline: none;
  border-radius: 12px;
  cursor: pointer;
  background-image: linear-gradient( to right, var(--brand1), var(--brand2) );
  box-shadow: 0 10px 24px rgba(124,58,237,.25);
  transition: transform .08s ease, box-shadow .2s ease, opacity .2s ease, filter .2s ease;
}
.cta:hover { box-shadow: 0 12px 28px rgba(124,58,237,.30); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }
.cta[disabled] { opacity: .7; cursor: not-allowed; filter: grayscale(.15); }

.policy {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* Крестик */
.enroll-popup-content .close {
  position: absolute; top: 10px; right: 12px;
  font-size: 22px;
  color: #6b7280;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  border-radius: 8px;
  transition: background .2s, color .2s;
}
.enroll-popup-content .close:hover {
  color: #111827;
  background: rgba(0,0,0,.06);
}

/* Служебные утилиты */
.hidden { display: none; }

@media (max-width: 420px) {
  .option-card { padding: 12px 10px; }
  .option-card img { width: 32px; height: 32px; }
}
