/* MOTDUE-HEADER-V2 */

.govbar{
    position:relative;
    z-index:20;
    min-height:78px;
    background:#081c32 !important;
    border-top:4px solid #c9dcf7;
    border-bottom:4px solid #1677ff !important;
}

.govbar-inner{
    width:min(1160px,calc(100% - 30px)) !important;
    max-width:1160px !important;
    min-height:74px;
    margin:0 auto !important;
    padding:9px 0 !important;
    box-sizing:border-box;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:14px !important;
}

.govbar .motdue-brand{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    margin:0 !important;
    padding:0 !important;
    text-decoration:none;
}

.govbar .motdue-brand img{
    display:block !important;
    width:auto !important;
    height:52px !important;
    max-width:210px;
    object-fit:contain;
}

.govbar .motdue-service{
    flex:0 0 auto;
    padding-left:15px;
    border-left:1px solid #355170;
    line-height:1.2;
}

.govbar .motdue-title{
    display:block;
    color:#fff;
    font-size:18px;
    font-weight:800;
    white-space:nowrap;
}

.govbar .motdue-disclaimer{
    display:block;
    margin-top:5px;
    color:#a9bdd6;
    font-size:11px;
    white-space:nowrap;
}

.govbar .motdue-nav{
    margin-left:28px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:9px !important;
}

.govbar .motdue-button{
    position:relative;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
    padding:10px 15px !important;
    border:1px solid rgba(255,255,255,.18) !important;
    border-radius:9px !important;
    box-sizing:border-box;
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    color:#fff !important;
    text-decoration:none !important;
    font-size:14px !important;
    font-weight:800 !important;
    line-height:1 !important;
    white-space:nowrap;
    box-shadow:0 2px 5px rgba(0,0,0,.24) !important;
    cursor:pointer;
}

.govbar .motdue-home{
    background:#123a66 !important;
}

.govbar .motdue-garage{
    background:#208044 !important;
}

.govbar .motdue-profile{
    background:#c47c08 !important;
    color:#fff !important;
}

.govbar .motdue-logout{
    background:#b9242b !important;
}

.govbar .motdue-login{
    background:#b9242b !important;
}

.govbar .motdue-button:hover,
.govbar .motdue-button:focus{
    filter:brightness(1.15);
    transform:translateY(-1px);
}

.govbar .motdue-disabled{
    opacity:.5;
    cursor:not-allowed;
    filter:saturate(.55);
}

.govbar .motdue-disabled:hover{
    transform:none;
    filter:saturate(.55);
}

.govbar .motdue-superuser{
    width:40px !important;
    height:40px !important;
    margin:0 !important;
    padding:10px !important;
    border:1px solid #355170 !important;
    border-radius:9px !important;
    box-sizing:border-box;
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    background:#132e4c !important;
}

.govbar .motdue-superuser img{
    width:18px !important;
    height:18px !important;
    display:block !important;
}

.govbar .motdue-tooltip{
    position:relative;
}

.govbar .motdue-tooltip::after{
    content:attr(data-explanation);
    position:absolute;
    z-index:100;
    left:50%;
    top:calc(100% + 10px);
    transform:translateX(-50%);
    width:max-content;
    max-width:250px;
    padding:8px 10px;
    border:1px solid #4c6480;
    border-radius:7px;
    background:#101b2b;
    color:#fff;
    font-size:12px;
    font-weight:600;
    line-height:1.35;
    text-align:center;
    white-space:normal;
    box-shadow:0 6px 18px rgba(0,0,0,.4);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .15s ease;
}

.govbar .motdue-tooltip:hover::after,
.govbar .motdue-tooltip:focus::after{
    opacity:1;
    visibility:visible;
}

.govbar .logged-user,
.govbar .user,
.govbar .disclaimer,
.govbar .logos,
.govbar .spacer,
.govbar .auth-buttons,
.govbar .header-btn,
.govbar .brand,
.govbar .motdue-zephyr{
    display:none !important;
}

@media(max-width:1050px){
    .govbar-inner{
        width:calc(100% - 24px) !important;
        flex-wrap:wrap;
        gap:8px 12px !important;
    }

    .govbar .motdue-brand img{
        height:47px !important;
        max-width:185px;
    }

    .govbar .motdue-disclaimer{
        display:none;
    }

    .govbar .motdue-nav{
        flex:1 0 100%;
        margin-left:0 !important;
        overflow-x:auto;
        padding:2px 0 3px;
    }
}

@media(max-width:560px){
    .govbar-inner{
        width:calc(100% - 18px) !important;
        padding:8px 0 !important;
    }

    .govbar .motdue-brand img{
        height:39px !important;
        max-width:155px;
    }

    .govbar .motdue-service{
        padding-left:10px;
    }

    .govbar .motdue-title{
        font-size:15px;
    }

    .govbar .motdue-button{
        padding:9px 11px !important;
        font-size:12px !important;
    }

    .govbar .motdue-superuser{
        width:35px !important;
        height:35px !important;
        padding:8px !important;
    }
}





