/* Search, theme toggle, scroll reveal — loaded with site-enhancements.js */

.wk-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    transition: background 0.2s, border-color 0.2s;
}
.wk-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}
.wk-toolbar-btn:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.wk-search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 100000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 4rem 1rem 1rem;
}
.wk-search-backdrop.wk-open {
    display: flex;
}
.wk-search-panel {
    background: #fff;
    color: #111827;
    width: 100%;
    max-width: 520px;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
[data-theme="dark"] .wk-search-panel {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}
.wk-search-panel header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
[data-theme="dark"] .wk-search-panel header {
    border-color: #334155;
}
.wk-search-panel input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
}
[data-theme="dark"] .wk-search-panel input {
    background: #0f172a;
    border-color: #475569;
    color: #f8fafc;
}
.wk-search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.25rem 0;
}
.wk-search-result {
    display: block;
    padding: 0.65rem 1rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}
[data-theme="dark"] .wk-search-result {
    border-color: #334155;
}
.wk-search-result:hover,
.wk-search-result:focus-visible {
    background: #eff6ff;
}
[data-theme="dark"] .wk-search-result:hover,
[data-theme="dark"] .wk-search-result:focus-visible {
    background: #334155;
}
.wk-search-result small {
    display: block;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}
[data-theme="dark"] .wk-search-result small {
    color: #94a3b8;
}
.wk-search-empty {
    padding: 1rem;
    color: #64748b;
    text-align: center;
}

/* Scroll reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-on-scroll.wk-revealed {
    opacity: 1;
    transform: none;
}
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
