/* KB Article Page Styles - Agent.ai Documentation Style */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background-color: #09090b !important;
}

.kb-article-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #e4e4e7;
    background: #09090b;
}
.kb-article-page a:hover {
    text-decoration: none;
}
.kb-related-faqs a {
    display: flex;
    align-items: center;
    border: 1px solid #3f3f46;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}
/* Top Bar */
.kb-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px); 
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #27272a;
}

/* Account for WordPress admin bar when logged in */
.admin-bar .kb-topbar {
    top: 32px;
}

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

.kb-topbar-inner {
    max-width: 1560px;
    width: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kb-topbar-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.kb-logo {
    height: 40px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.kb-topbar-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kb-topbar-title {
    font-size: 24px;
    line-height: 28px;
    font-weight: 400;
    color: #ffffff;
    white-space: nowrap;
}

.kb-topbar-updated {
    font-size: 12px;
    font-weight: 400;
    color: #a1a1aa;
    white-space: nowrap;
}

/* Main Wrapper */
.kb-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    justify-content: center;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (max-width: 782px) {
    .admin-bar .kb-wrapper {
        margin-top: 110px;
    }
}

/* Left Sidebar */
.kb-sidebar {
    position: sticky;
    top: 80px;
    width: 360px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    align-self: flex-start;
    flex-shrink: 0;
}

/* Account for WordPress admin bar */
.admin-bar .kb-sidebar {
    top: 112px;
    max-height: calc(100vh - 112px);
}

@media screen and (max-width: 782px) {
    .admin-bar .kb-sidebar {
        top: 126px;
        max-height: calc(100vh - 126px);
    }
}

.kb-sidebar-inner {
    padding: 30px 16px;
}

.kb-topbar-right a i {
    padding-top: 2px;

}

/* Search Box */
.kb-search-box {
    position: relative;
    max-width: 600px;
    flex: 1;
}

.kb-search-input,
.kb-article-page .kb-search-input,
.kb-article-page input.kb-search-input,
.kb-article-page input[type="search"].kb-search-input {
    width: 100% !important;
    min-width: 360px !important;
    padding: 10px 16px !important;
    padding-right: 48px !important;
    background: #27272a !important;
    border: 1px solid #3f3f46 !important;
    border-radius: 8px !important;
    color: #e4e4e7 !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: normal !important;
    margin: 0 !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.kb-search-input::placeholder,
.kb-article-page .kb-search-input::placeholder {
    color: #71717a !important;
    opacity: 1 !important;
}

.kb-search-input:focus,
.kb-article-page .kb-search-input:focus {
    border-color: #52525b !important;
    background: #3f3f46 !important;
    outline: none !important;
}

.kb-search-counter {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a1aa;
    font-size: 12px;
    font-weight: 500;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kb-search-counter-text {
    pointer-events: none;
}

.kb-search-nav-btn,
button.kb-search-nav-btn,
.kb-article-page .kb-search-nav-btn,
.kb-article-page button.kb-search-nav-btn {
    background: #3f3f46 !important;
    border: none !important;
    color: #a1a1aa !important;
    cursor: pointer !important;
    font-size: 12px !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    transition: all 0.2s !important;
    pointer-events: auto !important;
    outline: none !important;
    box-shadow: none !important;
}

.kb-search-nav-btn:hover,
button.kb-search-nav-btn:hover,
.kb-article-page .kb-search-nav-btn:hover,
.kb-article-page button.kb-search-nav-btn:hover {
    color: #e4e4e7 !important;
    background: #52525b !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.kb-search-nav-btn:active,
button.kb-search-nav-btn:active,
.kb-article-page .kb-search-nav-btn:active,
.kb-article-page button.kb-search-nav-btn:active {
    color: #ffffff !important;
    background: #52525b !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.kb-search-nav-btn:focus,
button.kb-search-nav-btn:focus,
.kb-article-page .kb-search-nav-btn:focus,
.kb-article-page button.kb-search-nav-btn:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    background: #52525b !important;
}

.kb-search-nav-btn:focus:not(:focus-visible),
button.kb-search-nav-btn:focus:not(:focus-visible),
.kb-article-page .kb-search-nav-btn:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.kb-search-nav-btn:focus-visible,
button.kb-search-nav-btn:focus-visible,
.kb-article-page .kb-search-nav-btn:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa) !important;
    outline-offset: 2px !important;
}

.kb-search-shortcut {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #3f3f46;
    color: #a1a1aa;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
}

/* Navigation */
.kb-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kb-nav-section {
    margin-bottom: 8px;
}

.kb-nav-section .kb-nav-item {
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
    text-decoration: none;
}

.kb-nav-parent {
    display: flex;
    
    gap: 10px;
    padding: 8px 12px;
    color: #e4e4e7;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0px;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: color 0.2s;
    text-align: left;
}

.kb-nav-parent:hover {
    color: #ffffff;
    background: initial;
    border: initial;
}

.kb-nav-section button:active, .kb-nav-section input[type=button]:active, .kb-nav-section input[type=submit]:active, .kb-nav-section button:focus, .kb-nav-section input[type=button]:focus, .kb-nav-section input[type=submit]:focus {
    background-color: initial !important;
    border: initial !important;
}

.kb-nav-parent-text {
    flex: 1;
}

.kb-nav-icon {
    font-size: 16px;
    flex-shrink: 0;
    color: #a1a1aa;
    margin-right: 2px;
    transition: color 0.2s;
}

/* Hide outline bullet by default, show circle */
.kb-nav-icon.fi-br-square-small{
    display: none;
}

.kb-nav-icon.fi-sr-angle-square-down {
    display: inline-block;
    padding-top: 2px;
}

/* When section is open, hide circle and show outline bullet */
.kb-nav-section-open .kb-nav-icon.fi-sr-angle-square-down {
    display: none;
}

.kb-nav-section-open .kb-nav-icon.fi-br-square-small{
    display: inline-block;
}

.kb-nav-children {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin-left: 18px;
    padding-left: 10px;
    margin-top: 4px;
}

.kb-nav-section-open .kb-nav-children {
    display: flex;
    border-left: 1px solid #3f3f46;
}

.kb-nav-link {
    display: block;
    padding: 8px 12px;
    color: #a1a1aa;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.kb-nav-link:hover {
    color: #e4e4e7;
    background: #27272a;
}

.kb-nav-link-active {
    color: #60a5fa;
    background: #1e3a5f;
    font-weight: 500;
}

.kb-nav-children a:hover {
    text-decoration: none;
}

/* Main Content Area */
.kb-main {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 48px;
    padding: 80px 48px;
    max-width: 1200px;
}

.kb-content-wrapper {
    flex: 1;
    /*max-width: 800px;*/
}

/* Article */
.kb-article {
    color: #a1a1aa;
}

.kb-article-header {
    margin-bottom: 32px;
}

.kb-article-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 16px;
}

/* Article Content */
.kb-article-content {
    font-size: 16px;
    line-height: 1.7;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.kb-article-content * {
    max-width: 100%;
}

.kb-article-content h2 {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    padding-top: 48px;
    margin-bottom: 20px;
    line-height: 1.3;
}

/* First H1 is the main title - no top margin, 20px bottom margin */
.kb-article-content h1:first-child {
    padding-top: 40px;
    margin-bottom: 20px;
}

/* H1 styling */
.kb-article-content h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    padding-top: 40px;
    margin-top: 0;
    margin-bottom: 20px;
}

.kb-article-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 32px;
    margin-bottom: 16px;
    line-height: 1.4;
}

.kb-article-content p {
    margin-bottom: 20px;
    color: #a1a1aa;
}

.kb-article-content ul,
.kb-article-content ol {
    margin-bottom: 20px;
    padding-left: 28px;
}

.kb-article-content li {
    margin-bottom: 12px;
    color: #d4d4d8;
}

.kb-article-content strong {
    color: #ffffff;
    font-weight: 600;
}

.kb-article-content a:not(.kb-category-link) {
    /* color is set dynamically via inline styles in templates */
    text-decoration: none;
    transition: color 0.2s;
}

/* Link colors are set dynamically via inline styles in templates */

.kb-article-content code {
    background: #27272a;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 14px;
}

.kb-article-content pre {
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 24px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.kb-article-content pre code {
    background: none;
    color: #e4e4e7;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Citations */

.kb-article-content sup a {
    background: #27272a;
    padding: 4px 6px;
    margin: 0px 2px;
    border-radius: 4px;
    color: #ffffff !important;
}

.kb-article-content sup a:hover {
    color: #ffffff;
    text-decoration: none;
}

/* References Section */
.kb-article-content ol:has(li[id^="ref-"]) {
    padding-left: 12px;
    padding-right: 0;
}

.kb-article-content ol li[id^="ref-"] {
    font-size: 14px;
    color: #a1a1aa;
    margin-bottom: 16px;
    scroll-margin-top: 100px;
    list-style-position: inside;
}

.kb-article-content ol li[id^="ref-"]:target,
.kb-article-content ol li[id^="ref-"].kb-ref-highlighted {
    background: #151519;
    padding: 8px 8px 8px 12px;
    margin-left: -12px;
    border-radius: 6px;
}

/* Right Sidebar - Table of Contents */
.kb-toc {
    width: 280px;
    flex-shrink: 0;
}

.kb-toc-inner {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Account for WordPress admin bar */
.admin-bar .kb-toc-inner {
    top: 112px;
    max-height: calc(100vh - 112px);
}

@media screen and (max-width: 782px) {
    .admin-bar .kb-toc-inner {
        top: 126px;
        max-height: calc(100vh - 126px);
    }
}

.kb-toc-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #71717a;
    margin-bottom: 16px;
    margin-top: 40px;
}

.kb-toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0px;
    border-left: 1px solid #3f3f46;
}

.kb-toc-link,
.kb-toc-link:link,
.kb-toc-link:visited,
.kb-toc a.kb-toc-link,
a.kb-toc-link {
    display: block;
    padding: 10px 12px;
    color: #a1a1aa !important;
    text-decoration: none !important;
    font-size: 13px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    transition: all 0.2s;
}

.kb-toc-link:hover,
.kb-toc a.kb-toc-link:hover,
a.kb-toc-link:hover {
    color: #e4e4e7 !important;
    border-left-color: #52525b;
    text-decoration: none !important;
}

.kb-toc-link-active,
.kb-toc-link-active:link,
.kb-toc-link-active:visited,
.kb-toc-link-active:hover,
.kb-toc-link-active:active,
.kb-toc-link-active:focus,
.kb-toc a.kb-toc-link-active,
a.kb-toc-link-active {
    color: var(--kb-highlight-color, #60a5fa) !important;
    border-left-color: var(--kb-highlight-color, #60a5fa);
    text-decoration: none !important;
}

/* Responsive Design */
@media screen and (max-width: 1280px) {
    .kb-main {
        padding: 80px 32px;
        gap: 32px;
    }

    .kb-toc {
        display: none;
    }
}

@media screen and (max-width: 1024px) {
    .kb-sidebar {
        position: fixed;
        left: 0;
        top: 80px;
        height: calc(100vh - 80px);
        max-height: calc(100vh - 80px);
        z-index: 998;
        background: #09090b;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-right: 1px solid #27272a;
    }

    .admin-bar .kb-sidebar {
        top: 112px;
        height: calc(100vh - 112px);
        max-height: calc(100vh - 112px);
    }

    .kb-sidebar.kb-sidebar-open {
        transform: translateX(0);
    }

    /* Mobile menu overlay */
    .kb-mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 997;
    }

    .kb-mobile-overlay.active {
        display: block;
    }

    .kb-main {
        margin-left: 0;
        padding: 80px 24px 32px;
    }
}

@media screen and (max-width: 768px) {
    .kb-topbar-inner {
        padding: 0 12px;
    }

    /* Stack topbar on very small screens */
    .kb-topbar {
        height: auto;
        min-height: 64px;
        padding: 8px 0;
    }

    .kb-topbar-inner {
        flex-wrap: wrap;
        gap: 8px;
    }

    .kb-topbar-title-section {
        flex: 1;
        min-width: 0;
    }

    .kb-topbar-title {
        font-size: 18px;
        line-height: 22px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kb-topbar-updated {
        font-size: 11px;
    }

    /* Fix search input overflow */
    .kb-search-box {
        max-width: none;
        flex: 0 1 auto;
    }

    .kb-search-input,
    .kb-article-page .kb-search-input {
        min-width: 120px !important;
        width: 140px !important;
        padding: 8px 12px !important;
        padding-right: 40px !important;
        font-size: 14px !important;
    }

    .kb-search-shortcut {
        display: none;
    }

    /* Hide some topbar buttons on very small screens */
    .kb-topbar-right {
        gap: 4px !important;
    }

    .kb-glossary-topbar-btn,
    .kb-comparisons-topbar-btn,
    .kb-faq-topbar-btn {
        width: 36px !important;
        height: 36px !important;
    }

    .kb-glossary-topbar-btn i,
    .kb-comparisons-topbar-btn i,
    .kb-faq-topbar-btn i {
        font-size: 16px !important;
    }

    .admin-bar .kb-sidebar {
        top: 46px;
        height: calc(100vh - 46px);
        max-height: calc(100vh - 46px);
    }

    .kb-main {
        margin-left: 0;
        padding: 24px 16px;
        flex-direction: column;
    }

    .kb-article-title,
    .kb-article-content h1 {
        font-size: 28px;
    }

    .kb-article-content h2 {
        font-size: 22px;
        padding-top: 32px;
    }

    .kb-article-content h3 {
        font-size: 18px;
        margin-top: 24px;
    }

    .kb-article-content {
        font-size: 15px;
    }

    .kb-article-content ul,
    .kb-article-content ol {
        padding-left: 20px;
    }

    /* Better touch targets for navigation */
    .kb-nav-parent {
        padding: 12px;
        min-height: 48px;
    }

    .kb-nav-link {
        padding: 12px;
        min-height: 44px;
    }

    /* Category cards full width on mobile */
    .kb-category-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kb-category-card {
        padding: 16px;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .kb-topbar-title {
        font-size: 16px;
    }

    .kb-search-input,
    .kb-article-page .kb-search-input {
        width: 100px !important;
        min-width: 100px !important;
    }

    /* Hide glossary and comparisons on very small screens, keep FAQs */
    .kb-glossary-topbar-btn,
    .kb-comparisons-topbar-btn {
        display: none !important;
    }

    .kb-main {
        padding: 20px 12px;
    }

    .kb-article-content h1,
    .kb-article-title {
        font-size: 24px;
    }

    .kb-article-content h2 {
        font-size: 20px;
    }

    .kb-article-content pre {
        padding: 12px;
        font-size: 12px;
    }
}

/* Mobile menu toggle button */
.kb-mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    color: #ffffff;
    font-size: 20px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.kb-mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.kb-mobile-menu-toggle:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 2px;
}

@media screen and (max-width: 1024px) {
    .kb-mobile-menu-toggle {
        display: flex;
    }
}

/* =====================================================
   ACCESSIBILITY IMPROVEMENTS
   ===================================================== */

/* Skip to content link */
.kb-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #60a5fa;
    color: #000000;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    text-decoration: none;
    z-index: 10000;
    transition: top 0.2s;
}

.kb-skip-link:focus {
    top: 0;
    outline: none;
}

/* Focus visible styles for all interactive elements */
/* Note: These are fallback styles. Templates override with KB-specific highlight colors via inline styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa);
    outline-offset: 2px;
}

.kb-nav-link:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa);
    outline-offset: -2px;
    border-radius: 4px;
}

.kb-nav-parent:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa);
    outline-offset: -2px;
    border-radius: 4px;
}

/* Remove focus ring on mouse click, keep for keyboard only */
.kb-nav-parent:focus:not(:focus-visible),
.kb-nav-link:focus:not(:focus-visible) {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Override theme button focus styles */
button.kb-nav-parent:focus,
.kb-article-page button.kb-nav-parent:focus,
.kb-nav-parent:focus {
    outline: none !important;
    box-shadow: none !important;
}

button.kb-nav-parent:focus-visible,
.kb-article-page button.kb-nav-parent:focus-visible,
.kb-nav-parent:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa) !important;
    outline-offset: -2px !important;
    border-radius: 4px;
}

.kb-toc-link:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa);
    outline-offset: -2px;
}

