/* ========================================
   KB PAGE LAYOUT
======================================== */

.kb-page-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 35px;
    align-items: start;
}


/* ========================================
   SIDEBAR
======================================== */

.kb-sidebar {
    position: sticky;
    top: 110px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding-right: 25px;

}

.kb-sidebar-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 20px;
}


/* ========================================
   NAVIGATION — GENERAL
======================================== */

.kb-navigation ul,
.kb-navigation li {
    list-style: none !important;
}

.kb-navigation ul {
    margin: 0;
    padding: 0;
}

.kb-navigation li {
    margin: 0;
}


/* Nested levels */
.kb-navigation ul.children {
    margin: 0;
    padding-left: 27px;
}


/* Links */
.kb-navigation a {
    padding: 6px 8px;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
    text-decoration: none;
    border-radius: 3px;
}

.kb-navigation a:hover {
    background: transparent;
}


/* ========================================
   PARENT ITEMS
   Arrow only — no bullet
======================================== */

.kb-navigation li.page_item_has_children {
    position: relative;
    padding-left: 0;
}

.kb-navigation li.page_item_has_children::before {
    display: none !important;
    content: none !important;
}

.kb-navigation li.page_item_has_children > a {
    display: inline-block;
    width: calc(100% - 32px);
    padding-left: 4px;
    vertical-align: middle;
    font-weight: 400;
}


/* ========================================
   LEAF ITEMS
   Bullet only — no arrow
======================================== */

.kb-navigation li:not(.page_item_has_children) {
    position: relative;
    padding-left: 20px;
}

.kb-navigation li:not(.page_item_has_children)::before {
    content: "•";
    position: absolute;
    left: 4px;
    top: 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
}

.kb-navigation li:not(.page_item_has_children) > a {
    display: block;
    padding-left: 0;
}


/* ========================================
   ACCORDION ARROW
======================================== */

.kb-tree-toggle {
    width: 24px;
    height: 28px;
    padding: 0;
    margin: 0 2px 0 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    vertical-align: middle;

    border: 0;
    background: transparent;
    box-shadow: none;

    cursor: pointer;
    color: #666;
}

.kb-tree-toggle:hover {
    color: #000;
}

.kb-tree-toggle span {
    display: inline-block;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.2s ease;
}


/* Rotate arrow when section is open */
.kb-navigation li.is-open > .kb-tree-toggle span {
    transform: rotate(90deg);
}


/* ========================================
   ACCORDION CHILDREN
======================================== */

.kb-navigation ul.children[hidden] {
    display: none !important;
}


/* ========================================
   CURRENT PAGE
======================================== */

.kb-navigation .current_page_item > a {
    font-weight: 600;
    background: transparent;
}


/* ========================================
   MAIN ARTICLE
======================================== */

.kb-page-content {
    min-width: 0;
}


/* Full-height separator between sidebar and content */
@media only screen and (min-width: 1001px) {

    .kb-page-layout {
        position: relative;
    }

    .kb-page-layout::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 320px;
        width: 1px;
        background: #e5e5e5;
        pointer-events: none;
    }

}

/* Center search icon vertically in sidebar */
.kb-sidebar-search .kb-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kb-sidebar-search .kb-search-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

.kb-sidebar-search .kb-search-trigger {
    position: relative;
}

/* ========================================
   TABLET / MOBILE
======================================== */

@media only screen and (max-width: 1000px) {

    .kb-page-layout {
        display: block;
    }

    .kb-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 35px;
        padding-right: 0;
        border-right: 0;
    }
}


/* ========================================
   FULL KB SITEMAP
======================================== */

.kb-full-sitemap {
    width: 100%;
}

/* Reset Salient list styling */
.kb-full-sitemap ul,
.kb-full-sitemap li {
    list-style: none !important;
    margin: 0;
}

.kb-full-sitemap ul {
    padding-left: 0;
}

.kb-full-sitemap li::before {
    display: none !important;
}

/* Top-level parents */
.kb-full-sitemap > ul > li {
    margin-bottom: 32px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e5e5;
}

.kb-full-sitemap > ul > li > a {
    display: block;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    color: #222;
    text-decoration: none;
    margin-bottom: 15px;
}

/* Child levels */
.kb-full-sitemap ul.children {
    display: block !important;
    padding-left: 25px;
    margin-top: 10px;
}

.kb-full-sitemap ul.children > li {
    margin-bottom: 10px;
}

/* Standard child links */
.kb-full-sitemap ul.children a {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #333;
    text-decoration: none;
}

/* Child items that also have children */
.kb-full-sitemap ul.children > li.page_item_has_children > a {
    font-size: 18px;
    font-weight: 600;
}

/* Link hover */
.kb-full-sitemap a:hover {
    color: #4169e1;
    text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .kb-full-sitemap > ul > li > a {
        font-size: 20px;
    }

    .kb-full-sitemap ul.children {
        padding-left: 18px;
    }
}


