/* corp-status.css — Phase 59 Corp sentiment HUD badge.
 *
 * Tiny floating chip in the bottom-right HUD region. Threshold band
 * picks the accent color: green=trusted, slate=neutral, amber=suspicious,
 * red=hostile, deep-red/black=open_war.
 *
 * Lives directly under <body>; positioned absolutely so it floats over
 * the map viewport at the same level as the keybindings sticky.
 */

.apex-corp-status {
  /* 2026-05-29 v3: align to the minimap's LEFT edge by using the EXACT same
     right-anchor as the minimap + matching its 200px width. This way the
     badge's right edge coincides with the minimap's right edge, and since
     width is identical, the left edges also coincide — no viewport-width
     guessing. Bottom uses the same base as the coordinate box (--apex-footer-h
     + --apex-action-bar-h + 10px) then lifted by the minimap's 140px height
     plus a 14px gap so the badge clears the minimap. */
  position: fixed;
  right: calc(50% + 340px + 8px);
  width: 200px;
  bottom: calc(var(--apex-footer-h, 24px) + var(--apex-action-bar-h, 40px) + 10px + 140px + 14px);
  z-index: 46; /* one layer above the minimap (z=45) */
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  box-sizing: border-box;
  font: 600 11px/1.0 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  user-select: none;
  cursor: default;
  background: #5a6a7b;
}

.apex-corp-status__label {
  opacity: 0.78;
  font-weight: 500;
}

.apex-corp-status__value {
  font-weight: 700;
}

.apex-corp-status__number {
  margin-left: 4px;
  opacity: 0;
  font-weight: 600;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  transition: opacity 120ms ease-out;
}

.apex-corp-status:hover .apex-corp-status__number {
  opacity: 0.85;
}

/* Threshold-band tints. Background + subtle outer ring. */
.apex-corp-status--trusted {
  background: #2e7d4f;
  box-shadow: 0 0 0 1px rgba(46, 125, 79, 0.6),
              0 2px 6px rgba(0, 0, 0, 0.35);
}

.apex-corp-status--neutral {
  background: #5a6a7b;
}

.apex-corp-status--suspicious {
  background: #b88324;
  box-shadow: 0 0 0 1px rgba(184, 131, 36, 0.7),
              0 2px 6px rgba(0, 0, 0, 0.35);
}

.apex-corp-status--hostile {
  background: #b8413d;
  box-shadow: 0 0 0 1px rgba(184, 65, 61, 0.7),
              0 2px 6px rgba(0, 0, 0, 0.35);
}

.apex-corp-status--open_war {
  background: #6c1e1e;
  color: #ffcdcd;
  box-shadow: 0 0 0 1px rgba(108, 30, 30, 0.85),
              0 0 12px rgba(184, 65, 61, 0.5),
              0 2px 6px rgba(0, 0, 0, 0.35);
  animation: apex-corp-open-war-pulse 2.4s ease-in-out infinite;
}

@keyframes apex-corp-open-war-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.78; }
}
