/* Vehicles List - Diseño Moderno tipo Gmail/Slack */

.vehicles-list-header{
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: transparent;
    color: var(--color1);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid #e9ecef;
    flex-shrink: 0;
}

.list-header-item{
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-header-item.sortable{
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.list-header-item.sortable:hover{
    opacity: 0.7;
}

.sort-icon{
    font-size: 14px;
    transition: all 0.2s ease;
}

.list-header-item i{
    cursor: pointer;
    transition: transform 0.2s ease;
}

.list-header-item i:hover{
    transform: scale(1.2);
}

.vehicles-list{
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.vehicle-list-item{
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.5s ease;
    cursor: pointer;
    background-color: white;
}

.vehicle-list-item.in-fail{
}

.vehicle-list-item.in-fail:hover{
    background-color: #f0f0f0;
    transform: translateX(4px);
    box-shadow: -4px 0 0 0 var(--color1);
}

.fail-dot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dc3545;
    display: inline-block;
    margin-right: 10px;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.ok-dot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #28a745;
    display: inline-block;
    margin-right: 10px;
    flex-shrink: 0;
}

.connection-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.connection-dot.online{
    background-color: #28a745;
    box-shadow: 0 0 4px rgba(40, 167, 69, 0.4);
}

.connection-dot.offline{
    background-color: #dc3545;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.3);
}

@keyframes pulse{
    0%, 100%{ opacity: 1; transform: scale(1); }
    50%{ opacity: 0.5; transform: scale(1.3); }
}

.fail-indicator{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #dc3545;
    font-weight: 600;
    margin-left: 0;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    background-color: rgba(220, 53, 69, 0.1);
    border-radius: 12px;
}

.fail-indicator i{
    font-size: 9px;
}

.outdated-indicator{
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #e67e22;
    font-weight: 600;
    margin-left: 0;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    background-color: rgba(230, 126, 34, 0.1);
    border-radius: 12px;
}

.outdated-indicator i{
    font-size: 9px;
}

.ok-indicator{
    color: #28a745;
    font-size: 16px;
}

.location-icon{
    color: var(--color1);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.location-icon:hover{
    transform: scale(1.2);
    opacity: 0.7;
}

/* Map Popup */
.map-popup-content{
    width: 700px;
    max-width: 90%;
    margin: 0;
    padding: 20px 25px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.map-popup-content .pp-close{
    margin-top: 0;
    margin-bottom: 5px;
}

.map-popup-content .popup-header{
    margin-top: 0;
    margin-bottom: 15px;
}

.map-container{
    border-radius: 8px;
    overflow: hidden;
}

.vehicle-list-item:hover{
    background-color: #f0f0f0;
    transform: translateX(4px);
    box-shadow: -4px 0 0 0 var(--color1);
}

.vehicle-list-item:last-child{
    border-bottom: none;
}

.vehicle-list-item.no-events{
    cursor: default;
}

.vehicle-list-item.no-events:hover{
    background-color: white;
    transform: none;
    box-shadow: none;
}

.list-item-col{
    font-size: 13px;
    color: #2c3e50;
    font-weight: 400;
}

.list-item-col.vehicle-name{
    flex: 2;
    font-weight: 600;
    color: #1a202c;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.vehicle-name-text{
    margin-right: 8px;
    flex-shrink: 0;
}

.cf-pills-row{
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    width: 100%;
}

.cf-pill{
    font-size: 10px;
    font-weight: 400;
    color: #6c757d;
    background: #f1f3f5;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.2px;
}

.list-item-col.date{
    flex: 1.5;
}

.list-item-col.time{
    flex: 1.5;
}

.list-item-col.actions{
    width: 60px;
    display: flex;
    justify-content: center;
}

.list-item-col.empty{
    color: #8b95a1;
    font-style: italic;
}

.list-item-col.no-events-message{
    color: #8b95a1;
    font-style: italic;
    font-size: 13px;
}

.list-action-icon{
    color: var(--color1);
    font-size: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.list-action-icon:hover{
    color: var(--color2);
    transform: scale(1.3);
}

/* Popup Events List */
.popup-header{
    text-align: center;
    margin: 5px 0 30px;
    padding-top: 0;
}

.edpp-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0 30px;
}

.live-btn{
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background-color: var(--color1);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.live-btn:hover{
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.live-btn i{
    font-size: 14px;
}

.popup-title{
    font-size: 22px;
    font-weight: 300;
    color: var(--color1);
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.popup-subtitle{
    font-size: 16px;
    color: #2c3e50;
    margin: 0;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#edpp .filters-card{
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    padding: 1rem 0;
}

.events-list-container{
    --edpp-columns: 250px 170px 170px 200px 170px 80px 80px;
    background: white;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    overflow: visible;
    display: flex;
    flex-direction: column;
    max-height: 450px;
    max-width: 1200px;
    margin: 0 auto;
}

.events-list-header{
    display: grid;
    grid-template-columns: var(--edpp-columns);
    align-items: center;
    padding: 12px 20px;
    background: transparent;
    color: var(--color1);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid #e9ecef;
    flex-shrink: 0;
}

.events-list{
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.event-list-item{
    display: grid;
    grid-template-columns: var(--edpp-columns);
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    background-color: white;
}

.event-list-item:hover{
    background-color: #f0f0f0;
}

.event-list-item:last-child{
    border-bottom: none;
}

.event-action-icon{
    color: var(--color1);
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0 4px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 125, 186, 0.1);
    position: relative;
}

.event-action-icon:hover{
    background-color: var(--color1);
    color: white;
    transform: scale(1.1);
}

/* Tooltip flotante */
.custom-tooltip{
    position: fixed;
    background-color: var(--color1);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10000;
    font-family: 'Poppins', Arial, sans-serif;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-tooltip.show{
    opacity: 1;
}

a .event-action-icon{
    color: var(--color1);
}

a:hover .event-action-icon{
    color: white;
}

.unabled-icon{
    color: #cbd5e0;
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: not-allowed;
    position: relative;
}

.unabled-icon::after{
    content: '';
    position: absolute;
    width: 100%;
    height: 1.5px;
    background-color: #cbd5e0;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(-45deg);
}

/* Scrollbar personalizado */
.vehicles-list::-webkit-scrollbar,
.events-list::-webkit-scrollbar{
    width: 6px;
}

.vehicles-list::-webkit-scrollbar-track,
.events-list::-webkit-scrollbar-track{
    background: #f1f1f1;
}

.vehicles-list::-webkit-scrollbar-thumb,
.events-list::-webkit-scrollbar-thumb{
    background: #c1c1c1;
    border-radius: 3px;
}

.vehicles-list::-webkit-scrollbar-thumb:hover,
.events-list::-webkit-scrollbar-thumb:hover{
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .vehicles-list-header,
    .events-list-header{
        padding: 10px 12px;
        font-size: 11px;
    }
    
    .vehicle-list-item,
    .event-list-item{
        padding: 12px;
    }
    
    .list-item-col{
        font-size: 12px;
    }
}
