/**
 * Flight toast stack look (Dock / Jump / mine / combat / spectate).
 * Shared tokens, jump/dock hide groups, and #canvas-hint look stay on site.css.
 */

.flight-toast-stack {
  position: fixed;
  left: 50%;
  bottom: 1.35rem;
  transform: translateX(-50%);
  /* Above look-pad / tray so Dock/Jump stay clickable when bands overlap. */
  z-index: 17;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  width: min(22rem, 88vw);
  pointer-events: none;
}

body:is(.is-docked, .is-flight-pending) .flight-toast-stack {
  display: none !important;
}

body.is-jump-transit .flight-toast-stack {
  opacity: 0.22;
  pointer-events: none;
}

.context-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
  z-index: 8;
  pointer-events: none;
}

.context-actions[hidden] {
  display: none !important;
}

.context-actions:not([hidden]) {
  pointer-events: auto;
  position: relative;
}

.context-actions--floating {
  position: static;
  left: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  z-index: auto;
}

.context-actions--embedded {
  position: static;
  transform: none;
  width: auto;
  margin: 0 0 0.15rem;
}

.context-action {
  margin: 0;
  border-radius: 8px;
  padding: 0.48rem 0.7rem;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.context-action[hidden] {
  display: none !important;
}

.context-action--dock {
  border: 1px solid rgba(90, 210, 160, 0.55);
  background: linear-gradient(180deg, rgba(18, 48, 40, 0.94), rgba(8, 24, 20, 0.96));
  color: #d8ffe8;
}

.context-action--industry {
  border: 1px solid rgba(120, 190, 230, 0.62);
  background: linear-gradient(180deg, rgba(18, 38, 58, 0.94), rgba(8, 18, 32, 0.96));
  color: #e0f2ff;
}

.context-action--jump {
  border: 1px solid rgba(230, 150, 80, 0.6);
  background: linear-gradient(180deg, rgba(48, 28, 12, 0.94), rgba(24, 12, 6, 0.96));
  color: #ffe8d0;
}

.context-action--dock:hover,
.context-action--dock:focus-visible {
  border-color: rgba(120, 230, 180, 0.85);
  outline: none;
}

.context-action--dock.is-cancel,
.context-action--industry.is-cancel {
  border-color: rgba(230, 150, 90, 0.7);
  background: linear-gradient(180deg, rgba(52, 28, 14, 0.94), rgba(26, 12, 6, 0.96));
  color: #ffe6d0;
}

.context-action--dock.is-cancel:hover,
.context-action--dock.is-cancel:focus-visible,
.context-action--industry.is-cancel:hover,
.context-action--industry.is-cancel:focus-visible {
  border-color: rgba(255, 180, 110, 0.9);
  outline: none;
}

.context-action--industry:hover,
.context-action--industry:focus-visible {
  border-color: rgba(155, 215, 255, 0.9);
  background: linear-gradient(180deg, rgba(24, 52, 76, 0.96), rgba(10, 24, 42, 0.98));
  outline: none;
}

.context-action--jump:hover,
.context-action--jump:focus-visible {
  border-color: rgba(255, 180, 100, 0.85);
  outline: none;
}

.context-action--container {
  border: 1px solid rgba(110, 170, 210, 0.65);
  background: linear-gradient(180deg, rgba(20, 36, 52, 0.94), rgba(10, 18, 28, 0.96));
  color: #d8eefc;
}

.context-action--container:hover,
.context-action--container:focus-visible {
  border-color: rgba(140, 200, 240, 0.9);
  background: linear-gradient(180deg, rgba(28, 48, 68, 0.96), rgba(14, 24, 36, 0.98));
  outline: none;
}

.context-action--mine {
  border: 1px solid rgba(200, 140, 80, 0.65);
  background: linear-gradient(180deg, rgba(48, 30, 14, 0.94), rgba(24, 14, 6, 0.96));
  color: #ffe0c0;
}

.context-action--mine:hover,
.context-action--mine:focus-visible {
  border-color: rgba(240, 170, 100, 0.9);
  background: linear-gradient(180deg, rgba(62, 40, 16, 0.96), rgba(30, 18, 8, 0.98));
  outline: none;
}

.look-focus-banner,
.npc-spectate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  /* Fill the already-centered #flight-toast-stack. A wider explicit width
     (e.g. 92vw inside an 88vw stack) overflowed right and looked left-shifted. */
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.35rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(220, 180, 70, 0.55);
  background: rgba(18, 16, 8, 0.82);
  color: #f3e2a6;
  font: 500 12px/1.35 ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  pointer-events: auto;
}

