/* === Seat Map Container === */
.seat-map-container {
    max-width: 100%;
    overflow-x: auto;
}

/* === Floor Section === */
.andar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fafafa;
}

.andar-label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    padding: 5px 15px;
    background-color: #e0e0e0;
    border-radius: 4px;
}

/* === Bus Layout Grid === */
.bus-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ccc;
}

.seat-column {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 40px;
    padding: 0;
    align-content: flex-start;
    margin-right: 4px;
}

/* === Individual Seat Cell === */
.seat-cell {
    position: relative;
    width: 100%;
    height: 35px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    user-select: none;
}

.seat-cell img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: brightness(0.85);
    pointer-events: none;
}

.seat-text {
    position: relative;
    color: black;
    z-index: 1;
    font-size: 11px;
    font-weight: 600;
}

/* === Interactive States === */
.seat-clickable {
    cursor: pointer;
}

.seat-clickable:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #007bff;
    z-index: 10;
}

.seat-occupied {
    cursor: not-allowed;
    opacity: 0.9;
}

.seat-locking {
    cursor: not-allowed;
    opacity: 0.8;
    animation: pulse-locking 1.5s ease-in-out infinite;
}

@keyframes pulse-locking {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}

/* === Legend === */
.legend-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ccc;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 80px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    padding: 5px;
}

.legend-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.legend-color {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.legend-text {
    color: #333;
    margin-top: 5px;
    font-size: 11px;
    max-width: 80px;
    text-align: center;
    word-wrap: break-word;
}

/* === Responsive === */
@media (max-width: 576px) {
    .seat-column {
        width: 32px;
        margin-right: 2px;
    }

    .seat-cell {
        height: 28px;
        margin-bottom: 2px;
    }

    .seat-text {
        font-size: 9px;
    }

    .bus-layout {
        gap: 4px;
        padding: 5px;
    }

    .legend-item {
        min-width: 60px;
        height: 65px;
    }

    .legend-item img {
        width: 30px;
        height: 30px;
    }
}
