/* myUKmailbox help centre styles
   Matches the new myukmailbox.com: Open Sans font, brand blue and green,
   blue to green gradient banner, rounded pill buttons.
   Upload this file as the Docs site style sheet. */

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");

/* 0. BRAND COLOURS (change once here, updates everywhere) */
:root {
    --blue: #007bd0;
    --blue-dark: #005a9c;
    --green: #40be65;
    --green-dark: #36a356;
    --gradient-green: #7bc145;
    --heading: #141414;
    --text: #333333;
    --muted: #6b6b6b;
    --border: #e3e8ee;
    --soft-bg: #f3f6f9;
}

/* 1. FONT AND BASE TEXT */
body, h1, h2, h3, h4, h5, h6, p, li, a, td, th,
input, button, select, textarea, .search-query {
    font-family: 'Open Sans', sans-serif !important;
}

body {
    color: var(--text) !important;
    background: #ffffff !important;
}

/* 2. HEADER */
#mainNav,
#mainNav .navbar-inner {
    background: #ffffff !important;
    background-image: none !important;
    border: none !important;
    box-shadow: 0 1px 0 var(--border) !important;
}

#mainNav .nav a {
    color: var(--heading) !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    background: none !important;
}

#mainNav .nav a:hover {
    color: var(--blue) !important;
}

/* "Contact" as an outlined pill, like "Log In" on the main site */
#mainNav .nav a.contactUs {
    color: var(--blue) !important;
    border: 2px solid var(--blue) !important;
    border-radius: 20px !important;
    padding: 6px 22px !important;
    line-height: 1.4 !important;
}

#mainNav .nav a.contactUs:hover {
    background: var(--blue) !important;
    color: #ffffff !important;
}

/* Desktop: centre the Contact button next to the logo */
@media (min-width: 769px) {
    #mainNav ul.nav {
        top: calc(50% + 8px) !important;   /* lines up with the middle of the logo */
        bottom: auto !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
}

/* 3. SEARCH BANNER (same gradient as the main site) */
#docsSearch {
    background: linear-gradient(-45deg, var(--gradient-green) 0%, var(--blue) 100%) !important;
    border: none !important;
    padding: 56px 16px !important;
}

#docsSearch h1 {
    margin: 0 0 28px 0 !important;   /* even spacing above and below the heading */
    line-height: 1.25 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased !important;
}

/* One white rounded bar with a blue Search button inside it */
#docsSearch #searchBar {
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 640px !important;
    margin: 0 auto !important;
    padding: 5px !important;
    background: #ffffff !important;
    border-radius: 30px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

#docsSearch #searchBar:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

#docsSearch .search-query {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    height: 46px !important;
    padding: 0 18px !important;
    font-size: 17px !important;     /* 16px or more stops iPhones zooming in */
    color: var(--heading) !important;
    background: transparent !important;
    border: none !important;
    border-radius: 25px !important;
    box-shadow: none !important;
    outline: none !important;
}

#docsSearch .search-query:focus,
#docsSearch .search-query:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

#docsSearch .search-query::placeholder {
    color: var(--muted) !important;
}

#docsSearch button {
    flex: 0 0 auto !important;
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 46px !important;
    padding: 0 28px !important;
    margin: 0 !important;
    background: var(--blue) !important;
    background-image: none !important;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    border: none !important;
    border-radius: 23px !important;
    box-shadow: none !important;
}

#docsSearch button:hover {
    background: var(--blue-dark) !important;
}

#docsSearch button:focus-visible {
    outline: 2px solid var(--blue-dark) !important;
    outline-offset: 2px !important;
}

#docsSearch button i {
    margin: 0 !important;
    line-height: 1 !important;
    position: static !important;
}

#docsSearch button span {
    background: transparent !important;
    text-shadow: none !important;
}

/* 4. CATEGORY CARDS (home page) */
/* Grid that fills the width evenly at every screen size:
   1 column on phones, 2 on tablets, 3 on desktop */
.category-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 20px !important;
    max-width: 1060px !important;
    margin: 0 auto 48px auto !important;   /* space above the footer */
    padding: 0 !important;
}

.category-list::before,
.category-list::after {
    display: none !important;
}

.category-list .category {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}

.category-list .category:hover {
    border-color: var(--blue) !important;
    box-shadow: 0 6px 18px rgba(0, 123, 208, 0.15) !important;
    transform: translateY(-2px) !important;
}

.category-list .category h3 {
    color: var(--heading) !important;
    font-weight: 600 !important;
}

.category-list .category .article-count {
    color: var(--blue) !important;
    font-weight: 600 !important;
}

