/* Sistema de Seleção de Poltronas - Layout Novo */
:root {
    --seat-blue: #0066cc;
    --seat-blue-light: #3399ff;
    --seat-blue-dark: #003d7a;
    --seat-selected: #ffd700;
    --seat-occupied: #666666;
    --seat-hover: #00a2ff;
    --corridor-bg: #f0f0f0;
    --bus-bg: #ffffff;
    --bus-border: #cccccc;
}

.seat-selection-container {
    padding: 20px;
    background: var(--bus-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bus-layout {
    background: var(--bus-bg);
    border: 3px solid var(--bus-border);
    border-radius: 30px 30px 20px 20px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

/* Área do Motorista */
.bus-front {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 15px;
    border-radius: 20px 20px 10px 10px;
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: bold;
    position: relative;
}

.bus-front::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #cccccc, transparent);
}

.bus-front i {
    font-size: 1.5rem;
    color: #ffd700;
}

/* Container Principal das Poltronas */
.seats-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
}

/* Linha de Poltronas */
.seat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

/* Grupo de Poltronas (pares) */
.seat-group {
    display: flex;
    gap: 5px;
}

/* Corredor Central */
.corridor {
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.corridor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        to bottom,
        #dee2e6,
        #dee2e6 5px,
        transparent 5px,
        transparent 10px
    );
}

/* Estilo Individual da Poltrona */
.seat {
    width: 50px;
    height: 50px;
    border-radius: 10px 10px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    
    /* Estilo 3D */
    background: linear-gradient(135deg, var(--seat-blue-light) 0%, var(--seat-blue) 50%, var(--seat-blue-dark) 100%);
    border: 2px solid var(--seat-blue-dark);
}

/* Efeito 3D na poltrona */
.seat::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 40%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 8px 8px 0 0;
    pointer-events: none;
}

/* Encosto da poltrona */
.seat::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    right: 10%;
    height: 5px;
    background: var(--seat-blue-dark);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Estados da Poltrona */
.seat.available:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, var(--seat-hover) 0%, var(--seat-blue-light) 100%);
    box-shadow: 0 6px 12px rgba(0, 102, 204, 0.3);
}

.seat.selected {
    background: linear-gradient(135deg, #ffeb3b 0%, var(--seat-selected) 50%, #ffc107 100%);
    border-color: #ffa000;
    color: #333;
    transform: scale(1.05);
    animation: pulse 1s infinite;
}

.seat.selected::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
}

.seat.selected::after {
    background: #ffa000;
}

.seat.occupied {
    background: linear-gradient(135deg, #9e9e9e 0%, var(--seat-occupied) 50%, #424242 100%);
    border-color: #424242;
    cursor: not-allowed;
    opacity: 0.7;
}

.seat.occupied::after {
    background: #424242;
}

/* Animação de Pulso para Poltrona Selecionada */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 6px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
    }
}

/* Elementos Especiais (TV) */
.tv-element {
    background: #1a1a1a;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tv-element i {
    font-size: 14px;
}

/* Área de Serviços (Geladeira e WC) */
.services-area {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    border: 2px solid #90caf9;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border-radius: 8px;
    font-weight: 600;
    color: #1976d2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-item i {
    font-size: 1.2rem;
}

.service-item.geladeira {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #81c784;
}

.service-item.wc {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #64b5f6;
}

/* Legenda */
.seat-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.legend-seat {
    width: 35px;
    height: 35px;
    border-radius: 8px 8px 4px 4px;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-seat::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 15%;
    right: 15%;
    height: 3px;
    border-radius: 0 0 3px 3px;
}

.legend-available {
    background: linear-gradient(135deg, var(--seat-blue-light) 0%, var(--seat-blue) 50%, var(--seat-blue-dark) 100%);
    border: 2px solid var(--seat-blue-dark);
}

.legend-available::after {
    background: var(--seat-blue-dark);
}

.legend-occupied {
    background: linear-gradient(135deg, #9e9e9e 0%, var(--seat-occupied) 50%, #424242 100%);
    border: 2px solid #424242;
    opacity: 0.7;
}

.legend-occupied::after {
    background: #424242;
}

.legend-selected {
    background: linear-gradient(135deg, #ffeb3b 0%, var(--seat-selected) 50%, #ffc107 100%);
    border: 2px solid #ffa000;
}

.legend-selected::after {
    background: #ffa000;
}

/* Informações da Poltrona Selecionada */
.selected-seat-info {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border: 2px solid #ffd54f;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.selected-seat-info i {
    color: #f9a825;
}

.selected-seat-number {
    color: #f57c00;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 10px 0;
}

.selected-seat-text {
    color: #795548;
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 480px) {
    .bus-layout {
        max-width: 100%;
        padding: 10px;
    }
    
    .seat {
        width: 38px;
        height: 38px;
        font-size: 11px;
    }
    
    .corridor {
        width: 30px;
    }
    
    .tv-element {
        padding: 5px 8px;
        font-size: 9px;
    }
    
    .services-area {
        flex-direction: column;
        gap: 8px;
    }

    .seat-legend {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .legend-item {
        gap: 8px;
    }

    .legend-seat {
        width: 30px;
        height: 30px;
    }
}

/* Animação de entrada */
.bus-layout {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efeito de onda ao selecionar */
.seat.selecting {
    animation: wave 0.5s ease-out;
}

@keyframes wave {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1.05);
    }
}
