/* ─────────────────────────────────────────────────────────────────────────────
   Ship Info Panel  —  shown when a ship is selected
   ───────────────────────────────────────────────────────────────────────────── */

#ship-panel {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 300px;
  z-index: 12;
  pointer-events: auto;
  font-family: 'Courier New', Courier, monospace;

  background: rgba(6, 16, 32, 0.78);
  backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  -webkit-backdrop-filter: blur(18px) saturate(1.8) brightness(0.9);
  border: 1px solid rgba(0, 190, 255, 0.22);
  box-shadow:
    0 8px 40px rgba(0,0,0,0.55),
    0 0 24px rgba(0,180,255,0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
  border-radius: 3px;

  display: none;
  flex-direction: column;
}

#ship-panel.visible {
  display: flex;
}

/* header */
.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(0,190,255,0.12);
}
.sp-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 220, 255, 0.92);
  text-shadow: 0 0 10px rgba(0,210,255,0.55);
}
.sp-team {
  font-size: 11px;
  letter-spacing: 0.10em;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid rgba(0,190,255,0.28);
  color: rgba(0,200,255,0.80);
}
.sp-team.enemy  { border-color: rgba(255,60,60,0.40); color: rgba(255,100,80,0.90); }
.sp-team.neutral{ border-color: rgba(200,200,60,0.40); color: rgba(220,210,80,0.90); }

/* bars */
.sp-bars {
  padding: 10px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sp-bar-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sp-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(180,200,220,0.50);
}
.sp-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.sp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.25s ease;
}
.sp-bar-fill.hp      { background: rgba(0,255,120,0.85); }
.sp-bar-fill.hp.warn { background: rgba(255,210,40,0.90); }
.sp-bar-fill.hp.crit { background: rgba(255,60,60,0.95); }
.sp-bar-fill.shield  { background: rgba(60,180,255,0.85); }
.sp-bar-fill.cargo   { background: rgba(255,180,40,0.80); }

/* stats grid */
.sp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 6px 14px 12px;
  border-top: 1px solid rgba(0,190,255,0.08);
}
.sp-stat {
  display: flex;
  flex-direction: column;
  padding: 5px 0;
  border-bottom: 1px solid rgba(0,190,255,0.06);
}
.sp-stat:nth-last-child(-n+2) { border-bottom: none; }
.sp-key {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.38);
}
.sp-val {
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(0,220,255,0.90);
  text-shadow: 0 0 6px rgba(0,210,255,0.40);
}
.sp-val.dmg   { color: rgba(255,100,80,0.92); text-shadow: 0 0 6px rgba(255,60,40,0.35); }
.sp-val.heal  { color: rgba(60,255,120,0.95); text-shadow: 0 0 6px rgba(40,220,80,0.45); }
.sp-val.cargo { color: rgba(255,190,60,0.90); text-shadow: 0 0 6px rgba(255,160,20,0.30); }

/* weapons breakdown (multi-gun ships) */
.sp-weapons {
  padding: 6px 14px 8px;
  border-top: 1px solid rgba(0,190,255,0.08);
}
.sp-weapons-header {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,180,255,0.38);
  margin-bottom: 4px;
}
.sp-gun-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 0;
  border-bottom: 1px solid rgba(0,190,255,0.05);
}
.sp-gun-row:last-child { border-bottom: none; }
.sp-gun-label {
  font-size: 11px;
  color: rgba(0,220,255,0.85);
}
.sp-gun-stat {
  font-size: 10px;
  color: rgba(255,100,80,0.80);
  text-shadow: 0 0 4px rgba(255,60,40,0.25);
}

/* move order hint */
.sp-hint {
  padding: 7px 14px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(180,200,220,0.30);
  border-top: 1px solid rgba(0,190,255,0.06);
  text-align: center;
}

/* ── AI toggle button row ─────────────────────────────────────────────────── */
.sp-orders {
  padding: 8px 14px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(0,190,255,0.10);
  pointer-events: auto;
}

.sp-ai-btn {
  flex: 1;
  padding: 6px 0;
  border-radius: 3px;
  border: 1px solid rgba(0,200,255,0.30);
  background: rgba(0,180,255,0.08);
  color: rgba(0,220,255,0.70);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sp-ai-btn:hover {
  background: rgba(0,200,255,0.16);
  color: rgba(0,240,255,0.95);
  border-color: rgba(0,220,255,0.55);
}
.sp-ai-btn.ai-on {
  background: rgba(0,220,100,0.14);
  border-color: rgba(0,255,120,0.45);
  color: rgba(0,255,130,0.92);
  text-shadow: 0 0 8px rgba(0,255,100,0.50);
}
.sp-ai-btn.ai-off {
  background: rgba(255,60,60,0.10);
  border-color: rgba(255,80,60,0.38);
  color: rgba(255,100,80,0.80);
}
.sp-ai-btn.ai-mix {
  background: rgba(255,200,40,0.10);
  border-color: rgba(255,200,40,0.35);
  color: rgba(255,210,80,0.80);
}
