/* Department List Container */
.department-list-container {
    font-family: 'Courier New', monospace;
    color: #0f0;
    white-space: normal;

}

/* Department List Header */
.department-list-header {
    display: none; /* Hidden on mobile */
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.department-list-header span {
    color: #0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.department-list-header .dept-col-name {
    justify-content: flex-start;
}

/* Department List Body */
.department-list-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.department.terminal-body {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-content: center;
    align-items: center;
    border: none;
    background: none;
    padding: 0;
}

/* Department List Item */
.department-list-item {
    border: 1px solid #333;
    border-radius: 4px;
}

.department-list-item:hover {
    background: rgba(0, 255, 0, 0.05);
    border-color: #555;
}

.department-list-item.department-disabled {
    opacity: 0.8;
    filter: grayscale(30%);
}

.department-list-item.department-disabled .department-list-button {
    cursor: not-allowed;
}

/* Department List Button */
.department-list-form {
    margin: 0;
    padding: 0;
}
.department-list-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.department-list-button:hover:not(:disabled) {
    background: rgba(0, 255, 0, 0.05);
}

.department-list-button:disabled {
    cursor: not-allowed;
}

/* Mobile Layout */
.department-mobile-layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.department-mobile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.department-mobile-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.department-mobile-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #888;
    flex-wrap: wrap;
}

.department-mobile-stats span {
    white-space: nowrap;
}

/* Desktop Layout - Hidden on Mobile */
.department-desktop-layout {
    display: none;
}

/* Column Styling for Mobile */
.dept-col-tier,
.dept-col-name,
.dept-col-tag,
.dept-col-cluster,
.dept-col-workers,
.dept-col-shadows,
.dept-col-status {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0 !important;
}

.dept-col-name {
    justify-content: flex-start;
    font-weight: bold;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Badges */
.tier-badge, .status-badge {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.7rem;
    font-weight: bold;
    text-align: center;
    min-width: 24px;
    border: 1px solid transparent;
    margin-bottom: 0 !important;

}

/* Efficiency Colors */
.efficiency-decay { color: #fff52d; }
.efficiency-penalty { color: #ff8000;  }
.efficiency-out_of_bounds {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
}

/* Status Colors */
.status-current { background: #0a0; color: #000; }
.status-shadow { background: #ff6; color: #000; }
.status-locked { background: #666; color: #fff; }
.status-available { background: #333; color: #0f0; border: 1px solid #555; }
.status-promote { background: rgba(0, 255, 0, 0.2); color: #0f0; border: 1px solid #0f0; }

/* Utility Classes */
.unlock-requirement {
    display: block;
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

/* Efficiency Color Classes for List Items */
.department-list-item.efficiency-normal {
    border-left: 3px solid #0f0;
}

.department-list-item.efficiency-trivial {
    border-left: 3px solid #888;
}

.department-list-item.efficiency-decay {
    border-left: 3px solid #fff52d;
}

.department-list-item.efficiency-penalty {
    border-left: 3px solid #ff8000;
}

.department-list-item.efficiency-out_of_bounds {
    border-left: 3px solid #ff0000;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.2) 10%);
}

/* Desktop Layout - 730px and up */
@media (min-width: 730px) {
    .department-list-header {
        display: grid;
        grid-template-columns: 50px 200px 80px 80px 60px 80px;
        gap: 12px;
        padding: 8px 12px;
        align-items: center;
    }

    .department-list-button {
        display: grid;
        grid-template-columns: 50px 200px 80px 80px 60px 80px;
        gap: 12px;
        padding: 8px 12px;
        align-items: center;
        font-size: 0.85rem;
    }

    .department-mobile-layout { display: none; }
    .department-desktop-layout { display: contents; }

    .dept-col-name { justify-content: flex-start; }
}

.dept-nav-arrow {
    color: #0f0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: none;
    width: 25px;
}

.dept-nav-arrow:hover:not(.disabled) {
    background: #333;
    border-color: #0f0;
    color: #fff;
    transform: scale(1.1);
}

.dept-nav-arrow.disabled {
    background: #111;
    color: #555;
    border-color: #333;
    cursor: not-allowed;
}

.dept-nav-arrow.disabled:hover {
    transform: none;
    background: #111;
    border-color: #333;
    color: #555;
}

.dept-promotion-button {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(0, 255, 0, 0.1);
    color: #0f0;
    border: 1px solid #0f0;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-width: 60px;
    text-align: center;
}

.dept-promotion-button:hover {
    background: #0f0;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.4);
}

.department-name-text {
    text-align: center;
}
/* Department Navigation Arrows */
.department-name-with-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
}
