/* =============================================================================
 * LAMPANG TACTICAL RADAR MAP — SCOPED STYLES (blended with DigitalHub theme)
 * ============================================================================= */
.lp-radar-root {
  --bg-panel: rgba(24, 38, 56, 0.82);
  --bg-card-inner: rgba(15, 25, 38, 0.72);
  --border-hud: rgba(94, 211, 243, 0.24);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-rgb: 56, 189, 248;

  --c-earth: #f59e0b;
  --c-water: #38bdf8;
  --c-wind: #2dd4bf;
  --c-fire: #f97316;
  --c-danger: #fb7185;

  font-family: 'Sarabun', sans-serif;
  color: var(--text-main);
  width: 100%;
  box-sizing: border-box;
}

.lp-radar-root *,
.lp-radar-root *::before,
.lp-radar-root *::after {
  box-sizing: border-box;
}

.lp-container {
  width: 100%;
  margin: 0 auto;
}

/* Header Bar */
.lp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.lp-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.lp-title {
  font-family: 'Prompt', sans-serif;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  line-height: 1.25;
}

/* Mode Tabs */
.lp-mode-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(15, 25, 38, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.lp-mode-btn {
  font-family: 'Prompt', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #cbd5e1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lp-mode-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.lp-mode-btn.active {
  color: #ffffff;
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.22);
}

/* Main Grid */
.lp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, 1fr);
  gap: 20px;
  align-items: start;
}

/* HUD Panel Frame */
.lp-hud-card {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border-hud);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
}

/* Corner Brackets */
.lp-hud-card::before,
.lp-hud-card::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.lp-hud-card::before {
  top: 8px;
  left: 8px;
  border-top: 2px solid rgba(var(--accent-rgb), 0.75);
  border-left: 2px solid rgba(var(--accent-rgb), 0.75);
  border-top-left-radius: 4px;
}
.lp-hud-card::after {
  bottom: 8px;
  right: 8px;
  border-bottom: 2px solid rgba(var(--accent-rgb), 0.75);
  border-right: 2px solid rgba(var(--accent-rgb), 0.75);
  border-bottom-right-radius: 4px;
}

/* Top Radar Toolbar */
.lp-radar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.lp-status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-badge-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
}

.lp-badge-mono.active-glow {
  color: #67e8f9;
  border-color: rgba(56, 189, 248, 0.4);
}

.lp-ctrl-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lp-ctrl-btn {
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 9px;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.lp-ctrl-btn:hover {
  border-color: var(--accent);
  color: #ffffff;
}

.lp-ctrl-btn.is-on {
  background: rgba(45, 212, 191, 0.18);
  border-color: rgba(45, 212, 191, 0.65);
  color: #5eead4;
}

/* Radar Viewport */
.lp-radar-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 440 / 540;
  max-height: 590px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(16, 44, 68, 0.92) 0%, rgba(10, 20, 34, 0.98) 72%),
    repeating-linear-gradient(0deg, rgba(56, 189, 248, 0.04) 0px, rgba(56, 189, 248, 0.04) 1px, transparent 1px, transparent 36px),
    repeating-linear-gradient(90deg, rgba(56, 189, 248, 0.04) 0px, rgba(56, 189, 248, 0.04) 1px, transparent 1px, transparent 36px);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.lp-hud-telemetry {
  position: absolute;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(148, 197, 235, 0.78);
  pointer-events: none;
  z-index: 4;
}

.lp-hud-telemetry .right {
  text-align: right;
}

.lp-radar-svg {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 2;
}

/* Radar Sweep Rotation */
.lp-sweep-group {
  transform-origin: 220px 300px;
  animation: lpSweepRotate 7s linear infinite;
}

.lp-sweep-group.paused {
  animation-play-state: paused;
}

@keyframes lpSweepRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Animated Wang River Dash */
.lp-river-line {
  stroke-dasharray: 8 7;
  animation: lpRiverFlow 2.2s linear infinite;
}

@keyframes lpRiverFlow {
  from { stroke-dashoffset: 30; }
  to   { stroke-dashoffset: 0; }
}

