/* ============================================
   AJAX SEARCH DROPDOWN
   ============================================ */

.search-input-wrapper {
    position: relative;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: -2px;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
    gap: 16px;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8f9ff; }

.result-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.result-word {
    font-family: var(--font-ewe);
    font-size: 1.1rem;
    color: #1a1a2e;
    font-weight: 600;
}
.result-word mark { background: rgba(255,215,0,0.3); padding: 1px 3px; border-radius: 2px; }

.result-pron { font-size: 0.8rem; color: #888; font-style: italic; }

.result-translations { display: flex; flex-direction: column; gap: 2px; text-align: right; flex-shrink: 0; }

.result-eng { font-size: 0.9rem; color: #333; }
.result-eng mark { background: rgba(255,215,0,0.3); padding: 1px 3px; border-radius: 2px; }
.result-fr { font-size: 0.8rem; color: #888; }

.result-tone {
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
}

.search-view-all {
    display: block;
    text-align: center;
    padding: 14px;
    background: #f8f9fa;
    color: #1a73e8;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-top: 1px solid #e0e0e0;
}
.search-view-all:hover { background: #e8f0fe; }

.search-loading,
.search-no-results,
.search-error {
    padding: 24px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.search-error { color: #c62828; }

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
    .search-results-dropdown {
        max-height: 300px;
        border-radius: 0;
    }
    
    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 12px 16px;
    }
    
    .result-translations { text-align: left; }
}