.kb-category-card:focus-visible {
    outline: 2px solid var(--kb-highlight-color, #60a5fa);
    outline-offset: 2px;
}

/* Better focus for search input */
.kb-search-input:focus {
    border-color: var(--kb-highlight-color, #60a5fa);
    box-shadow: 0 0 0 3px var(--kb-highlight-color-alpha, rgba(96, 165, 250, 0.2));
}

/* Touch target improvements for search navigation */
.kb-search-nav-btn {
    min-width: 28px;
    min-height: 28px;
    padding: 4px 8px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .kb-article-content {
        color: #ffffff;
    }

    .kb-nav-link {
        color: #ffffff;
    }

    .kb-category-description {
        color: #e4e4e7;
    }

    .kb-search-input {
        border-width: 2px;
    }
}

/* Table responsiveness */
.kb-article-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.kb-article-content table th,
.kb-article-content table td {
    min-width: 100px;
}

/* Image responsiveness */
.kb-article-content img {
    max-width: 100%;
    height: auto;
}

/* Custom Scrollbar */
.kb-sidebar::-webkit-scrollbar,
.kb-toc::-webkit-scrollbar {
    width: 6px;
}

.kb-sidebar::-webkit-scrollbar-track,
.kb-toc::-webkit-scrollbar-track {
    background: transparent;
}

.kb-sidebar::-webkit-scrollbar-thumb,
.kb-toc::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 3px;
}

.kb-sidebar::-webkit-scrollbar-thumb:hover,
.kb-toc::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* Search Result Highlighting */
.kb-nav-link.kb-search-match,
.kb-nav-link.kb-search-content-match {
    font-style: italic;
}

/* Removed (in content) label for cleaner search results */

/* Article Content Highlighting */
.kb-search-highlight {
    background: #3b82f6;
    color: #ffffff;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* KB Landing Page Styles */
.kb-category-archive {
    max-width: initial !important
}

.kb-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.kb-category-card {
    background: transparent;
    border: 1px solid #27272a;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.kb-category-card:hover {
    border-color: #3f3f46;
    background: #1c1c1f;
}

.kb-category-card-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
}

.kb-category-icon {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
}

.kb-category-icon i {
    font-size: 32px;
    /* color is set dynamically via inline styles in template */
    transition: color 0.2s;
}

/* hover color is set dynamically via inline styles in template for .kb-category-card:hover .kb-category-icon i */

.kb-category-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kb-category-card h3 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 400;
    color: #ffffff;
    transition: color 0.2s;
}

