/*
  StarshipOS — Stations-Bemannungsanzeige (Header-Widget)
  Zeigt in der globalen Kopfzeile, wer die aktuelle Station bemannt –
  oder warnt deutlich, wenn die Station unbemannt ist.
*/

.station-crew {
    display: flex;
    align-items: center;
    margin-left: auto;        /* nach links neben Hazard/Sound schieben */
    margin-right: var(--space-md, 1rem);
}

.station-crew-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm, 0.5rem);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    line-height: 1.2;
    border: 1px solid var(--border-color, #2a3a4a);
    background: var(--bg-secondary, #0f1822);
}

/* ── Bemannt ───────────────────────────────────────────────────────── */

.station-crew-box--manned {
    border-color: rgba(16, 185, 129, 0.5);
}

/* Bemannt, aber unter Mindestbesatzung — sichtbar anders als "voll besetzt". */
.station-crew-box--understaffed {
    border-color: rgba(245, 158, 11, 0.6);
}

/* Verhaeltnis Personen/Posten, z.B. "1/4". */
.station-crew-ratio {
    color: var(--text-muted, #7a8a99);
    font-size: 0.66rem;
    padding-right: var(--space-sm, 0.5rem);
    border-right: 1px solid var(--border-color, #2a3a4a);
}

.station-crew-box--understaffed .station-crew-ratio {
    color: #fcd34d;
}

.station-crew-label {
    color: var(--text-muted, #7a8a99);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.62rem;
    border-right: 1px solid var(--border-color, #2a3a4a);
    padding-right: var(--space-sm, 0.5rem);
}

.station-crew-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm, 0.5rem) var(--space-md, 1rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.station-crew-member {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.station-crew-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
    align-self: center;
    background: var(--text-muted, #7a8a99);
}

.station-crew-dot--active {
    background: var(--accent-green, #10b981);
    box-shadow: 0 0 5px var(--accent-green, #10b981);
}

.station-crew-dot--standby {
    background: var(--accent-yellow, #f59e0b);
    opacity: 0.8;
}

.station-crew-name {
    color: var(--text-primary, #e6edf3);
    font-weight: 600;
}

.station-crew-sub {
    color: var(--text-muted, #7a8a99);
    font-size: 0.62rem;
}

.station-crew-member--roster .station-crew-name {
    font-weight: 400;
    font-style: italic;
}

/* ── Unbemannt ─────────────────────────────────────────────────────── */

.station-crew-box--empty {
    border-color: var(--accent-yellow, #f59e0b);
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow, #f59e0b);
    animation: station-crew-pulse 2.2s ease-in-out infinite;
}

.station-crew-warn-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.station-crew-empty-text {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    font-size: 0.68rem;
}

.station-crew-station {
    color: var(--text-primary, #e6edf3);
    border-left: 1px solid rgba(245, 158, 11, 0.5);
    padding-left: var(--space-sm, 0.5rem);
}

@keyframes station-crew-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0); }
    50%      { box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
}

@media (max-width: 768px) {
    .station-crew { margin-left: 0; }
    .station-crew-sub { display: none; }
}
