/*
 * Pagefind UI theme overrides for urinenephrology.org
 * Loaded alongside /pagefind/pagefind-ui.css — overrides the default
 * light-mode palette so search results are readable in both light and
 * dark themes, and styles result links in the site's conventional blue.
 *
 * Pagefind UI's documented CSS custom properties are set via the
 * `.pagefind-ui` selector; see https://pagefind.app/docs/ui/
 */

/* Light mode / default */
.pagefind-ui {
    --pagefind-ui-scale: 0.9;
    --pagefind-ui-primary: #2c5282;
    --pagefind-ui-text: #2d3748;
    --pagefind-ui-background: #ffffff;
    --pagefind-ui-border: #e2e8f0;
    --pagefind-ui-tag: #f8f9fa;
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 8px;
    --pagefind-ui-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Dark mode */
[data-theme="dark"] .pagefind-ui {
    --pagefind-ui-primary: #90cdf4;
    --pagefind-ui-text: #f7fafc;
    --pagefind-ui-background: #2d3748;
    --pagefind-ui-border: #4a5568;
    --pagefind-ui-tag: #1a202c;
}

/* Result entry titles — make them bright readable links */
.pagefind-ui .pagefind-ui__result-title,
.pagefind-ui .pagefind-ui__result-title a {
    color: #1d4ed8 !important;
    text-decoration: underline;
    font-weight: 600;
}
[data-theme="dark"] .pagefind-ui .pagefind-ui__result-title,
[data-theme="dark"] .pagefind-ui .pagefind-ui__result-title a {
    color: #7db8e0 !important;
}

/* Sub-result links inside the results */
.pagefind-ui .pagefind-ui__result-link {
    color: #1d4ed8 !important;
    text-decoration: underline;
}
[data-theme="dark"] .pagefind-ui .pagefind-ui__result-link {
    color: #7db8e0 !important;
}

/* Result excerpt body text — keep readable */
.pagefind-ui .pagefind-ui__result-excerpt {
    color: var(--pagefind-ui-text, #2d3748);
}
[data-theme="dark"] .pagefind-ui .pagefind-ui__result-excerpt {
    color: #e2e8f0;
}

/* Highlighted search-term mark — gold on both themes for visibility */
.pagefind-ui mark {
    background: #fef08a;
    color: #1e293b;
    padding: 0 2px;
    border-radius: 2px;
}
[data-theme="dark"] .pagefind-ui mark {
    background: #ca8a04;
    color: #0f172a;
}

/* Each result card: clearer separation + hover lift */
.pagefind-ui .pagefind-ui__result {
    border-bottom: 1px solid var(--pagefind-ui-border);
    padding: 12px 0;
    transition: background 0.15s ease;
}
.pagefind-ui .pagefind-ui__result:hover {
    background: rgba(45, 82, 130, 0.04);
}
[data-theme="dark"] .pagefind-ui .pagefind-ui__result:hover {
    background: rgba(144, 205, 244, 0.06);
}

/* Search input */
.pagefind-ui .pagefind-ui__search-input {
    background: var(--pagefind-ui-background);
    color: var(--pagefind-ui-text);
    border: 1px solid var(--pagefind-ui-border);
}
.pagefind-ui .pagefind-ui__search-input::placeholder {
    color: #718096;
}
[data-theme="dark"] .pagefind-ui .pagefind-ui__search-input::placeholder {
    color: #a0aec0;
}

/* Message line (e.g., "Showing X results") */
.pagefind-ui .pagefind-ui__message {
    color: var(--pagefind-ui-text);
    font-weight: 500;
}

/* Filter / clear buttons */
.pagefind-ui .pagefind-ui__button {
    color: var(--pagefind-ui-primary);
}
