/* ═══════════════════════════════════════════════════════════════════
   login-map/map.css  —  Light, modern map login page (GoSign.AI style)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Map container (full-viewport background) ────────────────────── */
#lm-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #edf1fb;
}

.lm-svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ── GPU-composited transform layers ─────────────────────────────── */
.lm-layer {
  will-change: transform;
}

/* ── During drag/zoom: strip expensive SVG filters for 60fps ─────── */
.lm-dragging .lm-dot,
.lm-dragging .lm-ring,
.lm-dragging .lm-bdot,
.lm-dragging .lm-bhalo,
.lm-dragging .lm-borders {
  filter: none !important;
}

/* Dim the rings entirely during drag (they blur perception anyway) */
.lm-dragging .lm-ring  { display: none; }
.lm-dragging .lm-bhalo { display: none; }

/* ── Participant beacons ─────────────────────────────────────────── */

/* Outer halo rings pulse slowly */
.lm-beacon-group .lm-bhalo {
  animation: lm-halo-pulse 3s ease-in-out infinite;
}

@keyframes lm-halo-pulse {
  0%,100% { stroke-opacity: 0.55; r: var(--br, 9px); }
  50%      { stroke-opacity: 0.15; r: calc(var(--br, 9px) * 1.5); }
}

/* Core beacon dots have a gentle warmth throb */
.lm-beacon-group .lm-bdot {
  animation: lm-beacon-throb 2.8s ease-in-out infinite;
}

@keyframes lm-beacon-throb {
  0%,100% { opacity: 0.88; }
  50%      { opacity: 0.60; }
}

/* Count label floating above beacon */
.lm-bcount {
  pointer-events: none;
  user-select: none;
  opacity: 0.85;
}

/* ── Scan-line overlay on SVG rect ──────────────────────────────── */
.lm-scanlines {
  fill: url(#lm-scan-pattern);
  opacity: 0.15;
}

/* ── Pulsing ring on selected city ──────────────────────────────── */
.lm-selected .lm-ring {
  animation: lm-pulse 2s ease-in-out infinite;
}

@keyframes lm-pulse {
  0%   { opacity: 0.9; r: 6px; }
  50%  { opacity: 0.3; r: 12px; }
  100% { opacity: 0.9; r: 6px; }
}

/* Note: SVG <circle r> can't be animated by CSS 'r' in all browsers.
   We use stroke-opacity animation as the visible pulse instead. */
.lm-selected .lm-ring {
  animation: lm-ring-pulse 2s ease-in-out infinite;
}

@keyframes lm-ring-pulse {
  0%,100% { stroke-opacity: 0.9; stroke-width: 1.2px; }
  50%     { stroke-opacity: 0.2; stroke-width: 2px; }
}

/* ── Tooltip ─────────────────────────────────────────────────────── */
#lm-tooltip {
  position: fixed;
  z-index: 9000;
  pointer-events: none;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  max-width: 220px;
}

.lm-tip-name {
  color: #0f172a;
  font-weight: 700;
  font-size: 13px;
}

.lm-tip-en {
  color: #64748b;
  font-weight: 400;
  font-size: 11px;
}

.lm-tip-country {
  color: #94a3b8;
  font-size: 11px;
}

.lm-tip-count {
  color: #f97316;
  font-size: 11px;
  font-weight: 600;
  margin-top: 2px;
}

/* ── Participant counter banner (top of map, below search) ───────── */
#lm-counter-banner {
  position: fixed;
  top: 72px;
  left: 32px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: rgba(148,163,184,0.7);
  pointer-events: none;
  user-select: none;
  animation: lm-fade-in 1.2s ease 0.8s both;
}

@keyframes lm-fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lm-counter-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 5px rgba(249,115,22,0.5);
  flex-shrink: 0;
  animation: lm-beacon-throb 2.8s ease-in-out infinite;
}

.lm-counter-live {
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.lm-counter-label {
  color: #64748b;
}

.lm-counter-sep {
  color: #cbd5e1;
}

/* ── HUD panel (bottom-centre, shows selected city) ──────────────── */
#lm-hud {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 100px;
  padding: 10px 28px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#lm-hud.lm-hud--active {
  opacity: 1;
}

#lm-hud::before {
  content: '◈';
  color: #f97316;
  font-size: 13px;
  flex-shrink: 0;
}

