/* ============================================
   DCS MISSION COMMAND - Player View Styles
   ============================================ */

.nav-link {
    color: var(--amber);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 170, 0, 0.35);
    border-radius: 999px;
    transition: all 0.18s ease;
    background: rgba(255, 170, 0, 0.04);
}

.nav-link:hover {
    background: rgba(255, 170, 0, 0.12);
    border-color: var(--amber);
    color: #ffd27a;
}

.player-view #top-bar {
    overflow-x: hidden;
}

.player-view .dash-row {
    min-width: 0;
}

.player-view .dash-title {
    min-width: 180px;
}

.player-view .dash-news {
    flex: 0 0 690px;
    width: 690px;
}

.player-view .dash-news .dash-label,
.player-view .dash-news .dash-ticker {
    max-width: 100%;
}

.player-view .dash-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
}

.player-view .dash-nav .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 16px;
    font-size: 12px;
}

.command-overview {
    background:
        radial-gradient(circle at top right, rgba(255, 170, 0, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(51, 136, 255, 0.08), rgba(255, 255, 255, 0)),
        var(--bg-panel-alt);
}

.overview-kicker {
    font-family: var(--font-mono);
    font-size: 0.9em;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 0.7em;
}

.overview-title {
    font-family: var(--font-heading);
    font-size: 1.55em;
    line-height: 1.2;
    letter-spacing: 1px;
    color: var(--text-bright);
    margin-bottom: 0.8em;
    text-wrap: balance;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.55em;
}

.overview-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15em;
    padding: 0.6em 0.9em;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(10, 14, 19, 0.45);
}

.overview-stat-label {
    font-family: var(--font-mono);
    font-size: 0.8em;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.overview-stat strong {
    font-family: var(--font-heading);
    font-size: 1.15em;
    letter-spacing: 1px;
    color: var(--text-bright);
}

.overview-stat span:last-child {
    font-family: var(--font-mono);
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--text-secondary);
}

.mode-btn {
    background: rgba(15, 20, 25, 0.9);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    min-height: 3.2em;
    padding: 0.6em 0.7em;
    font-family: var(--font-mono);
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-btn:hover {
    border-color: var(--green);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.mode-btn.active {
    border-color: var(--green);
    color: var(--green);
    background: linear-gradient(180deg, rgba(224, 232, 240, 0.12), rgba(30, 42, 53, 0.92));
    box-shadow: inset 0 0 0 1px rgba(224, 232, 240, 0.06);
}

.player-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
}

#player-mission-list {
    max-height: none;
}

.player-list li {
    padding: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0));
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.player-list li:hover {
    border-color: rgba(224, 232, 240, 0.35);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.player-list li.active {
    border-color: rgba(224, 232, 240, 0.45);
    color: var(--green);
    background:
        radial-gradient(circle at right top, rgba(224, 232, 240, 0.12), transparent 42%),
        rgba(30, 42, 53, 0.74);
}

.player-list .list-name {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--amber);
    margin-bottom: 4px;
}

.player-list .list-name .mission-prefix {
    color: rgba(224, 232, 240, 0.4);
    font-weight: 400;
}

.player-list .list-meta {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.import-btn {
    width: 100%;
    padding: 10px 12px;
    background: rgba(15, 20, 25, 0.8);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.import-btn:hover {
    border-color: var(--amber);
    color: var(--amber);
    background: rgba(255, 170, 0, 0.05);
}

.empty-state {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px 12px;
    line-height: 1.8;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(10, 14, 19, 0.35);
}

.empty-state small {
    font-size: 11px;
    opacity: 0.72;
}

.generator-action-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background:
        radial-gradient(circle at top right, rgba(224, 232, 240, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(30, 42, 53, 0.92), rgba(15, 20, 25, 0.9));
}

.generator-action-copy p {
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-primary);
}

.action-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 8px;
}

.package-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.package-hint {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.7;
    color: var(--text-secondary);
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(10, 14, 19, 0.42);
}

.slot-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.slot-slider-row input[type="range"] {
    flex: 1;
    accent-color: var(--amber);
    cursor: pointer;
}

.slot-slider-row span {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--amber);
    min-width: 28px;
    text-align: right;
}

#flight-table {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 20, 25, 0.88);
}

.flight-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 46px 70px 28px;
    gap: 8px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.flight-row {
    display: grid;
    grid-template-columns: 1fr 1fr 46px 70px 28px;
    gap: 8px;
    padding: 8px 10px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.flight-row:first-child {
    border-top: none;
}

.flight-row .flight-callsign {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--amber);
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flight-row select,
.flight-row input[type="number"],
.flight-row input[type="text"] {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 6px 8px;
    width: 100%;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.flight-row select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.flight-row select:focus,
.flight-row input[type="number"]:focus,
.flight-row input[type="text"]:focus {
    outline: none;
    border-color: var(--amber);
    background: rgba(255, 170, 0, 0.04);
}

.flight-row input[type="number"] {
    text-align: center;
}

.flight-row .remove-flight-btn,
.flight-row .flight-remove {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.flight-row .remove-flight-btn:hover,
.flight-row .flight-remove:hover {
    border-color: rgba(255, 51, 68, 0.35);
    background: rgba(255, 51, 68, 0.1);
}

.flight-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.03);
}

#slots-count {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

#add-flight-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

#add-flight-btn:hover {
    border-color: var(--green);
    color: var(--text-primary);
}