/* Overlay Pulse */
.lp-zone-pulse {
  animation: lpZonePulse 3.2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes lpZonePulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50%      { opacity: 0.95; transform: scale(1.05); }
}

/* District Nodes */
.lp-node {
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.lp-node.dimmed {
  opacity: 0.26;
}

.lp-node-pulse {
  animation: lpNodeRing 2.4s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes lpNodeRing {
  0%   { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.lp-node-label {
  font-family: 'Prompt', sans-serif;
  font-size: 11px;
  font-weight: 500;
  fill: #e2e8f0;
  paint-order: stroke;
  stroke: rgba(9, 17, 29, 0.92);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  pointer-events: none;
  transition: fill 0.2s ease, font-size 0.2s ease;
}

.lp-node:hover .lp-node-label,
.lp-node.selected .lp-node-label {
  fill: #ffffff;
  font-weight: 700;
  font-size: 12px;
}

/* Target Lock Reticle */
.lp-reticle {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.lp-reticle-spin {
  animation: lpReticleSpin 10s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes lpReticleSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* Bottom Layers Bar */
.lp-layers-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.lp-layer-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.lp-layer-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  margin-right: 2px;
}

.lp-layer-btn {
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.6);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lp-layer-btn.active[data-layer="river"] {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.65);
  background: rgba(56, 189, 248, 0.16);
}
.lp-layer-btn.active[data-layer="fault"] {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.65);
  background: rgba(245, 158, 11, 0.16);
}
.lp-layer-btn.active[data-layer="pm"] {
  color: #5eead4;
  border-color: rgba(45, 212, 191, 0.65);
  background: rgba(45, 212, 191, 0.16);
}
.lp-layer-btn.active[data-layer="fire"] {
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.65);
  background: rgba(249, 115, 22, 0.16);
}

.lp-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Right Column Stack */
.lp-right-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Target Info Card */
.lp-target-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.lp-target-coords {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #67e8f9;
  letter-spacing: 0.04em;
}

.lp-role-badge {
  font-family: 'Prompt', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #99f6e4;
  text-align: right;
  max-width: 210px;
  line-height: 1.35;
}

.lp-district-name {
  font-family: 'Prompt', sans-serif;
  font-size: 25px;
  font-weight: 700;
  margin: 4px 0 12px;
  color: #ffffff;
}

.lp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.lp-tag {
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
}

.lp-info-box {
  background: var(--bg-card-inner);
  border-radius: 12px;
  padding: 13px 15px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-left: 3px solid var(--c-earth);
}

.lp-info-box.action {
  border-left-color: var(--c-water);
}

.lp-info-box h4 {
  font-family: 'Prompt', sans-serif;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #fcd34d;
}

.lp-info-box.action h4 {
  color: #7dd3fc;
}

.lp-info-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
}

.lp-hotline-title {
  font-size: 12px;
  color: var(--text-muted);
  margin: 14px 0 8px;
}

.lp-hotlines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.lp-hotline-pill {
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.42);
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.lp-hotline-pill:hover {
  background: rgba(244, 63, 94, 0.28);
  color: #ffffff;
  transform: translateY(-1px);
}

.lp-cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font-family: 'Prompt', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, #0284c7 0%, #0d9488 100%);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.28);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.lp-cta-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* Quick Selector Card (13 Districts) */
.lp-quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.lp-quick-head h3 {
  font-family: 'Prompt', sans-serif;
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #f8fafc;
}

.lp-quick-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.lp-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lp-quick-btn {
  font-family: 'Prompt', sans-serif;
  font-size: 12.5px;
  color: #cbd5e1;
  background: rgba(15, 25, 38, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp-quick-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

.lp-quick-btn.active {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.22);
}

.lp-quick-btn.dimmed {
  opacity: 0.35;
}

.lp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 980px) {
  .lp-grid {
    grid-template-columns: 1fr;
  }
  .lp-radar-stage {
    max-height: 520px;
  }
}

@media (max-width: 560px) {
  .lp-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
