/* Search Suggestions - Design Modern și Elegant */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    max-height: 320px;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin-top: 1px;
    animation: fadeInDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    text-decoration: none;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInItem 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    position: relative;
}

.search-suggestion-item:hover,
.search-suggestion-item.selected {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #111827;
    border-left: 4px solid #3b82f6;
    padding-left: 12px;
    transform: translateX(2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.search-suggestion-item:hover .search-suggestion-title,
.search-suggestion-item.selected .search-suggestion-title {
    color: #1e40af;
    font-weight: 700;
}

.search-suggestion-item:hover .search-suggestion-subtitle,
.search-suggestion-item.selected .search-suggestion-subtitle {
    color: #4b5563;
}

.search-suggestion-item:hover .search-icon,
.search-suggestion-item.selected .search-icon {
    transform: scale(1.1);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-icon {
    width: 22px;
    height: 22px;
    margin-right: 14px;
    flex-shrink: 0;
    display: inline-block;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.12)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.24));
}

.search-suggestion-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    display: inline-block;
}

.search-suggestion-content {
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.search-suggestion-title {
    font-size: 14px;
    color: #1f2937;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.search-suggestion-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    line-height: 1.3;
}

.search-suggestion-type {
    font-size: 10px;
    color: #9ca3af;
    margin: 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    opacity: 0.8;
}

.search-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.search-no-results:before {
    content: '🔍';
    font-size: 24px;
    opacity: 0.5;
}

.search-try-again {
    padding: 6px 10px;
    text-align: center;
    color: #007bff;
    font-size: 10px;
    cursor: pointer;
    border-top: 1px solid #f0f0f0;
}

.search-try-again:hover {
    background-color: #f8f9fa;
}

.search-view-all {
    border-top: 1px solid #eee;
    background-color: #fafafa;
}

.search-view-all .search-suggestion-title {
    color: #007bff;
    font-weight: 500;
    font-size: 10px;
}

/* Loading state */
.search-loading {
    padding: 16px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-loading:before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container pentru search input și sugestii */
.search-input {
    position: relative !important;
}

.search-input #global-search {
    position: relative;
    z-index: 1;
}

/* Animații pentru sugestii */
.search-suggestion-item:nth-child(1) { animation-delay: 0.05s; }
.search-suggestion-item:nth-child(2) { animation-delay: 0.1s; }
.search-suggestion-item:nth-child(3) { animation-delay: 0.15s; }
.search-suggestion-item:nth-child(4) { animation-delay: 0.2s; }
.search-suggestion-item:nth-child(5) { animation-delay: 0.25s; }
.search-suggestion-item:nth-child(6) { animation-delay: 0.3s; }
.search-suggestion-item:nth-child(7) { animation-delay: 0.35s; }
.search-suggestion-item:nth-child(8) { animation-delay: 0.4s; }
.search-suggestion-item:nth-child(9) { animation-delay: 0.45s; }
.search-suggestion-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateX(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Responsive - Design îmbunătățit pentru mobil */
@media (max-width: 768px) {
    .search-suggestions {
        left: -10px;
        right: -10px;
        border-radius: 0 0 12px 12px;
        max-height: 280px;
        margin-top: 2px;
        border-left: 1px solid #e1e5e9;
        border-right: 1px solid #e1e5e9;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }
    
    .search-suggestion-item {
        padding: 14px 16px;
    }
    
    .search-icon {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
    
    .search-suggestion-title {
        font-size: 13px;
    }
    
    .search-suggestion-subtitle {
        font-size: 11px;
    }
    
    .search-suggestion-type {
        font-size: 9px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .search-suggestions {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(0, 0, 0, 0.15);
    }
    
    .search-suggestion-item {
        color: #f9fafb;
        border-bottom-color: #374151;
    }
    
    .search-suggestion-item:hover,
    .search-suggestion-item.selected {
        background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
        color: #ffffff;
        border-left-color: #60a5fa;
    }
    
    .search-suggestion-title {
        color: #f9fafb;
    }
    
    .search-suggestion-item:hover .search-suggestion-title,
    .search-suggestion-item.selected .search-suggestion-title {
        color: #dbeafe;
    }
    
    .search-suggestion-subtitle {
        color: #d1d5db;
    }
    
    .search-suggestion-item:hover .search-suggestion-subtitle,
    .search-suggestion-item.selected .search-suggestion-subtitle {
        color: #f3f4f6;
    }
    
    .search-suggestion-type {
        color: #9ca3af;
    }
    
    .search-no-results {
        color: #9ca3af;
    }
}

/* Stiluri pentru scrollbar personalizat */
.search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (prefers-color-scheme: dark) {
    .search-suggestions::-webkit-scrollbar-track {
        background: #374151;
    }
    
    .search-suggestions::-webkit-scrollbar-thumb {
        background: #6b7280;
    }
    
    .search-suggestions::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }
}

/* Stiluri îmbunătățite pentru search input */
.search-input #global-search:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
    outline: none;
}

.search-input .input-group-text {
    transition: all 0.2s ease;
}

.search-input:focus-within .input-group-text {
    border-color: #3b82f6;
    background-color: #f8fafc;
}

/* Îmbunătățire pentru hover effects pe search suggestions */
.search-suggestion-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-suggestion-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-suggestion-item.selected {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}
