/* ================================================
   css/modal.css — Стили модального окна
   ================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 2000; /* выше элементов управления Leaflet (у карты они на z-index ~1000) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  font-family: inherit;
}
.modal__close:hover { color: var(--text); border-color: var(--error); }

.modal__logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal__logo-icon { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

.modal__tabs {
  display: flex;
  background: var(--card-bg);
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 24px;
}
.modal__tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  border: none;
  background: none;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
}
.modal__tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.modal__switch {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.modal__switch a { font-weight: 700; }

/* Закрытие по клику на фон */
/* Вход через Google + разделитель «или» */
.google-signin { display: flex; justify-content: center; min-height: 44px; margin-bottom: 4px; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; color: var(--muted); font-size: 13px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.modal-overlay { cursor: pointer; }
.modal { cursor: default; }
