/**
 * Sector Picker Styles - War 2050
 * Full-screen overlay for Control Sector selection
 * z-index: --z-modal (1800) - tied with the profile popup, above the
 * tutorial (--z-tutorial-chrome, 1500), below the intro (--z-intro, 2000).
 * See docs/HUD-LAYOUT.md §2.
 *
 * TYPE (docs/TYPE-LEGIBILITY.md): this file was written against three
 * variables that do not exist — --color-gold, --color-text and
 * --color-bg-deep — so every one of those declarations had silently been
 * running on its literal fallback since it was written. They are named
 * properly now (--color-accent-gold, --color-text-primary,
 * --color-primary-900); the rendered colours are unchanged, but the file
 * no longer looks tokenised when it is not.
 *
 * The dimmed text is gone with them: rgba(255,255,255,0.4) measured
 * 3.76-3.81:1 on the overlay and is --color-text-secondary now.
 */

/* =========================================================
   Sector Picker Overlay
   ========================================================= */

.sector-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    background: rgba(10, 15, 26, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.sector-picker-overlay.hidden {
    display: none;
}

.sector-picker-overlay.fade-out {
    opacity: 0;
}

/* =========================================================
   Header
   ========================================================= */

.sector-picker-header {
    text-align: center;
    margin-bottom: 30px;
}

.sector-picker-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    color: var(--color-accent-gold, #d4af37);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.sector-picker-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text-secondary, #94a3b8);
    letter-spacing: 1px;
}

/* =========================================================
   Sector List
   ========================================================= */

.sector-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 60vh;
    overflow-y: auto;
}

.sector-card {
    background: rgba(26, 39, 68, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sector-card:hover {
    background: rgba(26, 39, 68, 0.8);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* A full sector is still a sector the player is reading about — its name,
   its description and its headcount are the reasons they will pick a
   different one. At opacity 0.4 those measured 3.16:1, 1.64:1 and 1.89:1,
   so "unavailable" is said with surface and with the disabled DEPLOY
   button, not by fading the card's own text out of legibility. */
.sector-card.full {
    background: rgba(10, 15, 26, 0.6);
    border-color: rgba(148, 163, 184, 0.22);
    cursor: not-allowed;
}

.sector-card.full:hover {
    background: rgba(10, 15, 26, 0.6);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: none;
}

.sector-card.full .sector-card-name {
    color: var(--color-text-secondary, #94a3b8);
}

.sector-card-info {
    flex: 1;
}

.sector-card-code {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem;
    color: var(--color-accent-gold, #d4af37);
    letter-spacing: 1.4px;
    margin-bottom: 4px;
}

.sector-card-name {
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem;
    color: var(--color-text-primary, #f8fafc);
    font-weight: 500;
    margin-bottom: 4px;
}

.sector-card-desc {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.82rem;
    color: var(--color-text-secondary, #94a3b8);
}

.sector-card-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-left: 16px;
}

.sector-player-count {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    color: var(--color-text-secondary, #94a3b8);
}

.sector-player-count strong {
    color: var(--color-text-primary, #f8fafc);
}

/* =========================================================
   Deploy Button
   ========================================================= */

.sector-deploy-btn {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #0a0f1a;
    background: var(--color-accent-gold, #d4af37);
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sector-deploy-btn:hover {
    background: #f4d03f;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Dark text on gold survives being faded very badly: at opacity 0.5 the
   gold washed down toward the overlay and DEPLOY measured 2.99:1 while
   still looking like a button. Unavailable is a different fill and a
   light label (10.6:1), not the same button at half strength. */
.sector-deploy-btn:disabled {
    background: rgba(212, 175, 55, 0.28);
    color: var(--color-text-primary, #f8fafc);
    box-shadow: none;
    cursor: not-allowed;
}

.sector-deploy-btn:disabled:hover {
    background: rgba(212, 175, 55, 0.28);
    box-shadow: none;
}

/* Transient, but 0.6 put the same dark-on-gold label at 3.91:1. */
.sector-deploy-btn.deploying {
    opacity: 0.75;
    pointer-events: none;
}

/* =========================================================
   Status Indicators
   ========================================================= */

.sector-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.sector-status.active {
    background: var(--color-accent-green, #4ade80);
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}

.sector-status.full {
    background: var(--color-accent-orange, #fb923c);
}

.sector-status.maintenance {
    background: var(--color-accent-red, #ef4444);
}

/* =========================================================
   Loading State
   ========================================================= */

.sector-loading {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: var(--color-text-secondary, #94a3b8);
    text-align: center;
    padding: 40px;
}

/* =========================================================
   Reduced Motion
   docs/HUD-LAYOUT.md §7 names this file's overlay transition explicitly.
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .sector-picker-overlay,
    .sector-card,
    .sector-deploy-btn {
        transition: none;
    }
}