/* 5. CATEGORY PAGES AND SIDEBAR */
#categoryHead h1,
#serp h1 {
    color: var(--heading) !important;
    font-weight: 700 !important;
}

.articleList a {
    color: var(--text) !important;
    font-size: 16px !important;
}

.articleList a:hover span {
    color: var(--blue) !important;
    text-decoration: underline !important;
}

#sidebar h3 {
    color: var(--heading) !important;
    font-weight: 700 !important;
}

#sidebar .nav-list a {
    color: var(--text) !important;
    font-size: 15px !important;
}

#sidebar .nav-list .active a,
#sidebar .nav-list a:hover {
    color: var(--blue) !important;
}

#sidebar .search-query {
    border-radius: 20px !important;
    font-size: 16px !important;
}

/* 6. ARTICLES */
#fullArticle h1.title {
    color: var(--heading) !important;
    font-weight: 700 !important;
    margin-bottom: 24px !important;
}

#fullArticle p,
#fullArticle li {
    font-size: 16px !important;
    line-height: 1.65 !important;
    color: var(--text) !important;
    letter-spacing: 0 !important;
}

#fullArticle p {
    margin: 0 0 16px 0 !important;
}

#fullArticle li {
    margin: 0 0 8px 0 !important;
}

#fullArticle strong {
    color: var(--heading) !important;
    font-weight: 700 !important;
}

#fullArticle h2,
#fullArticle h3 {
    color: var(--heading) !important;
    font-weight: 700 !important;
    margin: 28px 0 8px 0 !important;
}

/* Hides empty headings left behind by the editor */
#fullArticle h2:empty,
#fullArticle h3:empty {
    display: none !important;
}

#fullArticle a {
    color: var(--blue) !important;
    text-decoration: underline !important;
}

#fullArticle a:hover {
    color: var(--blue-dark) !important;
}

#fullArticle img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
}

#fullArticle table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin: 8px 0 20px 0 !important;
    border: 1px solid var(--border) !important;
}

#fullArticle th,
#fullArticle td {
    font-size: 15px !important;
    padding: 10px 14px !important;
    text-align: left !important;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border) !important;
}

#fullArticle th {
    background: var(--soft-bg) !important;
    color: var(--heading) !important;
    font-weight: 700 !important;
}

#fullArticle tr:last-child td {
    border-bottom: none !important;
}

#fullArticle blockquote {
    border-left: 4px solid var(--blue) !important;
    background: var(--soft-bg) !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 12px 16px !important;
}

#fullArticle blockquote p {
    margin: 4px 0 !important;
}

/* "Did this answer your question?" */
.articleRatings {
    border-radius: 12px !important;
}

/* Contact link at the bottom of pages */
.contactUs,
#contactModal {
    color: var(--blue) !important;
    font-weight: 600 !important;
}

/* 7. MOBILE */
@media (max-width: 768px) {
    #docsSearch {
        padding: 36px 16px !important;
    }

    #docsSearch h1 {
        margin-bottom: 20px !important;
        font-size: 24px !important;   /* fits on two lines on most phones */
        line-height: 1.3 !important;
    }

    #docsSearch button {
        padding: 0 22px !important;
    }

    #fullArticle th,
    #fullArticle td {
        padding: 8px 10px !important;
    }

    /* Menu button: lined up with the middle of the logo */
    #mainNav .btn-navbar {
        position: absolute !important;
        top: 37px !important;
        right: 12px !important;
        margin: 0 !important;
        padding: 14px 10px !important;
        background: none !important;
        border: none !important;
        box-shadow: none !important;
    }

    #mainNav .btn-navbar .icon-bar {
        background-color: var(--heading) !important;
        width: 22px !important;
        height: 2px !important;
        border-radius: 2px !important;
        box-shadow: none !important;
    }

    /* Open menu: a simple list row instead of the big pill button */
    #mainNav ul.nav {
        text-align: left !important;
        border-top: 1px solid var(--border) !important;
        margin: 0 !important;
        padding: 4px 0 8px 0 !important;
    }

    #mainNav ul.nav li#contact {
        display: none !important;
    }

    #mainNav ul.nav li#contactMobile {
        display: block !important;
    }

    #mainNav ul.nav #contactMobile a {
        display: block !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 12px 4px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        color: var(--blue) !important;
        background: none !important;
    }
}

/* 8. SMALL PHONES (480px and under)
   Help Scout shows the magnifying glass instead of the word "Search"
   at this size, so the button becomes a round icon button. */
@media (max-width: 480px) {
    #docsSearch button {
        flex: 0 0 52px !important;
        width: 52px !important;
        min-width: 0 !important;
        padding: 0 !important;
    }

    #docsSearch button span {
        display: none !important;
    }
}
