/* tenshin_panels.css -- the fleet's floating panels (tenshin_panels.js). Synced from website/dropins/: edit the drop-in.
 * Colours come from tenshin_nav.css's tokens (light and dark follow data-theme on <html>); the fallbacks are its
 * dark values, for a page that loads only this file. A game sets a panel's width and its body's content, nothing else.
 * One thin border all round, no accent bars: the 2026-11 design pass removed side tabs and thick top bars. */
.tn-panel {
  --tn-panel-bg: color-mix(in srgb, var(--tn-nav-bg, #171a1f) 90%, transparent);
  position: fixed; box-sizing: border-box; width: 280px; max-width: calc(100vw - 24px);
  max-height: calc(100vh - var(--tn-panels-top, 0px) - var(--tn-panels-bottom, 0px) - 24px);
  display: flex; flex-direction: column; margin: 0;
  background: var(--tn-panel-bg); color: var(--tn-nav-ink, #e8eaed);
  border: 1px solid var(--tn-nav-edge, #2f343c); border-radius: 6px;
  font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tn-panel-head {
  display: flex; align-items: center; gap: 8px; flex: none; min-height: 32px; padding: 0 4px 0 10px;
  cursor: grab; user-select: none; touch-action: none;
}
.tn-panel-dragging .tn-panel-head { cursor: grabbing; }
.tn-panel-head:focus-visible { outline: 1px solid var(--tn-nav-accent, #e0b24a); outline-offset: -1px; border-radius: 6px; }
.tn-panel-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 12px; font-weight: 600; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The warning count: shown only when the game writes one, and still there with the panel collapsed. */
.tn-panel-badge { flex: none; min-width: 18px; padding: 2px 5px; box-sizing: border-box; border-radius: 9px;
  background: var(--tn-nav-accent, #e0b24a); color: var(--tn-nav-bg, #171a1f);
  font: 600 11px/1 ui-monospace, Consolas, monospace; text-align: center; }
.tn-panel-badge:empty { display: none; }
.tn-panel-toggle { flex: none; width: 24px; height: 24px; padding: 0; border: 1px solid transparent; border-radius: 4px;
  background: transparent; color: var(--tn-nav-dim, #8b93a0); font: 16px/1 system-ui, sans-serif; cursor: pointer; }
.tn-panel-toggle:hover, .tn-panel-toggle:focus-visible { color: var(--tn-nav-ink, #e8eaed);
  border-color: var(--tn-nav-edge, #2f343c); outline: none; }
.tn-panel-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px 10px 10px;
  border-top: 1px solid var(--tn-nav-edge, #2f343c); }
.tn-panel-collapsed .tn-panel-body { display: none; }

/* Under 768 px: the panels leave the map. A strip of titles sits at the bottom (above --tn-panels-bottom, so a
 * game's own bottom controls stay clear) and the one tapped opens as a sheet just above it. */
.tn-panel-strip { display: none; }
@media (max-width: 767px) {
  .tn-panels-narrow .tn-panel { display: none; }
  .tn-panels-narrow .tn-panel.tn-panel-open {
    display: flex; left: 0; right: 0; top: auto; width: auto; max-width: none;
    bottom: calc(var(--tn-panels-bottom, 0px) + var(--tn-panels-strip, 44px));
    max-height: 60vh; border-radius: 6px 6px 0 0; border-bottom: 0;
  }
  .tn-panels-narrow .tn-panel-open .tn-panel-body { display: block; }
  .tn-panels-narrow .tn-panel-head { cursor: default; }
  .tn-panel-strip {
    position: fixed; left: 0; right: 0; bottom: var(--tn-panels-bottom, 0px); z-index: 2147483000;
    display: flex; gap: 4px; padding: 4px; overflow-x: auto;
    background: var(--tn-nav-bg, #171a1f); border-top: 1px solid var(--tn-nav-edge, #2f343c);
  }
  .tn-panel-tab { display: inline-flex; align-items: center; gap: 6px; flex: 1 0 auto; justify-content: center;
    min-height: 36px; padding: 0 12px; border: 1px solid var(--tn-nav-edge, #2f343c); border-radius: 6px;
    background: transparent; color: var(--tn-nav-ink, #e8eaed); cursor: pointer;
    font: 13px/1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
  .tn-panel-tab[aria-expanded="true"] { border-color: var(--tn-nav-accent, #e0b24a); }
  .tn-panel-tab:focus-visible { outline: 1px solid var(--tn-nav-accent, #e0b24a); outline-offset: 1px; }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .tn-panels-narrow .tn-panel.tn-panel-open { animation: tn-panel-rise 140ms ease-out; }
}
@keyframes tn-panel-rise { from { transform: translateY(12px); opacity: 0; } }