.kb-category-description {
    color: #a1a1aa;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0px !important;
    flex: 1;
}

.kb-category-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.kb-category-count {
    color: #71717a;
    font-size: 14px;
}

.kb-category-link {
    /* color is set dynamically via inline styles in template */
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

@media (max-width: 768px) {
    .kb-category-grid {
        grid-template-columns: 1fr;
    }
}

/* Landing Page Admin Actions */
.kb-landing-admin-actions {
    margin: 24px 0 32px 0;
    display: flex;
    justify-content: center;
}

.kb-landing-action-btn {
    background: #2271b1;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
}

.kb-landing-action-btn:hover {
    background: #135e96;
}

/* KB Title Link */
.kb-topbar-title a {
    color: #e4e4e7;
    text-decoration: none;
    transition: color 0.2s;
}

.kb-topbar-title a:hover {
    color: #60a5fa;
}

/* Category Page Article List Styles */
.kb-article-content h3 a {
    /* color is set dynamically via inline styles in template */
    text-decoration: none;
    transition: color 0.2s;
    font-size: 18px;
}

/* Add spacing and styling to article descriptions under H3 headings */
.kb-article-content h3 {
    margin-bottom: 8px;
    padding-bottom: 8px; 
}

/* Improve spacing for paragraphs following H3 article titles */
.kb-article-content h3 + p { 
    color: #a1a1aa;
    line-height: 1.6;
}

/* Style the "Articles in this Category" section heading */
.kb-article-content h2 {
    margin-top: -20px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    /*border-bottom: 2px solid #27272a;*/
    color: #e4e4e7;
}
