.search-result {
    margin-bottom: 20px;
}
.search-result h2 {
    margin: 0 0 10px 0;
}
.search-result p {
    margin: 0;
}
#openai-search-results p.loading {
    font-style: italic;
    color: #999;
}

/* ── Search loading bar ── */
/* Thin progress bar fixed to the top of the viewport.
   Shows during full-page search navigations so the user
   knows LucidSearch is working. Theme-safe: position fixed,
   high z-index, no DOM dependency. */

.lucidsearch-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: #2271b1;
    z-index: 999999;
    pointer-events: none;
    transition: none;
}

/* Shift below WP admin bar when logged in */
.admin-bar .lucidsearch-loading-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .lucidsearch-loading-bar {
        top: 46px;
    }
}

.lucidsearch-loading-bar.is-active {
    animation: lucidsearch-progress 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes lucidsearch-progress {
    0%   { width: 0; }
    15%  { width: 30%; }
    50%  { width: 60%; }
    80%  { width: 80%; }
    100% { width: 92%; }
}

/* ── AI Answer card ── */

.lucidsearch-ai-answer {
    background: #f0f7ff;
    border: 1px solid #d0e3f7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.lucidsearch-ai-answer-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.lucidsearch-ai-answer-icon {
    font-size: 16px;
    line-height: 1;
}

.lucidsearch-ai-answer-label {
    font-size: 13px;
    font-weight: 600;
    color: #2271b1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lucidsearch-ai-answer-body {
    font-size: 15px;
    line-height: 1.6;
    color: #1d2327;
    margin-bottom: 12px;
}

.lucidsearch-ai-answer-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #d0e3f7;
}

.lucidsearch-ai-answer a.lucidsearch-ai-answer-source,
.lucidsearch-ai-answer a.lucidsearch-ai-answer-source:visited {
    font-size: 13px;
    color: #1d4872;
    text-decoration: none;
    padding: 4px 10px;
    background: #dae8f5;
    border: 1px solid #b8cfe0;
    border-radius: 4px;
    transition: background 0.15s;
}

.lucidsearch-ai-answer a.lucidsearch-ai-answer-source:hover {
    background: #c8ddef;
    color: #1d4872;
    text-decoration: none;
}

.lucidsearch-ai-answer .lucidsearch-ai-answer-source-num {
    font-weight: 600;
}