/**
 * Estilos para búsqueda predictiva
 * NEOTUR
 */

/* Contenedor de resultados */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-height: 500px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.search-results-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-results-content {
    padding: 15px 0;
}

/* Sección de populares */
.search-popular {
    padding: 0 20px 15px;
    border-bottom: 1px solid #eee;
}

.search-popular h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popular-destinations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-destination-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.popular-destination-chip:hover {
    background: #00bfa5;
    color: #fff;
    transform: translateY(-2px);
}

.chip-count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
}

.popular-destination-chip:hover .chip-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Secciones de resultados */
.search-section {
    padding: 15px 0;
}

.search-section:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.search-section h5 {
    padding: 0 20px;
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Items de resultados */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s ease;
    position: relative;
}

.search-result-item:hover,
.search-result-item.active {
    background: #f8f9fa;
}

.search-result-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #00bfa5;
}

/* Imagen del tour */
.search-result-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

/* Item de categoría */
.category-item {
    padding: 10px 20px;
}

.category-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 8px;
    color: #00bfa5;
}

/* Información del resultado */
.result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    line-height: 1.3;
}

.search-result-item:hover .result-title {
    color: #00bfa5;
}

.result-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #777;
}

.result-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-meta i {
    font-size: 11px;
    opacity: 0.7;
}

.result-price {
    font-weight: 700;
    color: #00bfa5;
    font-size: 16px;
    white-space: nowrap;
}

/* Footer de resultados */
.search-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
}

.view-all-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00bfa5, #00a693);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-results:hover {
    background: linear-gradient(135deg, #00a693, #008e7c);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 165, 0.3);
}

/* Estados especiales */
.no-results,
.search-loading,
.search-error {
    padding: 40px 20px;
    text-align: center;
}

.no-results i,
.search-error i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.search-error i {
    color: #ff6b6b;
}

.no-results p,
.search-loading p,
.search-error p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* Spinner de carga */
.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f4f6;
    border-top-color: #00bfa5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Ajustar modal de búsqueda */
.search-modal-body {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    z-index: 1;
}

/* Scrollbar personalizado */
.search-results-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: #00bfa5;
    border-radius: 10px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: #00a693;
}

/* Responsive */
@media (max-width: 768px) {
    .search-results-dropdown {
        max-height: 400px;
    }
    
    .search-result-item {
        padding: 10px 15px;
    }
    
    .search-result-item img {
        width: 50px;
        height: 50px;
    }
    
    .result-meta {
        flex-direction: column;
        gap: 2px;
    }
    
    .popular-destination-chip {
        font-size: 13px;
        padding: 5px 10px;
    }
}

/* Destacar términos de búsqueda */
.search-highlight {
    background: #fff3cd;
    font-weight: 600;
    padding: 1px 2px;
    border-radius: 2px;
}