/* Explicit interaction states; keep text opaque and geometry unchanged. */
a:focus-visible {
    outline: 2px solid #5987f7;
    outline-offset: 3px;
}

a:focus:not(:focus-visible) {
    outline: none;
}

#nav.navbar-default .navbar-nav > li > a {
    padding: 12px 15px;
    margin-top: 3px;
    margin-bottom: 3px;
    border-radius: 6px;
    transition: background-color 150ms ease, color 150ms ease;
}

/* First and last items had one-sided zero padding in the legacy theme. */
#nav.navbar-default .navbar-nav > li:first-child > a,
#nav.navbar-default .navbar-nav > li:last-child > a {
    padding-left: 15px;
    padding-right: 15px;
}

#header-holder #header {
    padding-top: 5px;
    padding-bottom: 5px;
}

#header .logo-holder.logo-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 26px;
    line-height: 1;
}

#header .logo-holder.logo-text img {
    display: block;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    margin: 0;
}

#header .logo-holder.logo-text strong {
    display: block;
    font-size: inherit;
    line-height: 1;
}

#header-holder #nav {
    min-height: 50px;
}

/* A hovered dropdown parent must not apply the generic dark top-nav label. */
#header ul.top-nav > li.support-button-holder > a.support-button {
    color: #fff;
    opacity: 1;
}

#nav.navbar-default .navbar-nav > li > a:hover,
#nav.navbar-default .navbar-nav > li > a:focus-visible,
#nav.navbar-default .navbar-nav > .active > a,
#nav.navbar-default .navbar-nav > .open > a {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.14);
    opacity: 1;
    text-decoration: none;
}

#nav.navbar-default .navbar-nav > li > a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

#nav .navbar-nav .dropdown-menu > li > a {
    color: #555;
    opacity: 1;
}

#nav .navbar-nav > .open > .dropdown-menu {
    display: block;
}

#nav .navbar-nav .dropdown-menu > li > a:hover,
#nav .navbar-nav .dropdown-menu > li > a:focus {
    color: #315fcb;
    background: #f1f5ff;
}

/* Keep the client area footer independent of Hostify's marketing footer rules. */
#footer.moonvm-footer {
    padding: 32px 0 20px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    color: #555;
    text-align: left;
}

#footer .moonvm-footer-main,
#footer .moonvm-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
}

#footer .moonvm-footer-main {
    padding-bottom: 24px;
}

#footer .moonvm-footer-bottom {
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

#footer .moonvm-footer-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #333;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.3;
    white-space: nowrap;
}

#footer .moonvm-footer-brand img {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    padding: 4px;
    box-sizing: content-box;
    border-radius: 8px;
    background: #5987f7;
}

#footer .moonvm-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 28px;
    min-width: 0;
}

#footer .moonvm-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    max-width: 100%;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

#footer p.moonvm-footer-copyright {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.6;
}

#footer.moonvm-footer a:hover {
    color: #315fcb;
    text-decoration: underline;
    text-underline-offset: 4px;
}

#footer.moonvm-footer a:focus-visible {
    outline: 2px solid #5987f7;
    outline-offset: 4px;
    border-radius: 3px;
}

#nav .moonvm-group-heading {
    display: none;
}

/* Nested page content already lives inside the main Bootstrap container. */
#main-body .section > .container {
    width: auto;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 991px) {
    #nav .navbar-nav > li > a.dropdown-toggle {
        display: none;
    }

    #nav .moonvm-group-heading {
        display: block;
        padding: 12px 15px;
        margin: 3px 0;
        min-height: 44px;
        line-height: 20px;
        font-size: 13px;
        font-weight: 600;
        color: #fff;
        text-align: center;
    }

    #nav .navbar-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    #nav .navbar-nav > li > .dropdown-menu {
        text-align: center;
    }

    #nav .navbar-nav > li > .dropdown-menu {
        display: block;
        position: relative;
        float: none;
        width: 100%;
        top: 0;
        margin: 0 0 16px;
        border-radius: 6px;
        background: #fff;
        box-shadow: none;
    }

    #nav.navbar-default .navbar-nav .dropdown-menu > li > a,
    #nav.navbar-default .navbar-nav .open .dropdown-menu > li > a,
    #nav.navbar-default .navbar-nav .dropdown-menu > .active > a {
        color: #444;
        opacity: 1;
        min-height: 44px;
        padding: 12px 22px;
        line-height: 20px;
        white-space: normal;
    }

    #nav.navbar-default .navbar-nav .dropdown-menu > li > a:hover,
    #nav.navbar-default .navbar-nav .dropdown-menu > li > a:focus {
        color: #315fcb;
        background: #f1f5ff;
        opacity: 1;
    }

    #nav.navbar-default .navbar-nav > li > a {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (max-width: 767px) {
    #footer.moonvm-footer {
        padding: 24px 0 16px;
    }

    #footer .moonvm-footer-main,
    #footer .moonvm-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #footer .moonvm-footer-main {
        padding-bottom: 16px;
    }

    #footer .moonvm-footer-links {
        column-gap: 24px;
    }
}