.lm-hud-city {
  color: #0f172a;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.lm-hud-sep {
  color: #e2e8f0;
}

.lm-hud-country {
  color: #64748b;
  font-size: 12px;
}

.lm-hud-coord {
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.04em;
}

/* ── Search box ──────────────────────────────────────────────────── */
#lm-search-wrap {
  position: fixed;
  top: 24px;
  left: 32px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.90);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 100px;
  padding: 9px 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: border-color 0.2s, box-shadow 0.2s;
}

#lm-search-wrap:focus-within {
  border-color: rgba(59,91,219,0.4);
  box-shadow: 0 0 0 3px rgba(59,91,219,0.10), 0 2px 12px rgba(0,0,0,0.08);
}

#lm-search-wrap .lm-search-icon {
  color: #94a3b8;
  font-size: 15px;
  user-select: none;
  pointer-events: none;
}

#lm-search {
  background: transparent;
  border: none;
  outline: none;
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  width: 200px;
  caret-color: #3b5bdb;
}

#lm-search::placeholder {
  color: #94a3b8;
}

/* ── Corner decoration — hidden on light theme ───────────────────── */
#lm-corner-tl, #lm-corner-br { display: none; }

/* ── Toast notification ──────────────────────────────────────────── */
#lm-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 16px;
  padding: 20px 32px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  box-shadow: 0 8px 48px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
  min-width: 300px;
  max-width: min(460px, 90vw);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#lm-toast.lm-toast--show {
  opacity: 1;
  animation: lm-toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* Muted style for "switch city" toast */
#lm-toast.lm-toast--switch {
  background: rgba(248,250,252,0.97);
  border-color: rgba(0,0,0,0.05);
}
#lm-toast.lm-toast--switch .lm-toast-msg {
  color: #64748b;
}

#lm-toast.lm-toast--hide {
  animation: lm-toast-out 0.4s ease forwards;
}

@keyframes lm-toast-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 20px)) scale(0.93); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes lm-toast-out {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  to   { opacity: 0; transform: translate(-50%, calc(-50% - 16px)) scale(0.96); }
}

.lm-toast-msg {
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 6px;
}

.lm-toast-msg strong {
  color: #f97316;
  font-size: 18px;
}

.lm-toast-sub {
  color: #64748b;
  font-size: 12.5px;
}

.lm-toast-sub strong {
  color: #3b5bdb;
  font-weight: 700;
}

/* ── Counter flash when count increments ─────────────────────────── */
.lm-counter--flash .lm-counter-live {
  animation: lm-count-flash 0.5s ease;
}

@keyframes lm-count-flash {
  0%   { color: #f97316; transform: scale(1.2); }
  60%  { color: #ea580c; transform: scale(1.05); }
  100% { color: #0f172a; transform: scale(1); }
}

/* ── Attribution / version stamp ─────────────────────────────────── */
#lm-stamp {
  position: fixed;
  bottom: 8px;
  right: 14px;
  z-index: 100;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.06em;
  pointer-events: none;
  user-select: none;
}

/* ════════════════════════════════════════════════════════════════════
   LOGIN CARD  —  GoSign.AI inspired: white card, bold dark text, clean
   ════════════════════════════════════════════════════════════════════ */

#lm-login-panel {
  position: fixed;
  top: 50%;
  right: clamp(20px, 4vw, 72px);
  transform: translateY(-50%);
  z-index: 500;
  width: min(400px, 92vw);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 24px;
  padding: 38px 34px 30px;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.04),
    0 12px 48px rgba(0,0,0,0.10);
  color: #0f172a;
}

#lm-login-panel::before { display: none; }

/* ── Card header ──────────────────────────────────────────────────── */
.lm-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.lm-card-brand::before {
  content: '🤟';
  font-size: 20px;
  line-height: 1;
}

.lm-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1;
  /* No gradient — GoSign.AI uses solid black */
  background: none;
  -webkit-text-fill-color: #0f172a;
}

.lm-card-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}

/* ── Guiding slogan ───────────────────────────────────────────────── */
.lm-slogan {
  margin-bottom: 22px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8faff;
  border: 1px solid rgba(59,91,219,0.12);
  position: relative;
}

