/* Pulse: Vanguard's skin and dock, with a HUD that answers. The action bar sits docked under the
   character, the ground and a level gained are announced over the play area, and health running
   out shows on the bars and on the edges of the world. Keyed on data-hud, set by core/theme.js. */

/* ── Action bar, docked ── */
[data-hud="pulse"] .hotbar.docked { left: 0; right: 0; top: auto; bottom: 10px; width: max-content; margin-inline: auto; }
[data-hud="pulse"] .hotbar.docked .hot-turn { display: none; }
[data-hud="pulse"] .hot-slot.vacant { background: #ffffff05; border-style: dashed; }

/* ── Health: a blow flashes the bars, little of it left throbs ── */
[data-hud="pulse"] .vitals.hit { animation: pulse-hit .32s var(--ease); }
[data-hud="pulse"] .bar.low > i { animation: pulse-low .55s ease-in-out infinite alternate; }
@keyframes pulse-low { to { filter: brightness(1.8); } }
@keyframes pulse-hit {
  0% { box-shadow: 0 0 0 5px #e0524a40, 0 0 22px #e0524acc; transform: translateX(-3px); }
  35% { transform: translateX(3px); }
  100% { box-shadow: 0 0 0 0 transparent; transform: none; }
}
/* The edges of the world say so wherever the eyes are. */
[data-hud="pulse"] #hud.low-hp .play::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 160px #c8141459, inset 0 0 40px #c814142e; animation: pulse-edge 1s ease-in-out infinite alternate;
}
@keyframes pulse-edge { to { opacity: .45; } }

/* ── Announcements ── */
[data-hud="pulse"] .alerts { position: absolute; left: 0; right: 0; top: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
[data-hud="pulse"] .alert {
  min-width: 420px; padding: 7px 56px; text-align: center; font: 24px/1.2 var(--font-title); letter-spacing: .05em;
  background: linear-gradient(90deg, transparent, #0b0c10e0 22%, #0b0c10e0 78%, transparent);
  border-image: linear-gradient(90deg, transparent, currentColor 30%, currentColor 70%, transparent) 1; border-style: solid; border-width: 1px 0;
  text-shadow: 0 1px 2px #000; animation: pulse-alert .28s var(--ease); transition: opacity .4s;
}
[data-hud="pulse"] .alert.leaving { opacity: 0; }
[data-hud="pulse"] .alert.zone-safe { color: var(--good); }
[data-hud="pulse"] .alert.zone-unsafe, [data-hud="pulse"] .alert.zone-arena { color: var(--danger); }
[data-hud="pulse"] .alert.zone-nocombat { color: var(--warn); }
[data-hud="pulse"] .alert.zone-sailing { color: var(--bar-thirst); }
[data-hud="pulse"] .alert.level { color: var(--accent); font-size: 28px; }
@keyframes pulse-alert { from { opacity: 0; transform: translateY(-8px) scale(1.06); } }

/* ── Chat ── */
[data-hud="pulse"] .play > .chat-hint {
  position: absolute; left: 8px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; pointer-events: auto;
  background: #0b0c1099; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-muted); font-size: 14px;
  transition: background .12s, color .12s, border-color .12s;
}
[data-hud="pulse"] .play > .chat-hint:hover { background: var(--surface-hud); border-color: var(--line-strong); color: var(--text); }
[data-hud="pulse"] .chat-hint kbd { padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 4px; background: #ffffff0f; font: var(--size-micro) var(--font-ui); letter-spacing: .06em; color: var(--text); }
/* The send bar opens over the docked action bar instead of on it. */
[data-hud="pulse"] .play:has(> .hotbar.docked:not([hidden])) .chat-bar { bottom: 78px; }