.export-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: rgba(255, 170, 0, 0.05);
    border: 1px solid rgba(255, 170, 0, 0.6);
    border-radius: 10px;
    color: var(--amber);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.export-btn:hover {
    background: rgba(255, 170, 0, 0.1);
    box-shadow: 0 0 16px rgba(255, 170, 0, 0.18);
}

.export-btn:disabled {
    border-color: var(--border);
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.4;
    box-shadow: none;
}

#mission-log {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
}

#mission-log li {
    padding: 10px 12px;
    background: rgba(15, 20, 25, 0.84);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.18s ease;
}

#mission-log li:hover {
    border-color: var(--amber);
    color: var(--text-primary);
    transform: translateY(-1px);
}

#mission-log li .log-name {
    color: var(--amber);
    display: block;
    margin-bottom: 4px;
}

#mission-log li .log-meta {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.6;
}

.player-view #briefing-placeholder {
    background:
        radial-gradient(circle at top, rgba(255, 170, 0, 0.09), transparent 34%),
        transparent;
}

.player-view .briefing-header {
    text-align: left;
}

.player-view .brief-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: 12px;
}

.player-view .briefing-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.01);
}

.player-view .classification {
    font-size: 11px;
    letter-spacing: 2px;
}

/* ===== GENERATOR STEP PROGRESS BAR ===== */
.gen-step-bar {
    display: flex;
    align-items: center;
    padding: 14px 12px 10px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.gen-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
}

.gen-step-circle {
    width: 26px;
    height: 26px;
    border: 2px solid var(--border);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    font-family: var(--font-mono);
}

.gen-step.done .gen-step-circle {
    border-color: var(--green-accent);
    background: rgba(93, 217, 138, 0.1);
    color: var(--green-accent);
}

.gen-step.active .gen-step-circle {
    border-color: var(--amber-bright, #ffaa00);
    background: rgba(255, 170, 0, 0.1);
    color: var(--amber-bright, #ffaa00);
    box-shadow: 0 0 10px rgba(255, 170, 0, 0.22);
}

.gen-step-label {
    font-size: 9px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.2s;
    font-family: var(--font-mono);
    white-space: nowrap;
}

.gen-step.done .gen-step-label  { color: var(--green-accent); }
.gen-step.active .gen-step-label { color: var(--amber-bright, #ffaa00); }

.gen-step-connector {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin-bottom: 19px;
    transition: background 0.3s;
}

.gen-step-connector.done {
    background: rgba(93, 217, 138, 0.35);
}

@media (max-width: 1200px) {
    .overview-title {
        font-size: 24px;
    }
}

@media (max-width: 900px) {
    .overview-title {
        font-size: 24px;
    }

    .player-list,
    #mission-log {
        max-height: none;
    }
}

/* ===== CAMPAIGN FLIGHT TABLE — 2-row card layout ===== */
/* Callsign fills row 1; aircraft/qty/start/remove fill row 2.
   Gives each element room in the narrow 320px panel. */

#cmp-flight-table .flight-table-header {
    grid-template-columns: 1fr 42px 68px 28px;
}

#cmp-flight-table .flight-row {
    grid-template-columns: 1fr 42px 68px 28px;
    grid-template-rows: auto auto;
    gap: 5px 6px;
    padding: 8px 10px;
}

#cmp-flight-table .flight-row .flight-callsign {
    grid-column: 1 / -1;
    grid-row: 1;
    color: var(--amber);
    font-weight: 600;
    font-size: 12px;
}

#cmp-flight-table .flight-row .flight-aircraft {
    grid-column: 1;
    grid-row: 2;
}

#cmp-flight-table .flight-row .flight-qty {
    grid-column: 2;
    grid-row: 2;
    padding: 6px 4px;
    text-align: center;
}

#cmp-flight-table .flight-row .flight-start {
    grid-column: 3;
    grid-row: 2;
}

#cmp-flight-table .flight-row .flight-remove {
    grid-column: 4;
    grid-row: 2;
    align-self: center;
}

@media (max-width: 768px) {
    .player-view .dash-title {
        min-width: 0;
    }

    .player-list,
    #mission-log {
        max-height: none;
    }

    /* Strike package table: scroll horizontally */
    #flight-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .flight-table-header,
    .flight-row {
        min-width: 360px;
    }

    /* Export/publish buttons: stack on small screens */
    #package-editor > div[style*="flex"] {
        flex-direction: column;
    }
}

/* Airspace zone tooltips */
.airspace-label {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #ffaa00;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    pointer-events: none;
    text-shadow: 0 0 4px #000, 0 0 8px #000;
}
.airspace-label::before { display: none; }
