﻿/* ============ Search Dropdown ============ */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    margin-top: 8px;
    overflow: hidden;
    animation: searchFadeIn 0.2s ease;
}

@keyframes searchFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-inner {
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #1e293b;
    transition: background 0.15s;
    border-bottom: 1px solid #f1f5f9;
}

    .search-result-item:hover {
        background: #f8fafc;
    }

    .search-result-item img {
        width: 48px;
        height: 48px;
        border-radius: 8px;
        object-fit: cover;
        flex-shrink: 0;
    }

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-english {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-group {
    font-size: 10px;
    color: #6366f1;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 2px;
}

.search-no-result {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.search-results-footer {
    padding: 10px 16px;
    background: #f8fafc;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

    .search-results-footer a {
        color: #6366f1;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
    }

.search-highlight {
    background: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

/* Loading spinner */
.search-loading {
    padding: 20px;
    text-align: center;
}

    .search-loading .spinner {
        width: 24px;
        height: 24px;
        border: 3px solid #e2e8f0;
        border-top-color: #6366f1;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
        margin: 0 auto;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
