/* amorvia-hud.v9.7.css – v9.7.3-anim
 * Compact chips HUD + smooth ease-in-out + pulse on change
 */

.amor-hud-root {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: flex-end;
  padding-top: 0.25rem;
  padding-bottom: 0.1rem;
  font-size: 0.75rem;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .amor-hud-root {
    justify-content: center;
  }
}

.amor-hud-chip {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  background: rgba(10, 10, 20, 0.90);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
  white-space: nowrap;
  transition:
    transform 220ms ease-in-out,
    box-shadow 220ms ease-in-out,
    background-color 220ms ease-in-out,
    border-color 220ms ease-in-out,
    opacity 200ms ease-in-out;
}

.amor-hud-chip-label {
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

.amor-hud-chip-value {
  font-variation-settings: "wght" 550;
}

.amor-hud-bar-shell {
  position: relative;
  flex: 0 0 72px;
  height: 0.32rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.amor-hud-bar-fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(0);
  transition:
    transform 260ms ease-in-out,
    background-color 200ms ease-in-out;
}

/* Adaptive boje za trust/tension/childStress */
.amor-hud-chip--trust .amor-hud-bar-fill {
  background: rgba(46, 204, 113, 0.9);
}
.amor-hud-chip--tension .amor-hud-bar-fill {
  background: rgba(231, 76, 60, 0.9);
}
.amor-hud-chip--childStress .amor-hud-bar-fill {
  background: rgba(241, 196, 15, 0.9);
}

.amor-hud-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

/* Pulse animacija kad se vrijednost promijeni */
.amor-hud-chip--pulse {
  animation: amor-hud-chip-pulse 420ms ease-out;
}

@keyframes amor-hud-chip-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.0);
  }
  40% {
    transform: scale(1.07);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.20);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.0);
  }
}

/* Toolbar status badge (Scenario loader state) */
#titleAndList .amor-status-badge {
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  line-height: 1.2;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.4);
  white-space: nowrap;
}

#titleAndList .amor-status-badge[data-tone="loading"] {
  background: rgba(15, 23, 42, 0.9);
}

#titleAndList .amor-status-badge[data-tone="ok"] {
  background: rgba(22, 163, 74, 0.9);
}

#titleAndList .amor-status-badge[data-tone="error"] {
  background: rgba(220, 38, 38, 0.95);
}
/* HUD 9.8.1 – improve text visibility on bright backgrounds (correct file) */
.amor-hud-root,
.amor-hud-root *,
.amor-hud-chip,
.amor-hud-chip-label,
.amor-hud-chip-value {
  color: #f5f5f5 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
/* Amorvia HUD v9.8.3 – micro-polish for readability & spacing */

/* Malo više “air-a” oko HUD-a i ugodniji font-size */
.amor-hud-root {
  font-size: 12px;
  padding: 6px 10px;
  gap: 0.5rem;
}

/* Čipovi imaju sitno više paddinga i nježniji, čitljiviji oblik */
.amor-hud-chip {
  padding: 4px 10px;
  border-radius: 999px;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

/* Label – malo jači font i spacing da se lakše skenira */
.amor-hud-chip-label {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* Value – mrvicu veći i jasniji postotak */
.amor-hud-chip-value {
  font-weight: 500;
  font-size: 11px;
}

/* Mali razmak iznad HUD-a da ne “lijepi” za donji rub scene */
.amor-hud-root-wrap,
#hud {
  margin-top: 6px;
}

/* Bolje slaganje na uskim ekranima (mobitel/tablet) */
@media (max-width: 768px) {
  .amor-hud-root {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.35rem;
  }

  .amor-hud-chip {
    min-width: 120px;
    justify-content: center;
  }
}
