/* Стили для глобального поиска */
.global-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 8px;
}

.global-search-dropdown::-webkit-scrollbar {
    width: 6px;
}

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

.global-search-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.global-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

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

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

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

.search-result-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: bold;
    flex-shrink: 0;
}

.search-result-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.search-result-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-section-header {
    padding: 8px 16px;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    border-bottom: 1px solid #e9ecef;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.search-error {
    padding: 20px 16px;
    text-align: center;
    color: #dc3545;
}

.error-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.error-details {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 12px;
}

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.retry-button:hover {
    background: #0056b3;
}

.search-loading {
    padding: 20px 16px;
    text-align: center;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .global-search-dropdown {
        left: -10px;
        right: -10px;
        max-height: 300px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-section-header {
        padding: 6px 12px;
        font-size: 11px;
    }
}
