/* ==========================================================================
   SESAMm Knowledge Base - Help Scout Docs custom stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --tr-header:        #1f2532;   /* original dark header */
    --tr-purple:        #45214f;   /* accent (TextReveal purple) */
    --tr-purple-dark:   #361a3e;
    --tr-purple-soft:   #6b4a74;   /* profile pill / hover */
    --tr-teal:          #3ec1b5;   /* TextReveal logo accent */
    --tr-teal-dark:     #2fa89d;
    --tr-search-bg:     #f0f0f0;
    --tr-text:          #393939;
    --tr-muted:         #6d6c6c;
    --tr-border:        #e6e1e8;
}

/* ---------- Base ---------- */
body {
    font-family: 'Roboto', 'Helvetica', Arial, sans-serif;
    color: var(--tr-text);
    background: #fafafa;
}

/* ---------- Top navigation ---------- */
.navbar .navbar-inner,
#mainNav .navbar-inner {
    background: var(--tr-header) !important;
    box-shadow: none;
    border: 0;
    padding: 0 24px;
    margin-bottom: 0;
    min-height: 64px;
}

#mainNav .container-fluid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    min-height: 64px;
    max-width: none;              /* full-width header */
    text-align: left;
    position: relative;
}

.navbar a.brand,
.navbar .brand {
    float: none;
    display: flex;
    align-items: center;
    width: auto;
    max-width: 150px;
    padding: 0;
    margin: 0 32px 0 0;
    line-height: 1;
}

.navbar .brand img {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
}

#mainNav .nav-collapse {
    flex: 1 1 auto;
    order: 2;
}

#mainNav .navbar .nav,
#mainNav .nav {
    position: static;
    float: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    text-align: left;
}

#mainNav .nav li {
    display: block;
    float: none;
}

#mainNav .nav li a,
.navbar .nav li a {
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 32px;
    padding: 0 12px;
    border-radius: 4px;
    transition: background .2s;
}

#mainNav .nav li a:hover,
#mainNav .nav li a:focus,
#mainNav .nav .active a {
    color: #ffffff;
    background: rgba(255, 255, 255, .12);
}

#mainNav .nav .caret,
#mainNav .nav .active .caret {
    display: none;
}

/* ---------- Log in button (injected by header script) ---------- */
#tr-login {
    order: 3;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px 0 12px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--tr-header) !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s, transform .2s;
}

#tr-login:hover,
#tr-login:focus {
    background: var(--tr-teal);
    color: var(--tr-header) !important;
}

#tr-login svg {
    width: 18px;
    height: 18px;
    flex: none;
}

/* ---------- Hero / search ---------- */
#docsSearch {
    position: relative;
    background: var(--tr-header);
    border-bottom: 0;
    padding: 48px 24px 64px;
    margin-bottom: 40px;
}

#docsSearch h1,
#docsSearch .tr-welcome {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto 20px;
    padding: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
}

#docsSearch h1 strong,
#docsSearch .tr-welcome strong {
    font-weight: 700;
}

#docsSearch h1::after,
#docsSearch .tr-welcome::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 200px;
    height: 1px;
    background: #ffffff;
}

#searchBar {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    padding: 0;
    margin: 0 auto;
}

#searchBar .search-query {
    height: 55px;
    padding: 0 60px 0 16px;
    background: var(--tr-search-bg);
    border: 0;
    border-radius: 4px;
    box-shadow: none;
    color: var(--tr-text);
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 300;
    margin: 0;
}

#searchBar .search-query::placeholder {
    color: #8a8a8a;
}

#searchBar .search-query:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(62, 193, 181, .45);
    outline: 0;
}

#searchBar button,
#searchBar button:hover {
    position: absolute;
    top: 0;
    right: 0;
    height: 55px;
    width: 56px;
    padding: 0;
    border: 0;
    border-radius: 0 4px 4px 0;
    background: transparent;
    color: #1f1f1f;
    text-shadow: none;
    transition: color .2s;
}

#searchBar button:hover {
    color: var(--tr-purple);
}

#searchBar button .icon-search {
    display: block;
    font-size: 20px;
    color: inherit;
    text-shadow: none;
}

#searchBar button span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

#serp-dd {
    border-radius: 0 0 4px 4px;
    border: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    text-align: left;
}

#serp-dd .result a:hover,
#serp-dd .result > li.active {
    background: #f4eff5;
    color: var(--tr-purple) !important;
}

/* ---------- Home: collections & category cards ---------- */
.collection-category h2,
.collection-category h2 a {
    color: var(--tr-purple) !important;
    font-size: 20px;
    font-weight: 700;
    text-align: left;
}

