/* ============================================================
   LOADOUT ENGINE — Slot-based weapon selection UI
   Matches card-override purple/violet theme.
   ============================================================ */

.lo-panel {
    background: #1a0f2e;
    border: 1px solid #2d1f4e;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0 4px;
    font-family: inherit;
}

.lo-header {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #a855f7;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* ── Slot row ─────────────────────────────────────────────── */
.lo-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0;
    border-top: 1px solid #2d1f4e;
    gap: 8px;
    min-height: 30px;
    transition: opacity 0.2s;
}
.lo-slot:first-of-type {
    border-top: none;
}

.lo-slot.lo-disabled {
    opacity: 0.3;
    pointer-events: none;
}
.lo-slot.lo-slot-bulk {
    flex-direction: column;
    align-items: stretch;
}

.lo-slot-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #c4b5d0;
    white-space: nowrap;
    flex-shrink: 0;
}

.lo-model-badge {
    display: inline-block;
    background: #2d1f4e;
    color: #a855f7;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 5px;
    text-transform: uppercase;
    vertical-align: middle;
}

.lo-ratio-note {
    color: #888;
    font-size: 0.6rem;
    font-weight: 400;
    margin-left: 4px;
}

/* ── Toggle switch ────────────────────────────────────────── */
.lo-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.lo-toggle-label {
    font-size: 0.68rem;
    color: #666;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}
.lo-toggle-label.lo-active {
    color: #fff;
    font-weight: 700;
}

.lo-toggle-track {
    width: 32px;
    height: 16px;
    background: #2d1f4e;
    border: 1px solid #4a3570;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.lo-toggle-track:hover {
    border-color: #a855f7;
}
.lo-toggle-track.lo-toggled {
    background: #4a2080;
    border-color: #a855f7;
}

.lo-toggle-thumb {
    width: 12px;
    height: 12px;
    background: #c4b5d0;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: left 0.2s, background 0.2s;
}
.lo-toggle-track.lo-toggled .lo-toggle-thumb {
    left: 17px;
    background: #a855f7;
}

/* ── Dropdown ─────────────────────────────────────────────── */
.lo-dropdown {
    background: #120b1e;
    border: 1px solid #2d1f4e;
    border-radius: 5px;
    color: #c4b5d0;
    font-size: 0.7rem;
    padding: 3px 6px;
    cursor: pointer;
    max-width: 180px;
    flex-shrink: 1;
    min-width: 0;
}
.lo-dropdown:focus {
    border-color: #a855f7;
    outline: none;
}
.lo-dropdown option {
    background: #1a0f2e;
}
.lo-dropdown:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Checkbox ─────────────────────────────────────────────── */
.lo-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 0.7rem;
    color: #c4b5d0;
}

.lo-checkbox {
    accent-color: #a855f7;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ── Bulk Counter (per-model weapon swap) ─────────────────── */
.lo-bulk-wrap {
    width: 100%;
}
.lo-bulk-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
}
.lo-bulk-row + .lo-bulk-row {
    border-top: 1px solid rgba(45, 31, 78, 0.5);
}
.lo-bulk-name {
    font-size: 0.72rem;
    font-weight: 500;
    color: #c4b5d0;
}
.lo-bulk-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: #888;
    min-width: 24px;
    text-align: center;
}
.lo-bulk-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}
.lo-bulk-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #4a3570;
    border-radius: 4px;
    background: #2d1f4e;
    color: #c4b5d0;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: border-color 0.15s, background 0.15s;
}
.lo-bulk-btn:hover:not(:disabled) {
    border-color: #a855f7;
    background: #3a2660;
}
.lo-bulk-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.lo-bulk-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    min-width: 28px;
    text-align: center;
}
.lo-bulk-alt .lo-bulk-name {
    color: #a855f7;
}

/* ── Capacity / Validation ────────────────────────────────── */
.lo-capacity {
    color: #666;
    font-size: 0.58rem;
    font-weight: 400;
    margin-left: 4px;
}

.lo-capacity-msg {
    font-size: 0.62rem;
    font-weight: 500;
    color: #666;
    font-style: italic;
}
.lo-capacity-msg.lo-at-cap {
    color: #f97316;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    .lo-slot {
        flex-wrap: wrap;
        gap: 4px;
    }
    .lo-toggle-wrap {
        width: 100%;
        justify-content: center;
    }
    .lo-dropdown {
        max-width: 100%;
        width: 100%;
    }
}