.npc-spectate-banner {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.npc-spectate-banner__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.npc-spectate-banner__toggle {
  appearance: none;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.npc-spectate-banner__chev {
  display: none;
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #c9a84a;
  border-bottom: 2px solid #c9a84a;
  transform: rotate(45deg);
  margin: 0 0.15rem 0.1rem 0;
  transition: transform 0.15s ease;
}

.npc-spectate-banner.is-collapsed .npc-spectate-banner__chev {
  transform: rotate(-45deg);
  margin-bottom: 0;
}

.npc-spectate-banner__detail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.look-focus-banner {
  border-color: rgba(120, 180, 220, 0.55);
  background: rgba(10, 16, 22, 0.84);
  color: #d8e8f4;
}

.look-focus-banner[hidden],
.npc-spectate-banner[hidden] {
  display: none !important;
}

.look-focus-banner__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  min-width: 0;
}

.look-focus-banner__label,
.npc-spectate-banner__label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c9a84a;
  font-size: 10px;
}

.look-focus-banner__label {
  color: #7eb4e0;
}

.look-focus-banner__name,
.npc-spectate-banner__name {
  color: #ffe9a8;
  font-weight: 700;
}

.look-focus-banner__name {
  color: #cfe8ff;
}

.look-focus-banner__meta,
.npc-spectate-banner__meta {
  color: rgba(230, 210, 160, 0.85);
  font-size: 11px;
  min-width: 0;
  flex: 1 1 8rem;
}

.npc-spectate-banner__trail {
  list-style: none;
  margin: 0.2rem 0 0;
  padding: 0.25rem 0.4rem;
  flex: 1 1 100%;
  width: 100%;
  max-height: 7.2rem;
  overflow: auto;
  border: 1px solid rgba(120, 140, 90, 0.35);
  border-radius: 6px;
  background: rgba(8, 14, 10, 0.55);
  font: 500 0.68rem/1.35 ui-monospace, "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace;
  color: #c8d6b0;
}

.npc-spectate-banner__trail[hidden] {
  display: none !important;
}

.npc-spectate-banner__trail li {
  margin: 0;
  padding: 0.05rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.npc-spectate-banner__trail li.is-alert {
  color: #ffd0a0;
}

.look-focus-banner__meta {
  color: rgba(180, 210, 230, 0.85);
}

.look-focus-banner__actions,
.npc-spectate-banner__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.35rem;
}

.look-focus-banner__exit,
.look-focus-banner__spectate,
.npc-spectate-banner__exit,
.npc-spectate-banner__ship,
.npc-spectate-banner__next {
  flex: 0 0 auto;
  padding: 0.2rem 0.55rem;
  font-size: 11px;
}

.look-focus-banner__spectate {
  border-color: rgba(220, 180, 70, 0.55);
  color: #ffe9a8;
}

.look-focus-banner__spectate[hidden] {
  display: none !important;
}

.npc-spectate-banner__ship,
.npc-spectate-banner__next {
  border-color: rgba(220, 180, 70, 0.55);
  color: #ffe9a8;
}

body.is-look-focusing .look-focus-banner,
body.is-npc-spectating .npc-spectate-banner {
  box-shadow: 0 0 0 1px rgba(255, 210, 90, 0.12);
}

body.is-look-focusing .look-focus-banner {
  box-shadow: 0 0 0 1px rgba(126, 180, 224, 0.18);
}

