/**
 * OCS Transfers - Public Styles
 * Estilos para los resultados de búsqueda de vehículos
 *
 * @package OCS_Transfers
 */

/* ═══════════════════════════════════════════════════════════════ */
/* CONTENEDOR DE RESULTADOS                                        */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-search-results {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ═══════════════════════════════════════════════════════════════ */
/* HEADER DE RESULTADOS                                            */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ocs-route-info h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
}

.ocs-route-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #F3A51C;
    margin: 0 0 0.5rem 0;
}

.ocs-route-arrow {
    color: #48B7B6;
    font-weight: 400;
}

.ocs-search-info {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.ocs-search-info span {
    margin-right: 1rem;
}

.ocs-search-info span:last-child {
    margin-right: 0;
}

/* Botón nueva búsqueda */
.ocs-new-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #48B7B6;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ocs-new-search-btn:hover {
    background: #3a9695;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 183, 182, 0.3);
}

.ocs-new-search-btn:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════ */
/* GRID DE VEHÍCULOS                                               */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════ */
/* TARJETA DE VEHÍCULO                                             */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-vehicle-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ocs-vehicle-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

/* ─────────────── Imagen del Vehículo ─────────────── */

.ocs-vehicle-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.ocs-vehicle-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ocs-vehicle-card:hover .ocs-vehicle-image img {
    transform: scale(1.05);
}

/* Badge de categoría */
.ocs-vehicle-category {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 1rem;
    background: #F3A51C;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Colores por categoría */
.ocs-category-economico {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.ocs-category-ejecutivo {
    background: linear-gradient(135deg, #007bff 0%, #17a2b8 100%);
}

.ocs-category-vip {
    background: linear-gradient(135deg, #F3A51C 0%, #fd7e14 100%);
}

.ocs-category-lujo {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
}

/* Placeholder de imagen */
.ocs-vehicle-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 4rem;
    color: #ccc;
}

/* ─────────────── Información del Vehículo ─────────────── */

.ocs-vehicle-info {
    padding: 1.5rem;
    flex: 1;
}

.ocs-vehicle-name {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
}

/* Especificaciones */
.ocs-vehicle-specs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.ocs-spec {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

.ocs-spec .ocs-icon {
    font-size: 1.2rem;
}

.ocs-spec-value {
    font-weight: 500;
}

/* Características del vehículo */
.ocs-vehicle-features {
    margin-bottom: 1rem;
}

.ocs-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ocs-feature-heading {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4rem;
    list-style: none;
}

.ocs-feature-item {
    position: relative;
    font-size: 0.85rem;
    color: #555;
    padding-left: 1.2rem;
    margin-bottom: 0.3rem;
    line-height: 1.5;
}

.ocs-feature-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}

/* Descripción */
.ocs-vehicle-description {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.ocs-vehicle-description p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

/* ─────────────── Precio del Vehículo ─────────────── */

.ocs-vehicle-price {
    padding: 1.5rem;
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f5 100%);
    border-top: 1px solid #eee;
    text-align: center;
}

.ocs-price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.ocs-currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.ocs-price-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #F3A51C;
    margin-left: 0.25rem;
    line-height: 1;
}

.ocs-price-type {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.ocs-price-roundtrip {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    color: #888;
}

.ocs-price-roundtrip strong {
    color: #48B7B6;
}

/* Botón seleccionar */
.ocs-select-vehicle-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #F3A51C 0%, #e69500 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ocs-select-vehicle-btn:hover {
    background: linear-gradient(135deg, #e69500 0%, #cc8400 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 165, 28, 0.4);
}

.ocs-select-vehicle-btn:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════ */
/* SIN RESULTADOS                                                  */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ocs-no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.ocs-no-results h3 {
    color: #333;
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
}

.ocs-no-results p {
    color: #666;
    margin: 0 0 1.5rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════ */
/* LOADING STATE                                                   */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-results-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.ocs-results-loading .ocs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #F3A51C;
    border-radius: 50%;
    animation: ocs-spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes ocs-spin {
    to {
        transform: rotate(360deg);
    }
}

.ocs-results-loading p {
    color: #666;
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════ */
/* ANIMACIONES                                                     */
/* ═══════════════════════════════════════════════════════════════ */

.ocs-fade-in {
    animation: ocsFadeIn 0.4s ease forwards;
}

@keyframes ocsFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ocs-vehicle-card {
    animation: ocsSlideUp 0.4s ease forwards;
    opacity: 0;
}

.ocs-vehicle-card:nth-child(1) { animation-delay: 0.1s; }
.ocs-vehicle-card:nth-child(2) { animation-delay: 0.2s; }
.ocs-vehicle-card:nth-child(3) { animation-delay: 0.3s; }
.ocs-vehicle-card:nth-child(4) { animation-delay: 0.4s; }
.ocs-vehicle-card:nth-child(5) { animation-delay: 0.5s; }
.ocs-vehicle-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes ocsSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                      */
/* ═══════════════════════════════════════════════════════════════ */

@media (max-width: 992px) {
    .ocs-vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ocs-search-results {
        padding: 0 0.75rem;
        margin: 1rem auto;
    }

    .ocs-results-header {
        flex-direction: column;
        padding: 1.25rem;
        text-align: center;
    }

    .ocs-route-info {
        width: 100%;
    }

    .ocs-route-details {
        justify-content: center;
    }

    .ocs-search-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .ocs-search-info span {
        margin-right: 0;
    }

    .ocs-new-search-btn {
        width: 100%;
        justify-content: center;
    }

    .ocs-vehicles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ocs-vehicle-image {
        height: 180px;
    }

    .ocs-vehicle-info {
        padding: 1.25rem;
    }

    .ocs-vehicle-specs {
        gap: 1rem;
    }

    .ocs-vehicle-price {
        padding: 1.25rem;
    }

    .ocs-price-value {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .ocs-route-info h3 {
        font-size: 1.25rem;
    }

    .ocs-route-details {
        font-size: 1rem;
        flex-wrap: wrap;
    }

    .ocs-vehicle-name {
        font-size: 1.1rem;
    }

    .ocs-vehicle-specs {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════ */
/* PRINT STYLES                                                    */
/* ═══════════════════════════════════════════════════════════════ */

@media print {
    .ocs-new-search-btn,
    .ocs-select-vehicle-btn {
        display: none;
    }

    .ocs-vehicle-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .ocs-vehicle-card:hover {
        transform: none;
        box-shadow: none;
    }
}
