/* ══════════════════════════════════════════════════════════════
   PROMETHEUS // HUD DE SUPERFÍCIE + VIAS CRÍTICAS
   Painel holográfico sobre o mapa. Escreve conforme o dedo passa.
   Aba lateral com as vias mais extremas, por gravidade e distância.
   ══════════════════════════════════════════════════════════════ */

.map-wrap { position: relative; }

/* ── HUD no topo do mapa ─────────────────────────────────────── */
.hud-via {
  position: absolute; top: 12px; left: 12px; z-index: 620;
  width: min(340px, calc(100% - 24px));
  padding: 10px 12px 11px;
  background: linear-gradient(160deg, rgba(2, 10, 20, .90), rgba(1, 5, 11, .86));
  border: 1px solid rgba(0, 212, 255, .30);
  border-left: 2px solid rgba(0, 212, 255, .75);
  -webkit-backdrop-filter: blur(7px);
          backdrop-filter: blur(7px);
  box-shadow: 0 0 26px rgba(0, 140, 220, .18), inset 0 0 22px rgba(0, 130, 210, .07);
  font-family: 'Share Tech Mono', monospace;
  pointer-events: auto;
}
/* cantos de holograma */
.hud-via::before, .hud-via::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border: 1px solid rgba(0, 212, 255, .6);
}
.hud-via::before { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.hud-via::after  { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }

.hud-topo {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  font-size: 9px; letter-spacing: .2em; color: #4b7d92;
  padding-bottom: 7px; margin-bottom: 8px;
  border-bottom: 1px solid rgba(0, 212, 255, .14);
}
.hud-topo b { color: #7cecff; letter-spacing: .22em; }
#hudCoord { color: #3d6a7d; font-size: 9px; }

.hud-nome {
  font-size: 13px; line-height: 1.3; color: #dff6ff;
  min-height: 17px;
  /* nome de rua longo não pode empurrar o painel */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .2s;
}
.hud-meta {
  display: flex; flex-wrap: wrap; gap: 5px 9px;
  margin-top: 6px; min-height: 13px;
  font-size: 9.5px; letter-spacing: .06em; color: #5f8ba1;
}
.hud-tag { border: 1px solid; padding: 1px 5px; letter-spacing: .1em; }
.hud-ok { color: #39e6a3; }
.hud-vazio { color: #ffc857; }

/* barra de intensidade */
.hud-barra {
  height: 3px; margin-top: 9px;
  background: rgba(0, 212, 255, .10);
  overflow: hidden;
}
.hud-barra > i {
  display: block; height: 100%; width: 0;
  background: #39e6a3;
  transition: width .28s cubic-bezier(.22, 1, .36, 1), background .28s;
  box-shadow: 0 0 8px currentColor;
}

.hud-btn {
  width: 100%; margin-top: 10px; padding: 8px;
  font-size: 10px; letter-spacing: .14em;
  border: 1px solid rgba(255, 83, 110, .38);
  background: rgba(255, 83, 110, .07);
  color: #ff8ba0; cursor: pointer;
  transition: .2s;
}
.hud-btn:hover { border-color: #ff536e; background: rgba(255, 83, 110, .16); }

/* ── ABA LATERAL DAS VIAS CRÍTICAS ───────────────────────────── */
.criticas {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 640;
  width: min(340px, 86%);
  transform: translateX(102%);
  transition: transform .34s cubic-bezier(.22, 1, .36, 1);
  background: linear-gradient(200deg, rgba(3, 8, 16, .96), rgba(1, 4, 9, .97));
  border-left: 1px solid rgba(255, 83, 110, .32);
  -webkit-backdrop-filter: blur(9px);
          backdrop-filter: blur(9px);
  display: flex; flex-direction: column;
  font-family: 'Share Tech Mono', monospace;
}
.criticas.aberto { transform: translateX(0); }

.cr-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 14px 10px;
  border-bottom: 1px solid rgba(255, 83, 110, .22);
}
.cr-head b { font-size: 11px; letter-spacing: .2em; color: #ff8ba0; }
.cr-head button {
  background: none; border: 0; color: #7fb3c8;
  font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px;
}
.cr-head button:hover { color: #ff536e; }
.cr-sub {
  padding: 8px 14px; font-size: 9.5px; letter-spacing: .1em; color: #5f8ba1;
  border-bottom: 1px solid rgba(0, 212, 255, .10);
}

.cr-lista { flex: 1; overflow-y: auto; padding: 8px; }
.cr-item {
  display: grid; gap: 3px; width: 100%; text-align: left;
  padding: 9px 10px 10px; margin-bottom: 7px;
  background: rgba(3, 7, 14, .7);
  border: 0; border-left: 2px solid var(--cor, #ffc857);
  cursor: pointer; transition: .18s;
  font-family: inherit;
}
.cr-item:hover { background: rgba(0, 212, 255, .07); transform: translateX(-2px); }
.cr-nivel {
  font-size: 8.5px; letter-spacing: .18em; color: var(--cor, #ffc857);
}
.cr-item b {
  font-size: 11.5px; color: #dff6ff; font-weight: 400; line-height: 1.3;
}
.cr-meta { font-size: 9px; letter-spacing: .05em; color: #547f93; line-height: 1.4; }
.cr-vazio {
  padding: 22px 16px; text-align: center;
  font-size: 11px; color: #5f8ba1; line-height: 1.7;
}
.cr-vazio small { color: #3d6a7d; font-size: 9.5px; }

/* ── celular: HUD embaixo (o dedo fica em cima) ──────────────── */
@media (max-width: 820px) {
  .hud-via {
    top: auto; bottom: 12px; left: 8px; right: 8px;
    width: auto; padding: 9px 10px 10px;
  }
  .hud-nome { font-size: 12px; }
  .hud-meta { font-size: 9px; }
  .criticas { width: 100%; }
  .map-status { display: none; }   /* o HUD já diz o que importa */
}

@media (prefers-reduced-motion: reduce) {
  .criticas { transition: none; }
  .hud-barra > i { transition: none; }
  .cr-item:hover { transform: none; }
}