/* MOTDUE-HEADER-ALIGNMENT-V2-BEGIN */
@media (min-width: 901px) {
    .govbar-inner {
        position: relative !important;
        left: 110px !important;
    }
}

@media (max-width: 900px) {
    .govbar-inner {
        left: auto !important;
    }
}
/* MOTDUE-HEADER-ALIGNMENT-V2-END */


/* MOTDUE-MOBILE-HEADER-V1-BEGIN
   Keeps the header inside the screen. Desktop (over 1050px) looks the same;
   the clip only stops the header's empty right-hand margin widening the page. */
.govbar{
    overflow-x:clip;
}

@media(max-width:1050px){
    /* Some pages force nowrap on .govbar-inner; the nav needs its own row. */
    .govbar .govbar-inner{
        flex-wrap:wrap !important;
    }

    .govbar .motdue-nav{
        flex-wrap:wrap;
        overflow:visible;
    }

    .govbar .motdue-button,
    .govbar .motdue-superuser{
        flex-shrink:0;
    }
}

@media(max-width:560px){
    .govbar{
        min-height:0;
    }

    .govbar .govbar-inner{
        position:relative;
        width:auto !important;
        min-height:0;
        margin:0 !important;
        padding:8px 12px 10px !important;
        gap:8px 10px !important;
    }

    .govbar .motdue-service{
        flex:1 1 0;
        min-width:0;
    }

    .govbar .motdue-title{
        white-space:normal;
    }

    /* Superuser cog sits at the end of the logo row, so the four buttons
       can share the second row equally. */
    .govbar .govbar-inner:has(.motdue-superuser) .motdue-service{
        padding-right:46px;
    }

    .govbar .motdue-superuser{
        position:absolute;
        top:10px;
        right:12px;
    }

    .govbar .motdue-nav{
        display:grid !important;
        grid-template-columns:repeat(4,minmax(0,1fr));
        gap:6px !important;
        width:100%;
        padding:0;
    }

    .govbar .motdue-button{
        min-height:40px;
        padding:8px 4px !important;
        font-size:13px !important;
    }

    /* The "log in to use this" tooltip opens towards the middle of the
       screen, so it cannot run off the side under an outer button. */
    .govbar .motdue-tooltip::after{
        top:calc(100% + 8px);
        width:200px;
        max-width:none;
    }

    .govbar .motdue-garage.motdue-tooltip::after{
        left:0;
        transform:none;
    }

    .govbar .motdue-profile.motdue-tooltip::after{
        left:auto;
        right:0;
        transform:none;
    }
}

@media(max-width:360px){
    .govbar .govbar-inner{
        padding:7px 9px 9px !important;
    }

    .govbar .motdue-brand img{
        height:34px !important;
        max-width:132px;
    }

    .govbar .motdue-service{
        padding-left:9px;
    }

    .govbar .motdue-title{
        font-size:14px;
    }

    .govbar .motdue-superuser{
        top:8px;
        right:9px;
    }

    .govbar .motdue-nav{
        gap:5px !important;
    }

    .govbar .motdue-button{
        font-size:12px !important;
        padding:8px 2px !important;
    }
}
/* MOTDUE-MOBILE-HEADER-V1-END */

/* MOTDUE-ORIGINAL-NAV-COLOURS-BEGIN */

/* Cog remains dark navy */
body .govbar .motdue-nav .motdue-superuser{
    background:#132e4c !important;
    border-color:#355170 !important;
}

/* HOME — BLUE */
body .govbar .motdue-nav .motdue-button.motdue-home{
    background:#123a66 !important;
    border-color:rgba(255,255,255,.18) !important;
    color:#ffffff !important;
}

/* MY GARAGE — GREEN */
body .govbar .motdue-nav .motdue-button.motdue-garage{
    background:#208044 !important;
    border-color:rgba(255,255,255,.18) !important;
    color:#ffffff !important;
}

/* MY PROFILE — AMBER */
body .govbar .motdue-nav .motdue-button.motdue-profile{
    background:#c47c08 !important;
    border-color:rgba(255,255,255,.18) !important;
    color:#ffffff !important;
}

/* LOG OUT — RED */
body .govbar .motdue-nav .motdue-button.motdue-logout{
    background:#b9242b !important;
    border-color:rgba(255,255,255,.18) !important;
    color:#ffffff !important;
}

/* Login uses the same single red position */
body .govbar .motdue-nav .motdue-button.motdue-login{
    background:#b9242b !important;
    border-color:rgba(255,255,255,.18) !important;
    color:#ffffff !important;
}

/* Preserve the existing hover effect without replacing colours */
body .govbar .motdue-nav .motdue-button:hover,
body .govbar .motdue-nav .motdue-button:focus{
    filter:brightness(1.15) !important;
}

/* MOTDUE-ORIGINAL-NAV-COLOURS-END */
