/* ================================================================
   LiveEarthReports – Neon Seismic Command Center v2.0.0
   Scoped entirely under .ler-earthquake-dashboard
   Does NOT affect global Kadence theme or any other page element
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
.ler-earthquake-dashboard,
.ler-earthquake-dashboard * {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.ler-earthquake-dashboard {
  --c-bg:      #020817;
  --c-bg2:     #061527;
  --c-bg3:     #081b2f;
  --c-cyan:    #00d9ff;
  --c-cyan2:   #20e7ff;
  --c-green:   #00f080;
  --c-yellow:  #ffe100;
  --c-orange:  #ff7a18;
  --c-red:     #ff334b;
  --c-purple:  #b653ff;
  --c-text:    #f4fbff;
  --c-muted:   #8fa8bd;
  --c-border:  rgba(0,217,255,0.22);
  --c-panel:   rgba(6,21,39,0.85);
  --r:         14px;
  background: var(--c-bg);
  color: var(--c-text);
  padding: 0;
  margin: 0;
  width: 100%;
}
.ler-earthquake-dashboard a { text-decoration: none; color: inherit; }

/* ══════════════════════════════════════════════════════════════
   HERO SECTION
   ══════════════════════════════════════════════════════════════ */
.leq-hero {
  position: relative;
  width: 100%;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.leq-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  transform: scale(1.04);
  filter: brightness(0.6) saturate(0.9);
}
.leq-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(2,8,23,0.92) 0%,
    rgba(2,8,23,0.75) 45%,
    rgba(2,8,23,0.35) 100%
  );
}
/* Bottom fade into dashboard bg */
.leq-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #020817);
  pointer-events: none;
}
.leq-hero-content {
  position: relative;
  z-index: 2;
  padding: 52px 40px;
  max-width: 640px;
}
.leq-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,217,255,0.1);
  border: 1px solid rgba(0,217,255,0.3);
  color: #a8ffd8;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.leq-hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  margin: 0 0 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.leq-hero-sub {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(244,251,255,0.75);
  margin: 0 0 28px;
  max-width: 480px;
}
.leq-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.leq-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.leq-hero-btn:hover { transform: translateY(-2px); }
.leq-hero-btn--primary {
  background: linear-gradient(135deg, var(--c-cyan), #009bb8);
  color: #020817;
  box-shadow: 0 8px 28px rgba(0,217,255,0.3);
}
.leq-hero-btn--primary:hover { box-shadow: 0 12px 36px rgba(0,217,255,0.5); color:#020817; }
.leq-hero-btn--secondary {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.2);
  color: #fff;
}
.leq-hero-btn--secondary:hover { background: rgba(255,255,255,0.12); color:#fff; }

.leq-hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.leq-hero-stat { display: flex; flex-direction: column; gap: 3px; }
.leq-hero-stat-val {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
}
.leq-hero-stat-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted);
  font-weight: 600;
}

/* ── Error bar ────────────────────────────────────────────────── */
.leq-error {
  display: none;
  padding: 10px 16px;
  background: rgba(255,51,75,0.12);
  border: 1px solid rgba(255,51,75,0.3);
  border-radius: 8px;
  color: #ffb3bb;
  font-size: 13px;
  margin: 8px 0;
}

/* ══════════════════════════════════════════════════════════════
   LAYOUT: sidebar + main
   ══════════════════════════════════════════════════════════════ */
.leq-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: var(--c-bg);
  min-height: 600px;
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════════ */
.leq-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Generic panel card */
.leq-panel {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 24px rgba(0,217,255,0.06), inset 0 1px 0 rgba(0,217,255,0.08);
}

.leq-panel-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 10px;
}

/* Panel 1: Live Feed */
.leq-feed-status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.leq-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 12px var(--c-green);
  animation: leqBlink 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.leq-feed-active {
  font-size: 13px;
  font-weight: 800;
  color: var(--c-green);
  letter-spacing: 0.08em;
}
.leq-wave-mini {
  flex: 1;
  height: 22px;
  opacity: 0.85;
}
.leq-wave-mini path {
  animation: leqWaveDash 4s linear infinite;
  stroke-dasharray: 200;
}
@keyframes leqWaveDash {
  from { stroke-dashoffset: 200; }
  to   { stroke-dashoffset: 0; }
}

