/**
 * Global Search CSS for ExamCurrator
 * Provides styles for the search bar and results dropdown.
 */

.global-search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.global-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    padding: 10px 16px 10px 40px;
    color: var(--text-primary, var(--text, #fff));
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    font-family: inherit;
}

[data-theme="light"] .global-search-input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(99, 102, 241, 0.2);
}

.global-search-input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .global-search-input:focus {
    background: #fff;
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.global-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: color 0.3s ease;
}

.global-search-input:focus+.global-search-icon {
    color: #8b5cf6;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: none;
    z-index: 1000;
}

[data-theme="light"] .search-results-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.search-results-dropdown.visible {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

[data-theme="light"] .search-result-item {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

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

.search-result-item:hover {
    background: rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .search-result-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.search-result-word {
    font-weight: 800;
    color: #fff;
    font-size: 0.95rem;
}

[data-theme="light"] .search-result-word {
    color: #1e293b;
}

.search-result-translation {
    color: #8b5cf6;
    font-size: 0.8rem;
    font-weight: 600;
}

[data-theme="light"] .search-result-translation {
    color: #4f46e5;
}

.search-result-type {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748b;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

[data-theme="light"] .search-result-type {
    background: rgba(0, 0, 0, 0.05);
}