.lm-slogan::before { display: none; }

.lm-slogan-main {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 5px;
  letter-spacing: -0.01em;
}

.lm-slogan-sub {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.6;
}

/* ── Form inputs ──────────────────────────────────────────────────── */
.lm-field {
  margin-bottom: 14px;
}

.lm-field label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}

.lm-field input {
  width: 100%;
  box-sizing: border-box;
  background: #f8faff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  padding: 11px 14px;
  color: #0f172a;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: #3b5bdb;
}

.lm-field input::placeholder { color: #94a3b8; }

.lm-field input:focus {
  border-color: rgba(59,91,219,0.45);
  box-shadow: 0 0 0 3px rgba(59,91,219,0.10);
  background: #fff;
}

/* ── City hint ────────────────────────────────────────────────────── */
#lm-city-hint {
  margin: 8px 0 16px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: #94a3b8;
  text-align: center;
  transition: color 0.3s, font-weight 0.2s;
}

#lm-city-hint.has-city {
  color: #f97316;
  font-weight: 600;
}

/* ── Submit button  — GoSign.AI dark pill CTA ────────────────────── */
.lm-btn-submit {
  width: 100%;
  margin-top: 2px;
  padding: 14px;
  background: #0f172a;
  border: none;
  border-radius: 100px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(15,23,42,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lm-btn-submit::after {
  content: '→';
  font-size: 16px;
  transition: transform 0.2s;
}

.lm-btn-submit:hover  {
  transform: translateY(-2px);
  background: #1e293b;
  box-shadow: 0 8px 28px rgba(15,23,42,0.30);
}
.lm-btn-submit:hover::after { transform: translateX(3px); }
.lm-btn-submit:active { transform: translateY(0); box-shadow: none; }

/* ── Card footer ──────────────────────────────────────────────────── */
.lm-card-footer {
  margin-top: 18px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.lm-card-footer a {
  color: #3b5bdb;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.lm-card-footer a:hover { color: #1e3a8a; }

/* ── Error message ────────────────────────────────────────────────── */
.lm-error {
  background: #fef2f2;
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: 10px;
  color: #b91c1c;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ── Top-right actions (intro + language) ─────────────────────────── */
#lm-top-actions {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lm-top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 100px;
  color: #0f172a;
  padding: 8px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

.lm-top-btn:hover {
  background: rgba(255,255,255,1);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

#switchLanguage {
  /* inherits .lm-top-btn; kept for language.js hook */
}

/* ── Mission hero headline — GoSign.AI style: massive black type ─── */
#lm-hero {
  position: fixed;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  max-width: min(480px, 40vw);
  pointer-events: none;
  user-select: none;
}

.lm-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,23,42,0.07);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #1e293b;
  text-transform: uppercase;
  margin-bottom: 22px;
  opacity: 0;
  animation: lm-hero-in 0.8s ease forwards 0.3s;
}

.lm-hero-tag::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f97316;
  box-shadow: 0 0 6px rgba(249,115,22,0.5);
  flex-shrink: 0;
  animation: lm-beacon-throb 2s ease-in-out infinite;
}

.lm-hero-headline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(36px, 4.2vw, 64px);
  font-weight: 900;
  line-height: 1.10;
  letter-spacing: -0.04em;
  margin: 0 0 22px;
  color: #0f172a;
  background: none;
  -webkit-text-fill-color: #0f172a;
  filter: none;
  opacity: 0;
  animation: lm-hero-in 0.9s ease forwards 0.55s;
}

.lm-hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.75;
  color: #475569;
  opacity: 0;
  animation: lm-hero-in 0.9s ease forwards 0.85s;
}

.lm-hero-sub strong {
  color: #0f172a;
  font-weight: 700;
}

@keyframes lm-hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  #lm-hero { display: none; }
}

@media (max-width: 600px) {
  #lm-top-actions {
    top: 16px;
    right: 16px;
    gap: 6px;
  }

  .lm-top-btn {
    padding: 7px 14px;
    font-size: 11px;
  }

  #lm-login-panel {
    right: 50%;
    transform: translate(50%, -50%);
    width: calc(100vw - 28px);
    padding: 28px 22px;
  }
  #lm-search-wrap { display: none; }
  #lm-hud { font-size: 11px; padding: 8px 14px; }
}
