.search-desktop-wrapper {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 250px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    display: none;
    animation: fadeIn 0.2s ease;
}

.search-dropdown.active {
    display: block;
}

.search-dropdown::after {
    content: '';
    position: absolute;
    top: -7px;
    right: 10px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

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

.search-dropdown .input-group-text {
    border-radius: 8px;
    background: white;
    border-right: none;
    padding: 4px;
}

.search-dropdown .form-control {
    border-left: none;
    box-shadow: none;
    font-size: 0.9rem;
    padding: 4px 4px 4px 0;
    border-radius: 8px;
}

.search-dropdown .form-control:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.search-results {
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border-radius: 8px;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: #c0c0c0 transparent;
}

.search-results::-webkit-scrollbar {
    width: 1px;
}

.search-results::-webkit-scrollbar-track {
    background: transparent;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 999px;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 6px;
    margin-bottom: 4px;
}

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

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

.search-result-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
    font-size: 1rem;
}

.search-result-menu-path {
    font-size: 0.85rem;
    color: #7a7a7a;
    line-height: 1.2;
}

.search-result-type {
    display: inline-block;
    font-size: 0.7rem;
    color: #666;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.search-result-description {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-no-results,
.search-loading {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

.search-loading i {
    animation: spin 1s linear infinite;
}

.btn-search {
    color: var(--text-main);
    border: none;
}

.btn-search:hover {
    color: var(--red-dark);
}

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

@media (max-width: 991.98px) {
    .search-mobile-wrapper {
        flex: 1;
        margin: 0 12px;
        max-width: 300px;
        position: relative;
        z-index: 1051;
    }
    
    .search-mobile-wrapper .input-group {
        border-radius: 8px;
    }
    
    .search-mobile-wrapper .input-group-text {
        border-radius: 8px 0 0 8px;
        background: white;
        border-right: none;
    }
    
    .search-mobile-wrapper .form-control {
        border-radius: 0 8px 8px 0;
        border-left: none;
        font-size: 0.85rem;
    }
    
    .search-mobile-wrapper .form-control:focus {
        box-shadow: none;
        border-color: #ced4da;
    }
    
    .search-mobile-wrapper .search-results {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 12px;
        max-height: 400px;
        overflow-y: auto;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        z-index: 1052;
        margin-top: 0;
        padding: 8px;
    }
}
