/* Building Room List View Styles */

.building-room-list-view .building-stats {
    padding-right: 20px;
}

.building-room-list-view .building-stats .separator {
    margin: 0 10px;
    color: #ddd;
}

/* Main container - horizontal scroll like in example */
.building-room-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Buildings Container */
.buildings-container {
    display: flex;
    gap: 20px;
    padding: 0;
    min-height: 400px;
}

/* Building Column - matching example styles */
.building-column {
    flex-shrink: 0;
    background-color: #f9f9f9;
    border: 3px solid #2c3e50;
    border-radius: 8px;
    padding: 10px;
    min-width: 140px;
    transition: border-color 0.3s ease;
}

.building-column:hover {
    border-color: #3498db;
}

/* Building Header - matching example */
.building-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c3e50;
    cursor: pointer;
    user-select: none;
}

.building-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.building-name .toggle-icon {
    font-size: 12px;
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.building-name small {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
    font-weight: normal;
}

.room-stats {
    font-size: 11px;
    color: #3498db;
    margin-top: 5px;
    font-weight: 500;
}

/* Rooms Container - multi-column layout like example */
.rooms-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    max-height: calc(100vh - 400px);
    gap: 5px;
    align-content: center; /* Центрирование комнат */
    transition: all 0.3s ease;
}

.rooms-container.collapsed {
    max-height: 0;
    overflow: hidden;
    display: none;
}

.rooms-container.collapsed ~ .building-header .toggle-icon {
    transform: rotate(-90deg);
}

/* Room Item - tile style from example */
.room-item {
    width: 80px;
    height: 50px;
    background-color: #ecf0f1;
    border: 2px solid #34495e;
    border-radius: 6px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.room-item:hover {
    background-color: #3498db;
    border-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.room-item:hover .room-name,
.room-item:hover .room-capacity {
    color: white;
}

/* Room content */
.room-name {
    font-size: 10px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.room-capacity {
    font-size: 9px;
    color: #7f8c8d;
}

/* Virtual room styles */
.room-virtual {
    background-color: #fff8e1;
    border-color: #f39c12;
    border-style: dashed;
}

.room-virtual:hover {
    background-color: #f39c12;
    border-color: #e67e22;
}

/* Building with many rooms - visual indicator */
.building-column:has(.rooms-container > :nth-child(20)) {
    background: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);
}

.building-column:has(.rooms-container > :nth-child(25)) {
    background: linear-gradient(to bottom, #f9f9f9 0%, #f0f0f0 100%);
}

.building-column:has(.rooms-container > :nth-child(30)) {
    background: linear-gradient(to bottom, #f9f9f9 0%, #ebebeb 100%);
}

/* No Rooms Message */
.no-rooms {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Scrollbar Styling */
.building-room-container::-webkit-scrollbar {
    height: 8px;
}

.building-room-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.building-room-container::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.building-room-container::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* Responsive */
@media (max-width: 768px) {
    .building-column {
        min-width: 120px;
    }

    .room-item {
        width: 90px;
        height: 55px;
    }

    .room-name {
        font-size: 10px;
    }

    .room-capacity {
        font-size: 9px;
    }

    .building-stats {
        display: none;
    }
}