/* Panel 2: Count */
.leq-big-number {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--c-text);
  margin-bottom: 4px;
}
.leq-count-sub {
  font-size: 12px;
  color: var(--c-muted);
  margin-bottom: 12px;
}
.leq-count-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  line-height: 1.5;
  border-top: 1px solid rgba(0,217,255,0.1);
  padding-top: 10px;
}
.leq-meta-dim { color: var(--c-muted); }
.leq-meta-val { color: var(--c-text); font-weight: 600; }
.leq-live-link { color: var(--c-cyan); font-weight: 700; }
.leq-live-link:hover { color: var(--c-cyan2); }

/* Panel 3: Magnitude filter */
.leq-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
  margin-bottom: 3px;
}
.leq-filter-row:hover { background: rgba(0,217,255,0.06); }
.leq-filter-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.leq-filter-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}
/* hide native checkbox */
.leq-filter-row input[type="checkbox"] { display: none; }
/* custom checkbox */
.leq-filter-check {
  width: 18px;
  height: 18px;
  border: 2px solid var(--c-border);
  border-radius: 4px;
  background: rgba(0,217,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  position: relative;
}
.leq-filter-row input:checked + .leq-filter-check {
  background: var(--c-cyan);
  border-color: var(--c-cyan);
  box-shadow: 0 0 10px rgba(0,217,255,0.4);
}
.leq-filter-row input:checked + .leq-filter-check::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 9px;
  border: 2px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Panel 4: Strongest */
.leq-strongest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.leq-strongest-mag {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--c-red);
  text-shadow: 0 0 20px rgba(255,51,75,0.5);
  line-height: 1;
}
.leq-target-icon { width: 40px; height: 40px; }
.leq-target-icon circle:last-child { animation: leqTargetPulse 2s ease-out infinite; }
@keyframes leqTargetPulse {
  0%   { r: 2; opacity: 1; }
  100% { r: 5; opacity: 0.3; }
}
.leq-strongest-place {
  font-size: 13px;
  color: var(--c-text);
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
}
.leq-strongest-time { font-size: 11px; color: var(--c-muted); }

/* ══════════════════════════════════════════════════════════════
   MAIN AREA
   ══════════════════════════════════════════════════════════════ */
.leq-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* ── Map wrapper ──────────────────────────────────────────────── */
.leq-map-wrap {
  position: relative;
  border-radius: var(--r) var(--r) 0 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-bottom: none;
  box-shadow: 0 0 40px rgba(0,217,255,0.12), inset 0 0 0 1px rgba(0,217,255,0.05);
}
.leq-map {
  width: 100%;
  height: 420px;
  background: #020c1a;
  display: block;
}

/* Leaflet overrides — scoped */
.ler-earthquake-dashboard .leaflet-tile-pane {
  filter: brightness(1.08) contrast(1.06) saturate(0.85);
}
.ler-earthquake-dashboard .leaflet-control-zoom {
  border: 1px solid var(--c-border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 0 14px rgba(0,217,255,0.15) !important;
}
.ler-earthquake-dashboard .leaflet-control-zoom a {
  background: rgba(6,21,39,0.92) !important;
  color: var(--c-cyan) !important;
  border-bottom: 1px solid var(--c-border) !important;
  width: 30px !important;
  height: 30px !important;
  line-height: 30px !important;
  font-size: 16px !important;
  transition: background 0.2s !important;
}
.ler-earthquake-dashboard .leaflet-control-zoom a:hover {
  background: rgba(0,217,255,0.12) !important;
}
.ler-earthquake-dashboard .leaflet-control-attribution {
  display: none; /* attribution moved to legend bar */
}
.ler-earthquake-dashboard .leaflet-popup-content-wrapper,
.ler-earthquake-dashboard .leaflet-popup-tip {
  background: rgba(6,21,39,0.96) !important;
  color: var(--c-text) !important;
  border: 1px solid var(--c-border) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6) !important;
  border-radius: 10px !important;
}
.leq-popup strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 5px;
  color: #fff;
}
.leq-popup { font-size: 13px; line-height: 1.65; color: var(--c-muted); }
.leq-popup .leq-pm { font-weight: 700; }