.combat-feedback {
  position: static;
  left: auto;
  top: auto;
  z-index: auto;
  transform: none;
  width: 100%;
  pointer-events: none;
  text-align: center;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.combat-feedback__banner,
.combat-feedback__lock {
  margin: 0.2rem 0 0;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(210, 120, 70, 0.45);
  background: linear-gradient(180deg, rgba(36, 18, 12, 0.92), rgba(18, 10, 8, 0.94));
  color: #ffd0b8;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.flight-toast {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: auto;
  text-align: left;
}

.flight-toast[hidden] {
  display: none !important;
}

.flight-toast__text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.flight-toast__close {
  flex: 0 0 auto;
  appearance: none;
  margin: 0;
  padding: 0;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgba(255, 220, 190, 0.28);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.flight-toast__close:hover,
.flight-toast__close:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.45);
  outline: none;
}

.flight-toast-stack__mine {
  margin: 0;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(170, 150, 55, 0.5);
  background: linear-gradient(180deg, rgba(28, 26, 12, 0.92), rgba(14, 13, 8, 0.94));
  color: #e6d48a;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Sora", "Segoe UI", sans-serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.flight-toast-stack__mine[hidden] {
  display: none !important;
}

.flight-toast-stack__mission {
  margin: 0;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(90, 150, 190, 0.5);
  background: linear-gradient(180deg, rgba(12, 22, 32, 0.92), rgba(8, 14, 20, 0.94));
  color: #c5dcec;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: "Sora", "Segoe UI", sans-serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.flight-toast-stack__mission[hidden] {
  display: none !important;
}

.flight-toast-stack__lease {
  margin: 0;
  width: 100%;
  padding: 0.35rem 0.5rem 0.35rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(200, 140, 70, 0.55);
  background: linear-gradient(180deg, rgba(32, 22, 10, 0.94), rgba(16, 12, 8, 0.95));
  color: #f0c090;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: "Sora", "Segoe UI", sans-serif;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.flight-toast-stack__lease[hidden] {
  display: none !important;
}

.combat-feedback__lock {
  border-color: rgba(210, 130, 70, 0.4);
  color: #ffb087;
  font-weight: 500;
  flex-wrap: wrap;
}

.combat-feedback__lock.is-in-range {
  border-color: rgba(90, 210, 140, 0.45);
  color: #9dffc2;
}

.combat-feedback__lock.is-blocked {
  border-color: rgba(230, 160, 70, 0.45);
  color: #ffc27a;
}

body.is-docked .combat-feedback {
  display: none;
}

.flight-toast-stack__autopilot,
.combat-feedback__autopilot {
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.76rem;
  color: #9ec8ff;
  pointer-events: none;
}

.flight-toast-stack__autopilot.is-active,
.combat-feedback__autopilot.is-active {
  color: #7dffb0;
}

.combat-feedback__stance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem;
  flex: 1 1 11rem;
  pointer-events: auto;
}

.combat-feedback__stance[hidden] {
  display: none !important;
}

@media (pointer: coarse), (max-width: 900px) {
  body.mobile-look-dock .flight-toast-stack {
    bottom: calc(var(--mobile-chrome-stack) + 0.25rem);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(92vw, 22rem);
    margin-left: 0;
    margin-right: 0;
  }

  .npc-spectate-banner {
    align-self: stretch;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .npc-spectate-banner__toggle {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 2rem;
    padding: 0.1rem 0;
  }

  .npc-spectate-banner__chev {
    display: inline-block;
  }

  .npc-spectate-banner.is-collapsed {
    gap: 0;
    padding: 0.35rem 0.55rem;
  }

  .npc-spectate-banner.is-collapsed .npc-spectate-banner__detail {
    display: none;
  }

  .npc-spectate-banner.is-collapsed .npc-spectate-banner__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(42vw, 11rem);
  }

  .npc-spectate-banner:not(.is-collapsed) .npc-spectate-banner__detail {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    padding-top: 0.15rem;
    border-top: 1px solid rgba(220, 180, 70, 0.22);
  }

  .npc-spectate-banner:not(.is-collapsed) .npc-spectate-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .npc-spectate-banner:not(.is-collapsed) .npc-spectate-banner__actions .btn {
    flex: 1 1 0;
  }
}
