/* copernicus.css */

/* ── Copernicus button in popup ─────────────────────────────────────────── */
.btn-copernicus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 100%);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.18s, transform 0.12s;
  white-space: nowrap;
}
.btn-copernicus:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-copernicus:active { transform: translateY(0); opacity: 1; }
.btn-copernicus .cop-icon { font-size: 13px; }

/* ── Script-point pulse (CSS animation on the circleMarker element) ──────── */
.copernicus-dot {
  animation: cop-pulse 1.4s ease-in-out infinite;
}
@keyframes cop-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ── Wave ripple rings ───────────────────────────────────────────────────── */
/*
   Each ring starts at scale(1) = the circle's own circumference (rings are
   sized to match the circle and offset by -radius so the origin aligns).
   They expand outward and fade. Three rings staggered by 0.55 s cascade
   like water waves outward from the selected script point.
*/
@keyframes cop-wave-out {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(3.5); opacity: 0;   }
}

/* ── Error toast ────────────────────────────────────────────────────────── */
.cop-toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 30, 0.92);
  color: #f0f0f0;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
  border-left: 3px solid #e74c3c;
}
.cop-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Copernicus mini popup ──────────────────────────────────────────────── */
.cop-popup { min-width: 180px; padding: 2px 0; }
.cop-popup-title { font-weight: 700; font-size: 13px; color: #4fc3f7; margin-bottom: 3px; }
.cop-popup-sub { font-size: 13px; color: rgba(255,255,255,0.85); margin-bottom: 2px; }
.cop-popup-note { font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 4px; }

/* Dark-themed Leaflet popup chrome for Copernicus reference-point popups */
.leaflet-popup.cop-popup-wrap .leaflet-popup-content-wrapper {
  background: #0d1829;
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.leaflet-popup.cop-popup-wrap .leaflet-popup-tip {
  background: #0d1829;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: none;
}
.leaflet-popup.cop-popup-wrap .leaflet-popup-close-button {
  color: rgba(255,255,255,0.45);
}
.leaflet-popup.cop-popup-wrap .leaflet-popup-close-button:hover {
  color: rgba(255,255,255,0.9);
}

/* ── Sidebar Copernicus toggle ──────────────────────────────────────────── */
.copernicus-toggle-wrap {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 7px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 2px;
}
.copernicus-toggle-wrap .cop-toggle-label {
  font-size: 12px; color: #cdd; white-space: nowrap; user-select: none;
}
.cop-toggle-indicator {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #555;
  margin-left: auto;
  transition: background 0.2s;
}
.cop-toggle-indicator.active {
  background: #00c8ff;
  box-shadow: 0 0 6px #00c8ff88;
}

/* ── Reference-point popup: representativeness line + caution ──────────── */
.cop-popup-rep {
  font-weight: 700;
  font-size: 12px;
  margin: 3px 0;
}
.cop-popup-caution {
  font-size: 11px;
  color: #e67e22;
  margin-top: 5px;
  font-weight: 600;
}