.collection-category h2 {
    border-bottom: 1px solid var(--tr-border);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* fill the full content width instead of fixed-width inline blocks */
section.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    text-align: left;
}

.category-list .category,
.category-list.two-col .category {
    box-sizing: border-box;
    width: auto;
    margin: 0;
    position: relative;
    min-height: 110px;
    padding: 20px 20px 44px;
    text-align: left;
    background: #ffffff;
    border: 1px solid var(--tr-border);
    border-radius: 6px;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.category-list .category:hover {
    border-color: var(--tr-purple-soft);
    box-shadow: 0 6px 18px rgba(69, 33, 79, .12);
    transform: translateY(-2px);
}

.category-list h3 {
    margin: 0 0 8px;
    color: var(--tr-purple);
    font-size: 17px;
    font-weight: 500;
}

.category-list .category p {
    color: var(--tr-muted);
    font-size: 14px;
}

p.article-count {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;
    margin-bottom: 0;
    color: #ababab !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.category-list .category .article-count,
.category-list .category:hover .article-count {
    color: var(--tr-teal-dark) !important;
}

/* ---------- Links ---------- */
.contentWrapper a,
.collection a,
#fullArticle strong a,
#fullArticle a strong,
.most-pop-articles .popArticles a,
.most-pop-articles .popArticles a:hover span {
    color: var(--tr-purple);
}

#fullArticle a {
    color: var(--tr-purple);
    text-decoration: underline;
    text-decoration-color: rgba(69, 33, 79, .35);
    text-underline-offset: 2px;
}

#fullArticle a:hover {
    text-decoration-color: var(--tr-purple);
}

.contentWrapper .articleList li a {
    color: #1f2532 !important;
    font-size: 1.2em;
}

.contentWrapper .articleList li a:hover {
    color: var(--tr-purple) !important;
}

/* ---------- Article & category pages ---------- */
.contentWrapper {
    border-radius: 6px;
    border-color: var(--tr-border);
}

#fullArticle .title,
.contentWrapper h1 {
    color: var(--tr-purple);
    font-weight: 700;
}

#sidebar > h3 {
    display: none;
}

#sidebar .nav-list a {
    font-size: 1.1em;
    color: var(--tr-text);
    padding: 6px 14px;
    border-radius: 4px;
}

#sidebar .nav-list a:hover {
    color: var(--tr-purple);
    background: #f4eff5;
}

#sidebar .nav-list .active a,
#sidebar .nav-list .active a:hover {
    color: #ffffff;
    background: var(--tr-purple);
}

#sidebar form .search-query {
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid gainsboro;
    border-radius: 0;
    padding-left: 0;
    background: transparent;
}

#sidebar form .search-query:focus {
    box-shadow: none;
    border-bottom-color: var(--tr-purple);
}

.articleFoot time.lu {
    display: none;
}

/* ---------- Code blocks (unchanged) ---------- */
.theme-code-block {
    --prism-background-color: #292d3e;
}

.theme-code-block .codeBlockContent_biex {
    background-color: var(--prism-background-color) !important;
    color: var(--prism-color) !important;
    padding: 20px !important;
    border-radius: 5px !important;
    overflow-x: auto !important;
}

.theme-code-block .codeBlockContent_biex pre {
    background-color: #292d3e !important;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .navbar .navbar-inner,
    #mainNav .navbar-inner {
        padding: 0 16px;
    }

    #mainNav .container-fluid {
        min-height: 56px;
    }

    .navbar .brand {
        max-width: 120px;
        margin-right: 12px;
    }

    #tr-login {
        order: 2;
        height: 32px;
        padding: 0 12px 0 10px;
        margin-right: 48px;           /* room for the hamburger */
        font-size: 12px;
    }

    #mainNav .btn-navbar {
        top: 14px;
        right: 0;
        margin-top: 0;
    }

    #mainNav .btn-navbar .icon-bar {
        background: #ffffff;
    }

    #mainNav .nav-collapse {
        order: 3;
        flex-basis: 100%;
    }

    #mainNav .nav {
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 8px;
    }

    #mainNav .nav li a {
        line-height: 40px;
    }

    #docsSearch {
        padding: 32px 16px 40px;
        margin: 0 -20px 32px;
    }

    #docsSearch h1,
    #docsSearch .tr-welcome {
        font-size: 20px;
    }

    section.category-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 400px) {
    #tr-login .tr-login-long {
        display: none;
    }
}
