/* ============================================================
   search-modern.css – Enhanced Navigation Search Styling
   ============================================================ */

.search-dropdown-modern {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 2000;
    overflow: hidden;
    max-height: 450px;
    overflow-y: auto;
    display: none;
    animation: searchDropdownSlideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-dropdown-modern.show {
    display: block;
}

.search-dropdown-item-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8fafc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: #0f172a;
    text-decoration: none;
}

.search-dropdown-item-modern:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding-left: 18px;
}

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

.search-dropdown-item-modern i {
    color: #2563eb;
    font-size: 14px;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.search-dropdown-item-modern div {
    flex: 1;
    min-width: 0;
}

.search-dropdown-item-modern div div:first-child {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-item-modern div div:last-child {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Loading State */
.search-dropdown-modern.loading {
    display: block;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-dropdown-modern.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Empty State */
.search-dropdown-empty,
.search-dropdown-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
    min-height: 80px;
}

.search-dropdown-error {
    color: #dc2626;
}

/* Scrollbar Styling */
.search-dropdown-modern::-webkit-scrollbar {
    width: 6px;
}

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

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

.search-dropdown-modern::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes searchDropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .search-dropdown-modern {
        max-height: 300px;
    }

    .search-dropdown-item-modern {
        padding: 10px 14px;
    }

    .search-dropdown-item-modern i {
        font-size: 13px;
    }

    .search-dropdown-item-modern div div:first-child {
        font-size: 13px;
    }

    .search-dropdown-item-modern div div:last-child {
        font-size: 11px;
    }
}

/* Accessibility */
.search-dropdown-item-modern:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .search-dropdown-modern,
    .search-dropdown-item-modern {
        animation: none;
        transition: none;
    }
}
