/**
 * RoomRef CSS - Независими стилове за референтна стая
 * Grid 4x3, видими слотове, hover ефекти
 */

/* Root контейнер */
.room-ref-container {
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 39, 0.8);
    border-radius: 8px;
    padding: 20px;
    box-sizing: border-box;
}

/* Grid контейнер */
.room-ref-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: clamp(12px, 2.5%, 20px);
    width: 100%;
    max-width: 800px;
    height: 100%;
    max-height: 600px;
    box-sizing: border-box;
}

/* Слот (клетка) */
.room-ref-slot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(0, 255, 255, 0.3);
    background-color: rgba(0, 255, 255, 0.05);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 120px;
    overflow: hidden;
    box-sizing: border-box;
}

/* Номер на празен слот */
.room-ref-slot-number {
    color: rgba(0, 255, 255, 0.6);
    font-size: 24px;
    font-weight: bold;
    pointer-events: none;
    user-select: none;
}

/* Hover ефект за празен слот */
.room-ref-slot:hover:not(.room-ref-slot-occupied) {
    border-color: rgba(0, 255, 255, 0.6);
    background-color: rgba(0, 255, 255, 0.15);
    transform: scale(1.02);
}

.room-ref-slot-hover {
    border-color: rgba(0, 255, 255, 0.6) !important;
    background-color: rgba(0, 255, 255, 0.15) !important;
}

/* Зает слот */
.room-ref-slot-occupied {
    border: 2px solid rgba(0, 255, 255, 0.6);
    background-color: rgba(0, 255, 255, 0.12);
    cursor: pointer;
}

.room-ref-slot-occupied:hover {
    border-color: rgba(0, 255, 255, 0.8);
    background-color: rgba(0, 255, 255, 0.2);
    transform: scale(1.02);
}

/* Item изображение */
.room-ref-item-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    pointer-events: none;
    display: block;
    user-select: none;
}

/* Label на rack */
.room-ref-slot-label {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: rgba(0, 255, 255, 0.9);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .room-ref-grid {
        gap: 8px;
        max-height: 500px;
    }
    
    .room-ref-slot {
        min-height: 80px;
    }
    
    .room-ref-slot-number {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .room-ref-grid {
        gap: 6px;
    }
    
    .room-ref-slot {
        min-height: 60px;
    }
    
    .room-ref-slot-number {
        font-size: 16px;
    }
}
