/* Advisory acoustic telemetry HUD pill styles for SkySentry Tower (sidebar + per-camera tiles).
   Animations and transitions touch only compositor properties (opacity, transform) and respect reduced motion. */

.acoustic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font: 600 0.72rem/1.25 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
  color: var(--mute, #a1a1aa);
  background: rgba(24, 24, 27, 0.55);
  border: 1px solid rgba(161, 161, 170, 0.26);
}

.acoustic-pill[hidden] {
  display: none !important;
}

.acoustic-pill--sidebar {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acoustic-pill--camera {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tile > .acoustic-pill--camera {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  pointer-events: none;
}

.acoustic-pill::before,
.acoustic-pill-dot {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: #71717a;
}

.acoustic-pill[data-acoustic-state="inactive"] {
  color: var(--mute, #a1a1aa);
  background: rgba(24, 24, 27, 0.55);
  border: 1px solid rgba(161, 161, 170, 0.26);
}

.acoustic-pill[data-acoustic-state="inactive"]::before,
.acoustic-pill[data-acoustic-state="inactive"] .acoustic-pill-dot {
  background: #71717a;
}

html[data-theme="light"] .acoustic-pill--sidebar[data-acoustic-state="inactive"] {
  color: var(--mute, #52525b);
  background: rgba(244, 244, 245, 0.92);
  border-color: rgba(161, 161, 170, 0.42);
}

.acoustic-pill[data-acoustic-state="monitoring"] {
  color: #bae6fd;
  background: rgba(12, 34, 52, 0.74);
  border: 1px solid rgba(56, 189, 248, 0.44);
}

.acoustic-pill[data-acoustic-state="monitoring"]::before,
.acoustic-pill[data-acoustic-state="monitoring"] .acoustic-pill-dot {
  background: #38bdf8;
}

html[data-theme="light"] .acoustic-pill[data-acoustic-state="monitoring"] {
  color: #0c4a6e;
  background: rgba(224, 242, 254, 0.92);
  border-color: rgba(2, 132, 199, 0.46);
}

html[data-theme="light"] .acoustic-pill[data-acoustic-state="monitoring"]::before,
html[data-theme="light"] .acoustic-pill[data-acoustic-state="monitoring"] .acoustic-pill-dot {
  background: #0284c7;
}

.acoustic-pill[data-acoustic-state="advisory"] {
  color: #fef3c7;
  background: rgba(69, 26, 3, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.68);
}

.acoustic-pill[data-acoustic-state="advisory"]::before,
.acoustic-pill[data-acoustic-state="advisory"] .acoustic-pill-dot {
  background: #f59e0b;
}

html[data-theme="light"] .acoustic-pill[data-acoustic-state="advisory"] {
  color: #78350f;
  background: rgba(254, 243, 199, 0.92);
  border-color: rgba(217, 119, 6, 0.55);
}

html[data-theme="light"] .acoustic-pill[data-acoustic-state="advisory"]::before,
html[data-theme="light"] .acoustic-pill[data-acoustic-state="advisory"] .acoustic-pill-dot {
  background: #f59e0b;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes acoustic-advisory-pulse {
    0%,
    100% {
      transform: scale(1);
      opacity: 1;
    }
    50% {
      transform: scale(1.28);
      opacity: 0.55;
    }
  }

  .acoustic-pill {
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .acoustic-pill[data-acoustic-state="advisory"]::before {
    animation: acoustic-advisory-pulse 1.6s ease-in-out infinite;
    will-change: transform, opacity;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acoustic-pill,
  .acoustic-pill::before,
  .acoustic-pill-dot,
  .acoustic-pill-dot::after {
    animation: none !important;
    transition: none !important;
  }
}
