/* 
 * Estilos para shortcode de vuelos Aviasales
 * Versión limpia y simple
 */

.aviasales-tabla-vuelos {
    margin: 25px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: white;
    width: 100%;
}

/* ============================================================================
   TABLA PRINCIPAL
   ============================================================================ */

.aviasales-tabla-container {
    overflow-x: auto;
    width: 100%;
}

.aviasales-tabla {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    table-layout: fixed;
}

/* CABECERA */
.aviasales-tabla thead {
    background: #ff5e3a;
}

.aviasales-tabla th {
    color: white;
    padding: 16px 5px;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e04a2a;
    text-align: center;
    vertical-align: middle;
    height: 60px;
}

/* CUERPO */
.aviasales-tabla td {
    padding: 15px 5px;
    border-bottom: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    font-size: 15px;
    height: 70px;
}

/* Distribución de columnas */
.aviasales-tabla th.col-fechas,
.aviasales-tabla td.col-fechas {
    width: 25%;
}

.aviasales-tabla th.col-duracion,
.aviasales-tabla td.col-duracion {
    width: 15%;
}

.aviasales-tabla th.col-aerolinea,
.aviasales-tabla td.col-aerolinea {
    width: 20%;
}

.aviasales-tabla th.col-escalas,
.aviasales-tabla td.col-escalas {
    width: 20%;
}

.aviasales-tabla th.col-precio,
.aviasales-tabla td.col-precio {
    width: 20%;
}

/* Filas alternas */
.aviasales-tabla tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.aviasales-tabla tbody tr:hover {
    background-color: #e3f2fd;
    cursor: pointer;
}

/* ============================================================================
   ESTILOS DE COLUMNAS
   ============================================================================ */

/* FECHAS */
.fechas-linea {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 5px;
    line-height: 1.2;
}

.fecha-salida,
.fecha-regreso {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.fecha-flecha {
    color: #6c757d;
    margin: 0 3px;
    font-size: 0.9em;
}

.dias-viaje {
    color: #6c757d;
    font-size: 0.85em;
    margin-left: 5px;
}

/* DURACIÓN Y AEROLÍNEA */
.aviasales-duracion,
.aviasales-aerolinea,
.aviasales-escalas-texto {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.aviasales-aerolinea {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

/* PRECIO - BADGE VERDE */
.aviasales-precio-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 700;
    min-width: 100px;
    height: 40px;
    background: #2ecc71;
    color: white;
    box-shadow: 0 2px 4px rgba(46, 204, 113, 0.3);
    transition: all 0.2s ease;
}

.aviasales-precio-badge:hover {
    background: #27ae60;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.4);
}

/* ============================================================================
   RESPONSIVE MÓVIL
   ============================================================================ */

/* ESCRITORIO */
@media (min-width: 768px) {
    .aviasales-tabla {
        min-width: 700px;
    }
    
    .aviasales-tabla th,
    .aviasales-tabla td {
        font-size: 16px;
        padding: 16px 8px;
    }
    
    .aviasales-precio-badge {
        font-size: 1.1em;
        min-width: 110px;
        height: 42px;
    }
}

/* MÓVIL */
@media (max-width: 767px) {
    .aviasales-tabla {
        font-size: 14px;
        min-width: 100%;
    }
    
    .aviasales-tabla th,
    .aviasales-tabla td {
        padding: 12px 4px;
        font-size: 14px;
        height: 60px;
    }
    
    /* OCULTAR ESCALAS Y AEROLÍNEA EN MÓVIL */
    .aviasales-tabla th.col-escalas,
    .aviasales-tabla td.col-escalas,
    .aviasales-tabla th.col-aerolinea,
    .aviasales-tabla td.col-aerolinea {
        display: none;
    }
    
    /* REDISTRIBUIR ANCHOS */
    .aviasales-tabla th.col-fechas,
    .aviasales-tabla td.col-fechas {
        width: 40%;
    }
    
    .aviasales-tabla th.col-duracion,
    .aviasales-tabla td.col-duracion {
        width: 30%;
    }
    
    .aviasales-tabla th.col-precio,
    .aviasales-tabla td.col-precio {
        width: 30%;
    }
    
    /* COMPACTAR */
    .fechas-linea {
        gap: 3px;
        font-size: 13px;
    }
    
    .fecha-salida,
    .fecha-regreso {
        font-size: 13px;
    }
    
    .aviasales-precio-badge {
        min-width: 85px;
        padding: 6px 12px;
        font-size: 0.95em;
        height: 36px;
    }
}

/* MÓVILES MUY PEQUEÑOS */
@media (max-width: 479px) {
    .aviasales-tabla th,
    .aviasales-tabla td {
        padding: 10px 3px;
        font-size: 13px;
        height: 55px;
    }
    
    .fechas-linea {
        font-size: 12px;
    }
    
    .fecha-salida,
    .fecha-regreso {
        font-size: 12px;
    }
    
    .aviasales-precio-badge {
        min-width: 75px;
        padding: 5px 10px;
        font-size: 0.9em;
        height: 34px;
    }
}

/* ============================================================================
   FILTROS ACTIVOS
   ============================================================================ */

.aviasales-filtros-activos {
    background: rgba(255, 94, 58, 0.1);
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 94, 58, 0.2);
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aviasales-filtro-badge {
    background: #ff5e3a;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

/* ============================================================================
   PIE DE TABLA
   ============================================================================ */

.aviasales-footer {
    background: #f8f9fa;
    padding: 10px 20px;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.aviasales-info-adicional {
    text-align: center;
    font-size: 0.85em;
    color: #6c757d;
    line-height: 1.4;
}

/* ============================================================================
   EFECTO HOVER
   ============================================================================ */

.aviasales-tabla tbody tr.hover-activo {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

/* ============================================================================
   MEJORAS PARA LA NUEVA VERSIÓN
   ============================================================================ */

.aviasales-cabecera {
    padding: 15px 20px;
    background: rgba(255, 94, 58, 0.05);
    border-bottom: 1px solid rgba(255, 94, 58, 0.1);
}

.aviasales-info-busqueda-solo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.aviasales-ruta {
    font-weight: 700;
    font-size: 1.2em;
    color: #2c3e50;
}

.aviasales-periodo {
    font-size: 0.9em;
    color: #6c757d;
}

.aviasales-info-busqueda {
    margin-left: 10px;
    font-size: 0.9em;
    color: #6c757d;
}

.tipo-vuelo-badge {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8em;
    margin-top: 3px;
    font-weight: 600;
}

/* Ajuste para solo ida en móvil */
@media (max-width: 767px) {
    .aviasales-ruta {
        font-size: 1em;
    }
    
    .aviasales-periodo {
        font-size: 0.8em;
    }
}