@charset "utf-8";

/* Lista de veículos */
#resultado_instalacoes {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Item de veículo */
#resultado_instalacoes a.item-veiculo {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 0;
    background: #ffffff;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    /* Para garantir que a borda apareça corretamente */
}

#resultado_instalacoes a.item-veiculo:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

/* Veículo selecionado */
#resultado_instalacoes .item-veiculo.selecionado {
    background: linear-gradient(135deg, #ff8c00, #ffa500) !important;
    color: #ffffff !important;
    border-color: #ff8c00 !important;
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3) !important;
    transform: translateY(-2px);
}

#resultado_instalacoes .item-veiculo.selecionado * {
    color: #ffffff !important;
}

#resultado_instalacoes .item-veiculo.selecionado .vehicle-status {
    border: 2px solid #ffffff;
}

.vehicle-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
}

/* Status do veículo */
.vehicle-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.status-online {
    background-color: #28a745;
}

.status-offline {
    background-color: #dc3545;
}

.status-stopped {
    background-color: #ffc107;
}

/* Conteúdo do veículo */
.vehicle-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
}

.vehicle-image {
    width: 50px;
    height: 35px;
    margin-right: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-info {
    flex: 1;
    min-width: 0;
}

.vehicle-plate {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-name {
    font-size: 12px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controles */
.controls-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.controls-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.controls-title i {
    margin-right: 8px;
    color: #007bff;
}

/* Mapa */
#resultado_mapa {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Botão Todos */
.btn-show-all {
    width: 100%;
    margin-top: 15px;
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-show-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Scrollbar personalizada */
#resultado_instalacoes::-webkit-scrollbar {
    width: 6px;
}

#resultado_instalacoes::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

#resultado_instalacoes::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

#resultado_instalacoes::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Labels dos veículos no mapa */
.vehicle-label {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 4px 8px;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    backdrop-filter: blur(2px);
}

/* CSS para status do painel de emergência */
#painel_emergencia {
    transition: border-color 0.3s ease;
}

#painel_emergencia.status-online {
    border-color: #28a745 !important;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.2);
}

#painel_emergencia.status-stopped {
    border-color: #ffc107 !important;
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.2);
}

#painel_emergencia.status-offline {
    border-color: #dc3545 !important;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.2);
}

/* Indicador visual adicional no painel */
#painel_emergencia::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#painel_emergencia.status-online::before {
    background: linear-gradient(45deg, #28a745, #20c997);
    opacity: 0.1;
}

#painel_emergencia.status-stopped::before {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    opacity: 0.1;
}

#painel_emergencia.status-offline::before {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    opacity: 0.1;
}