/* Estilos para el dropdown de resultados de búsqueda */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: -2px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    gap: 12px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8fafc;
    transform: translateX(2px);
}

.search-result-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animación de entrada */
.search-results-dropdown {
    animation: searchDropdownSlide 0.3s ease;
}

@keyframes searchDropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .search-result-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .search-result-image {
        width: 40px;
        height: 40px;
    }
    
    .search-result-title {
        font-size: 13px;
    }
    
    .search-result-description {
        font-size: 11px;
    }
}

/* Estilo para cuando no hay resultados */
.search-no-results {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

/* Mejoras para el input de búsqueda */
#search-overlay input[type="text"] {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

#search-overlay input[type="text"]:focus {
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

/* Indicador de carga */
.search-loading {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.search-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #93C121;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
