/* ============================================================
 * Top Strip — Phase 4 of the UI redesign.
 *
 * Horizontal 64h strip pinned to the top of the viewport via
 * #shell-top. Holds the empire mark, total empire energy,
 * region pills, brownout chips, and the alerts bell on the right.
 * ============================================================ */

#kethran-top-strip {
  /* Auto-width — only as wide as content. The shell-top-left zone
   * holds it on the left; the right cluster sits separately on the
   * right. This stops the strip spanning the full viewport. */
  width: auto;
  height: 100%;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  font-family: var(--font);
  color: var(--text);
}

.k-top-mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--panel-deep);
  font-size: 13px;
  flex-shrink: 0;
}
body[data-corner-bracket="true"] .k-top-mark {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.k-top-id {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 140px;
}
.k-top-empire {
  font-family: var(--font-header);
  font-size: 10px;
  font-weight: var(--header-weight);
  letter-spacing: var(--header-letter);
  color: var(--text-dim);
  text-transform: uppercase;
}
.k-top-energy {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.k-top-energy.bad {
  color: var(--bad);
}
.k-top-energy-bar {
  position: relative;
  width: 100%;
  height: 4px;
  margin-top: 2px;
  background: var(--panel-deep);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.k-top-energy-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.18s ease, background 0.18s ease;
}
.k-top-energy-fill.bad { background: var(--bad); }

.k-top-pills {
  display: flex;
  gap: 6px;
  /* No flex-1 — strip is content-sized now that the right cluster
   * is a separate floating panel. Pills size to their content but
   * cap so a wall of regions doesn't push the strip past viewport. */
  flex: 0 1 auto;
  min-width: 0;
  max-width: 60vw;
  overflow-x: auto;
  padding: 4px 0;
}
.k-top-pills::-webkit-scrollbar {
  display: none;
}

.k-top-chips {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.k-top-spacer {
  flex: 0 1 0px;
}

.k-top-alerts {
  flex-shrink: 0;
  /* NotificationManager re-mounts here; no styles of its own. */
}