/* ========================================
   KB SITEMAP — PARENTS
======================================== */

.kb-full-sitemap li.page_item_has_children > a,
.kb-full-sitemap li.page_item_has_children > a:hover {
    text-decoration: none !important;
}

/* ========================================
   KB SITEMAP — LEAF PAGES
======================================== */

.kb-full-sitemap li:not(.page_item_has_children) {
    position: relative;
    padding-left: 18px;
}

/* Bullet point */
.kb-full-sitemap li:not(.page_item_has_children)::before {
    content: "•" !important;
    display: block !important;
    position: absolute;
    left: 2px;
    top: 2px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* Underlined links */
.kb-full-sitemap li:not(.page_item_has_children) > a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* ========================================
   KB ARTICLE — SEARCH BOX - Sitemap All Documentation
======================================== */

.kb-page-content .kb-search-trigger {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 20px 0 30px;
    padding: 0;
}

.kb-page-content .kb-search-trigger input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 20px 0 55px !important;

    background: #fff !important;
    border: 1px solid #d5d9df !important;
    border-radius: 4px !important;

    font-size: 16px !important;
    color: #333 !important;
    box-shadow: none !important;
    box-sizing: border-box;
    cursor: pointer;
}

.kb-page-content .kb-search-trigger .kb-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    line-height: 0;
    pointer-events: none;
}

.kb-page-content .kb-search-trigger .kb-search-icon svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* ========================================
   KB SITEMAP SEARCH BOX
======================================== */

form.kb-search-trigger {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 500px !important;
    height: 50px !important;
    margin: 20px auto 35px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Search input */
form.kb-search-trigger #kb-search-trigger-input {
    display: block !important;
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
    padding: 0 20px 0 55px !important;

    background: #fff !important;
    border: 1px solid #d5d9df !important;
    border-radius: 4px !important;
    box-shadow: none !important;

    font-size: 16px !important;
    line-height: normal !important;
    color: #333 !important;
    box-sizing: border-box !important;
    cursor: pointer;
}

/* Magnifying glass */
form.kb-search-trigger .kb-search-icon {
    position: absolute !important;
    top: 50% !important;
    left: 20px !important;
    transform: translateY(-50%) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    pointer-events: none;
    z-index: 2;
}

form.kb-search-trigger .kb-search-icon svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}


/* ============================
   KB MODAL - BROWSER TOP LAYER
   ============================ */

.kb-search-modal {
    width: calc(100% - 100px);
    max-width: 1400px;

    height: calc(100vh - 130px);

    margin: 95px auto 0 auto;
    padding: 0;

    border: none;
    border-radius: 0;

    background: #fff;

    overflow: hidden;

    box-shadow: 0 15px 50px rgba(0,0,0,0.25);
}


/* Native dialog backdrop */

.kb-search-modal::backdrop {
    background: rgba(0,0,0,0.45);
}


/* Remove default browser dialog spacing */

.kb-search-dialog {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    background: #fff;

    margin: 0;
    padding: 0;
}


/* =========================
   KB SEARCH TRIGGER BAR
   ========================= */