/* Location denied message */
.leq-loc-denied {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6,21,39,0.92);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--c-muted);
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
}

/* ── Earthquake markers ───────────────────────────────────────── */
.leq-div-icon { background: none !important; border: none !important; }

.leq-mk {
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* center dot */
}
/* pulse ring for M5+ and M6+ */
.leq-mk::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: leqRipple 2.2s ease-out infinite;
}
.leq-mk::after {
  content: '';
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor, 0 0 20px currentColor;
}
/* Sizes per band */
.leq-mk.m2 { width:12px; height:12px; color:#00f080; }
.leq-mk.m2::after { width:10px; height:10px; box-shadow:0 0 6px #00f080; }
.leq-mk.m2::before { display:none; }

.leq-mk.m3 { width:15px; height:15px; color:#ffe100; }
.leq-mk.m3::after { width:12px; height:12px; box-shadow:0 0 8px #ffe100; }
.leq-mk.m3::before { display:none; }

.leq-mk.m4 { width:20px; height:20px; color:#ff7a18; }
.leq-mk.m4::after { width:16px; height:16px; box-shadow:0 0 10px #ff7a18, 0 0 20px rgba(255,122,24,0.4); }
.leq-mk.m4::before { display:none; }

.leq-mk.m5 { width:26px; height:26px; color:#ff334b; }
.leq-mk.m5::after { width:18px; height:18px; box-shadow:0 0 14px #ff334b, 0 0 28px rgba(255,51,75,0.5); }
.leq-mk.m5::before { width:34px; height:34px; top:-4px; left:-4px; }

.leq-mk.m6 { width:34px; height:34px; color:#b653ff; }
.leq-mk.m6::after { width:22px; height:22px; box-shadow:0 0 18px #b653ff, 0 0 36px rgba(182,83,255,0.6); }
.leq-mk.m6::before { width:50px; height:50px; top:-8px; left:-8px; animation-duration:1.6s; }

@keyframes leqRipple {
  0%   { transform:scale(0.5); opacity:0.8; }
  70%  { opacity:0.25; }
  100% { transform:scale(1.4); opacity:0; }
}

/* "You are here" location marker */
.leq-you-marker {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--c-cyan);
  border: 3px solid #fff;
  box-shadow: 0 0 20px var(--c-cyan), 0 0 40px rgba(0,217,255,0.4);
  animation: leqYouPulse 2s ease-in-out infinite;
}
@keyframes leqYouPulse {
  0%, 100% { box-shadow:0 0 14px var(--c-cyan), 0 0 28px rgba(0,217,255,0.4); }
  50%       { box-shadow:0 0 24px var(--c-cyan), 0 0 48px rgba(0,217,255,0.6); }
}

/* "My Location" control button */
.leq-loc-btn {
  background: rgba(6,21,39,0.92) !important;
  border: 1px solid var(--c-border) !important;
  border-radius: 8px !important;
  width: 34px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 0 14px rgba(0,217,255,0.15) !important;
  transition: background 0.2s, box-shadow 0.2s !important;
  color: var(--c-cyan) !important;
  font-size: 16px !important;
}
.leq-loc-btn:hover {
  background: rgba(0,217,255,0.1) !important;
  box-shadow: 0 0 20px rgba(0,217,255,0.3) !important;
}

/* ── Legend bar ───────────────────────────────────────────────── */
.leq-legend-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 16px;
  background: rgba(6,21,39,0.9);
  border: 1px solid var(--c-border);
  border-top: none;
}
.leq-legend-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-muted);
}
.leq-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text);
}
.leq-ldot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.leq-legend-attribution {
  margin-left: auto;
  font-size: 10px;
  color: rgba(143,168,189,0.5);
}

/* ── Mobile magnitude filter pills ───────────────────────────── */
.leq-mobile-filters {
  display: none; /* shown only on mobile via media query */
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0 4px;
}
.leq-mf-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--col, #fff);
  color: var(--col, #fff);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.2s, box-shadow 0.2s;
  user-select: none;
}
.leq-mf-pill.active {
  opacity: 1;
  box-shadow: 0 0 10px var(--col, transparent);
  background: rgba(255,255,255,0.04);
}

/* ── Recent earthquakes table ─────────────────────────────────── */
.leq-table-panel {
  background: var(--c-panel);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 0 24px rgba(0,217,255,0.06);
}
.leq-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(0,217,255,0.1);
}
.leq-table-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-cyan);
}
.leq-view-all {
  font-size: 12px;
  color: var(--c-cyan);
  font-weight: 600;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.leq-view-all:hover { opacity: 1; }

.leq-table-wrap { overflow-x: auto; }
.leq-table-wrap::-webkit-scrollbar { height: 4px; }
.leq-table-wrap::-webkit-scrollbar-thumb { background: rgba(0,217,255,0.2); border-radius: 3px; }

.leq-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}
.leq-table thead tr {
  border-bottom: 1px solid rgba(0,217,255,0.1);
}
.leq-table th {
  text-align: left;
  padding: 8px 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-muted);
}
.leq-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px;
  color: var(--c-muted);
  vertical-align: middle;
}
.leq-table tr:last-child td { border-bottom: none; }
.leq-table tbody tr { transition: background 0.15s; }
.leq-table tbody tr:hover { background: rgba(0,217,255,0.04); }

