/* LOOT Drone Hero — component styles (scoped under .ldr-) */

.ldr-root {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  background: #ffffff;
  color: #111111;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.ldr-root canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ldr-mono {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

/* ---------- HUD ---------- */
.ldr-hud {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  width: 380px;
  max-width: calc(100% - 32px);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(4px);
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(17,17,17,0.08);
  padding: 10px 14px 12px;
  z-index: 4;
  transition: opacity .3s ease, transform .3s ease;
}
.ldr-hud.ldr-swap { opacity: 0; transform: translateX(-50%) translateY(6px); }

.ldr-hud-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.14em;
  font-weight: 600;
  padding-bottom: 8px;
}
.ldr-hud-head .ldr-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4a45e4;
  animation: ldr-blink 1.6s infinite;
}
@keyframes ldr-blink { 0%,100% {opacity:1} 50% {opacity:.25} }
.ldr-hud-head .ldr-hud-time {
  margin-left: auto;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: #4a45e4;
}

.ldr-hud-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-bottom: 10px;
}
.ldr-stat .ldr-s-label {
  font-size: 7.5px;
  letter-spacing: 0.12em;
  color: #4a45e4;
  padding-bottom: 3px;
  white-space: nowrap;
}
.ldr-stat .ldr-s-value {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ldr-stat .ldr-s-unit {
  font-size: 9px;
  font-weight: 400;
  margin-left: 1px;
}
.ldr-stat:nth-child(2) .ldr-s-value { color: #4a45e4; }

.ldr-hud-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  border-top: 1px solid #e6e6e6;
  padding-top: 6px;
}
.ldr-hud-bars i {
  flex: 1;
  background: #4a45e4;
  opacity: .75;
  border-radius: 1px;
  min-height: 2px;
  transition: height .45s ease;
}
.ldr-hud-bars i:nth-child(3n) { opacity: .3; }

/* ---------- annotation ---------- */
.ldr-anno {
  position: absolute;
  width: 218px;
  z-index: 4;
  font-size: 10px;
  line-height: 1.5;
  background: rgba(255,255,255,0.9);
  border-radius: 6px;
  padding: 8px 10px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.ldr-anno.ldr-show { opacity: 1; transform: translateY(0); }
.ldr-anno .ldr-a-title {
  color: #4a45e4;
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 9.5px;
  padding-bottom: 4px;
}
.ldr-anno::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 4px;
  width: 18px;
  height: 1px;
  background: #4a45e4;
}
.ldr-anno::after {
  content: "";
  position: absolute;
  left: -30px;
  top: 2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4a45e4;
}
/* per-mode anchor points */
.ldr-anno.ldr-pos-0 { left: 65%; top: 66%; }
.ldr-anno.ldr-pos-1 { left: 67%; top: 58%; }
.ldr-anno.ldr-pos-2 { left: 66%; top: 48%; }

/* ---------- mode dashes ---------- */
.ldr-dashes {
  position: absolute;
  left: 50%;
  bottom: 9.5%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 4;
}
.ldr-dashes button {
  width: 26px;
  height: 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 5px 0;
}
.ldr-dashes button i {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: #dcdcdc;
  transition: background .3s;
}
.ldr-dashes button.on i { background: #111111; }

/* ---------- narrow container (set by the component, < 700px wide) ---------- */
.ldr-root.ldr-narrow .ldr-hud { width: 330px; bottom: 20%; }
.ldr-root.ldr-narrow .ldr-stat .ldr-s-value { font-size: 14px; }
.ldr-root.ldr-narrow .ldr-anno { display: none; }
.ldr-root.ldr-narrow .ldr-dashes { bottom: 13%; }

/* ---------- stacked layout (mount opt layout:'stack') ----------
   For short embeds (e.g. the homepage feed detail): the canvas is its own
   aspect box and the HUD + dashes flow BELOW it instead of overlaying the
   drone. Keep these rules after the narrow block so they win when both apply. */
.ldr-root.ldr-stack { height: auto; min-height: 0; }
.ldr-root.ldr-stack canvas {
  position: static;
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 650;
}
.ldr-root.ldr-stack .ldr-hud {
  position: static;
  transform: none;
  width: auto;
  max-width: 380px;
  margin: 2px auto 0;
}
.ldr-root.ldr-stack .ldr-hud.ldr-swap { transform: translateY(6px); }
.ldr-root.ldr-stack .ldr-anno { display: none; }
.ldr-root.ldr-stack .ldr-dashes {
  position: static;
  transform: none;
  width: max-content;
  margin: 10px auto 4px;
}