.kb-search-trigger {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.kb-search-trigger input {
    width: 100%;
    height: 50px;

    padding: 0 20px 0 55px !important;

    background: #fff !important;

    border: none !important;
    border-radius: 4px !important;

    font-size: 16px !important;
    color: #666 !important;

    outline: none !important;
    box-shadow: none !important;

    box-sizing: border-box;
}

.kb-search-trigger input::placeholder {
    color: #666 !important;
    opacity: 1;
}


/* Search icon */

.kb-search-icon {
    position: absolute;

    left: 20px;
    top: 50%;

    transform: translateY(-50%);

    width: 18px;
    height: 18px;

    z-index: 5;

    display: block;

    pointer-events: none;
}

.kb-search-icon svg {
    display: block;

    width: 18px;
    height: 18px;

    fill: none !important;
    stroke: #666 !important;

    stroke-width: 1.4 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Remove Salient input effects */

.kb-search-trigger input:focus {
    background: #fff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ============================
   HEADER
   ============================ */

.kb-search-modal-header {
    width: 100%;

    min-height: 76px;
    flex: 0 0 76px;

    display: flex;
    align-items: center;

    background: #fff;

    border-bottom: 1px solid #e5e5e5;

    box-sizing: border-box;
}


/* Search icon */

.kb-search-modal-icon {
    width: 20px;
    height: 20px;

    margin-left: 28px;

    flex: 0 0 auto;

    pointer-events: none;
}

.kb-search-modal-icon svg {
    width: 100%;
    height: 100%;

    fill: none;
    stroke: #555;
    stroke-width: 1.3;
    stroke-linecap: round;
}


/* Search input */

#kb-search-modal-input {
    flex: 1;

    width: 100%;
    height: 76px;

    margin: 0 !important;
    padding: 0 20px !important;

    border: none !important;
    border-radius: 0 !important;

    outline: none !important;
    box-shadow: none !important;

    background: transparent !important;

    font-size: 20px;
    color: #333;
}

#kb-search-modal-input::placeholder {
    color: #777;
    opacity: 1;
}


/* Close */

.kb-search-close {
    width: 72px;
    height: 76px;

    flex: 0 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 !important;
    padding: 0 !important;

    border: none !important;
    border-left: 1px solid #eee !important;

    background: transparent !important;

    color: #555 !important;

    font-size: 32px !important;
    font-weight: 300 !important;

    cursor: pointer;
}

.kb-search-close:hover {
    background: #f7f7f7 !important;
}


/* ============================
   RESULTS
   ============================ */

.kb-search-modal-results {
    flex: 1;

    width: 100%;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 30px 40px 40px;

    box-sizing: border-box;

    background: #fff;
}


/* Result */

.kb-search-result {
    display: block;

    width: 100%;

    padding: 18px 16px;

    border-bottom: 1px solid #ececec;

    color: #333 !important;
    text-decoration: none !important;

    box-sizing: border-box;
}

.kb-search-result:hover {
    background: #f8f8f8;
}

.kb-search-result-title {
    margin-bottom: 6px;

    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;

    color: #222;
}

.kb-search-result-excerpt {
    font-size: 14px;
    line-height: 1.6;

    color: #667085;
}

/* KB sidebar search */

.kb-sidebar-search {
    margin: 15px 0 25px;
}

.kb-sidebar-search .kb-search-trigger {
    width: 100%;
    max-width: none;
}

.kb-sidebar-search #kb-search-trigger-input {
    width: 100%;
    height: 44px;
    padding: 0 12px 0 42px !important;

    background: #fff !important;
    border: 1px solid #d5d9df !important;
    border-radius: 4px !important;

    font-size: 13px !important;
    color: #666 !important;
    cursor: pointer;
    box-sizing: border-box;
}

.kb-sidebar-search .kb-search-icon {
    left: 14px;
    width: 16px;
    height: 16px;
}

/* ============================
   MOBILE
   ============================ */

@media (max-width: 768px) {

    .kb-search-modal {
        width: calc(100% - 20px);

        height: calc(100vh - 90px);

        margin-top: 75px;
    }

    .kb-search-modal-header {
        min-height: 64px;
        flex-basis: 64px;
    }

    .kb-search-modal-icon {
        width: 18px;
        height: 18px;

        margin-left: 18px;
    }

    #kb-search-modal-input {
        height: 64px;

        padding: 0 12px !important;

        font-size: 16px;
    }

    .kb-search-close {
        width: 58px;
        height: 64px;

        flex-basis: 58px;

        font-size: 28px !important;
    }

    .kb-search-modal-results {
        padding: 20px 15px;
    }
}


/* =========================================
   KB SEARCH — DOCUMENTATION STYLE RESULTS
========================================= */

.kb-search-modal-results {
    padding: 24px 26px 40px;
}

/* Result row */
.kb-search-modal .kb-search-result {
    display: flex !important;
    align-items: flex-start;
    gap: 24px;

    width: 100%;
    padding: 18px 20px;

    background: transparent;
    border: none !important;
    border-radius: 4px;

    text-decoration: none !important;
    box-sizing: border-box;
}

/* Hover */
.kb-search-modal .kb-search-result:hover {
    background: #f5f7fa !important;
}

/* Document icon */
.kb-search-modal .kb-result-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f5f7fa;
    border-radius: 4px;
    color: #34445e;
}

.kb-search-modal .kb-result-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
}

/* Text area */
.kb-search-modal .kb-result-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

/* Title */
.kb-search-modal .kb-search-result-title {
    display: block;
    color: #1f2937 !important;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* Description */
.kb-search-modal .kb-search-result-excerpt {
    display: block;
    color: #667085 !important;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Page category */
.kb-search-modal .kb-result-meta {
    display: block;
    color: #7b8798 !important;
    font-size: 14px;
    line-height: 1.4;
}

/* Empty results */
.kb-search-modal .kb-search-no-results {
    padding: 24px;
    color: #667085;
}

/* Mobile */
@media (max-width: 768px) {
    .kb-search-modal-results {
        padding: 15px 10px;
    }

    .kb-search-modal .kb-search-result {
        gap: 14px;
        padding: 14px 10px;
    }

    .kb-search-modal .kb-result-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .kb-search-modal .kb-search-result-title {
        font-size: 16px;
    }

    .kb-search-modal .kb-search-result-excerpt {
        font-size: 13px;
    }
}