/* ================================================== */
/* LIVE SEARCH DROPDOWN - Premium Styling */
/* ================================================== */

/* Backdrop overlay */
.tr-live-results-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.2);
    z-index: 9998;
}

.tr-live-results-backdrop.is-visible {
    display: block;
}

.tr-live-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    z-index: 9999;
    max-height: 480px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #E5E7EB;
}

.tr-live-results-list {
    padding: 8px;
}

/* Each result row */
.tr-result-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1F2937;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: background 0.15s ease;
}

.tr-result-item:last-child {
    margin-bottom: 0;
}

.tr-result-item:hover {
    background: #F0F9F4;
}

/* Icon on left */
.tr-result-icon {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content on right */
.tr-result-content {
    flex: 1;
    min-width: 0;
    text-align: left;
}

/* Question title */
.tr-result-question {
    font-weight: 600;
    font-size: 15px;
    color: #1F2937;
    margin-bottom: 4px;
    line-height: 1.4;
    text-align: left;
}

/* Highlighted search term */
.tr-result-question mark {
    background: #FEF3C7;
    color: #92400E;
    padding: 2px 0;
    border-radius: 0;
    font-weight: 700;
}

/* Answer excerpt */
.tr-result-excerpt {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 6px;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category badge */
.tr-result-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #0F5E41;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    background: #F0F9F4;
    padding: 3px 10px;
    border-radius: 99px;
    margin-top: 2px;
}

/* Loading state */
.tr-search-loading {
    padding: 32px 24px;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}

/* No results */
.tr-no-results {
    padding: 32px 24px;
    text-align: center;
}

.tr-no-results p {
    margin: 0 0 12px;
    color: #6B7280;
    font-size: 14px;
}

.tr-no-results a {
    color: #0F5E41;
    font-weight: 600;
    text-decoration: none;
}

.tr-no-results a:hover {
    text-decoration: underline;
}

/* Error state */
.tr-search-error {
    padding: 32px 24px;
    text-align: center;
    color: #DC2626;
    font-size: 14px;
}

/* Scrollbar */
.tr-live-results::-webkit-scrollbar {
    width: 6px;
}

.tr-live-results::-webkit-scrollbar-track {
    background: transparent;
}

.tr-live-results::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.tr-live-results::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Mobile */
@media (max-width: 640px) {
    .tr-live-results {
        max-height: 60vh;
        border-radius: 12px;
    }
    
    .tr-result-item {
        padding: 12px;
        gap: 12px;
    }
    
    .tr-result-question {
        font-size: 14px;
    }
    
    .tr-result-excerpt {
        font-size: 12px;
        -webkit-line-clamp: 1;
    }
}