.leq-tmag {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.03em;
}
.leq-tplace  { font-weight: 600; color: var(--c-text); font-size: 13px; }
.leq-tsub    { font-size: 11px; color: #566a7f; margin-top: 2px; }
.leq-ttime   { white-space: nowrap; font-size: 12px; }
.leq-tdepth  { white-space: nowrap; }
.leq-row-icon { text-align: right; }
.leq-row-target {
  display: inline-block;
  width: 22px;
  height: 22px;
  opacity: 0.6;
}

.leq-loading { text-align: center; padding: 20px !important; color: #566a7f !important; font-style: italic; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════ */
@keyframes leqBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  .leq-layout { grid-template-columns: 200px 1fr; gap: 10px; padding: 10px; }
  .leq-big-number { font-size: 42px; }
  .leq-strongest-mag { font-size: 36px; }
  .leq-map { height: 380px; }
}

/* Mobile: stack everything */
@media (max-width: 768px) {
  .leq-layout { grid-template-columns: 1fr; padding: 8px; gap: 8px; }

  /* Sidebar goes BELOW the map on mobile */
  .leq-sidebar { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .leq-panel--filter { display: none; } /* replaced by pill filters on mobile */

  .leq-main { order: 1; }

  .leq-map { height: 340px; }

  .leq-mobile-filters { display: flex; }

  .leq-legend-bar {
    gap: 10px;
    padding: 8px 12px;
  }
  .leq-legend-attribution { display: none; }

  .leq-big-number { font-size: 38px; }
  .leq-strongest-mag { font-size: 32px; }
  .leq-count-meta { font-size: 10px; }

  .leq-table th, .leq-table td { padding: 9px 10px; font-size: 12px; }
  .leq-table { min-width: 380px; }
}

@media (max-width: 480px) {
  .leq-sidebar { grid-template-columns: 1fr; }
  .leq-panel--feed { order: 3; }
  .leq-panel--count { order: 1; }
  .leq-panel--strongest { order: 2; }
  .leq-map { height: 300px; }
  .leq-layout { padding: 6px; gap: 6px; }
  .leq-legend-item { font-size: 11px; }
  .leq-legend-bar { gap: 8px; padding: 8px 10px; }
}

/* Hero responsive */
@media (max-width: 768px) {
  .leq-hero { min-height: 340px; }
  .leq-hero-content { padding: 36px 20px; }
  .leq-hero-title { font-size: 30px; }
  .leq-hero-sub { font-size: 14px; }
  .leq-hero-stats { gap: 20px; }
  .leq-hero-stat-val { font-size: 22px; }
  .leq-hero-btn { padding: 10px 18px; font-size: 13px; }
}
@media (max-width: 480px) {
  .leq-hero { min-height: 300px; }
  .leq-hero-content { padding: 28px 14px; }
  .leq-hero-title { font-size: 24px; }
  .leq-hero-actions { gap: 8px; }
  .leq-hero-stats { gap: 14px; }
  .leq-hero-stat-val { font-size: 18px; }
}
