/**
 * CIREF - Search Autocomplete Styles
 */

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    animation: slideDown 0.2s ease;
}

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

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.search-result-item:hover {
    background: linear-gradient(90deg, rgba(39, 174, 96, 0.05), rgba(46, 204, 113, 0.05));
    padding-left: 1.5rem;
}

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

.search-result-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.search-result-item[data-type="article"] .search-result-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.search-result-item[data-type="projet"] .search-result-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

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

.search-result-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-desc {
    font-size: 0.85rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-arrow {
    color: #cbd5e1;
    transition: all 0.2s;
}

.search-result-item:hover .search-result-arrow {
    color: #27ae60;
    transform: translateX(5px);
}

.search-show-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: #27ae60;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 12px 12px;
    transition: all 0.2s;
}

.search-show-all:hover {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.search-no-results {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.95rem;
}

.search-no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .search-dropdown {
        position: fixed;
        top: 70px;
        left: 10px;
        right: 10px;
        max-height: calc(100vh - 80px);
    }

    .search-result-item {
        padding: 0.875rem 1rem;
    }

    .search-result-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .search-result-title {
        font-size: 0.9rem;
    }

    .search-result-desc {
        font-size: 0.8rem;
    }
}
