/* ==========================================================================
   04_NAVIGATION: MAIN
   --------------------------------------------------------------------------
   * README

   * DESKTOP AND MOBILE
   * DESKTOP ONLY
   * MOBILE ONLY
   * PENDING - TO BE IMPROVED
   ========================================================================== */

/* README
   ========================================================================== */

/*!
 * Styles on this stylesheet are the Main Navigation default styles.
 * That means they apply to the HTML you can find inside
 * {% block header__nav %}{% endblock %} in the headerContent.tpt file, and
 * therefore, they apply to all site pages.

 * At the moment we have not had to deal with any exception to these Main
 * Navigation default styles, but if it becomes necessary, let's talk about it
 * and use the opportunity to find the best approach to deal with it - as the
 * code it is already complex enough and I'm not happy with it.
 */

/* DESKTOP AND MOBILE
   ========================================================================== */

/* Structure
   -------------------------------------------------------------------------- */
.skip-content,
.skip-content:link,
.skip-content:visited {
    position: fixed;
    top: -40px;
    width: 300px;
    left: 50%;
    margin-left: -150px;
}

.skip-content.visibility--visually-hidden.focusable:active,
.skip-content.visibility--visually-hidden.focusable:focus {
    position: fixed;
    top: 0px;
    left: 50%;
    margin-left: -150px;
    width: 300px;
    max-width: 300px;
    padding: 0.25em;
}

/* Behaviour
   -------------------------------------------------------------------------- */
.tpt_menuRightSlideTrigger,
.tpt_menuRightSlideAllTrigger {
    display: none;
}

.nav [class$="__item__link"] {
    display: block;
    white-space: nowrap;
    -webkit-transition: color 0.3s;
    -ms-transition: color 0.3s;
    transition: color 0.3s;
    color: #004750;
    font-size: 18px;
}
@media all and (max-width: 768px){
    .nav [class$="__item__link"] {
    color: #FFFFFF;
}
}

.skip-content,
.skip-content:link,
.skip-content:visited {
    transition-property: top;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Appearance
   -------------------------------------------------------------------------- */
.nav__item__link:hover {
    text-decoration: underline
}

.nav__item--with-subnav:hover .subnav__item__link:hover {
    text-decoration: underline
}

.skip-content,
.skip-content:link,
.skip-content:visited {
    border-radius: 0 0 5px 5px;
    -webkit-box-shadow: 0 0 12px 0 rgba(91, 91, 91, .3);
    box-shadow: 0 0 12px 0 rgba(91, 91, 91, .3);
    background-color: #FFFFFF;
    text-align: center;
}

/* DESKTOP ONLY
   ========================================================================== */

@media all and (min-width:769px) {

    /* Structure
       -------------------------------------------------------------------------- */
    .nav {
        float: left;
        margin: 26px 0px 0px 30px;
    }

    .nav__list {
        float: left;
    }

    .nav__list--actions {
        padding-right: 20px;
    }

    .nav__list--user {
        padding-left: 20px;
    }

    .nav__item {
        float: left;
    }

    .nav__item + .nav__item {
        margin-left: 20px;
    }

    .nav__item__link {
        padding: 10px 6px;
    }

    .nav__item--username .nav__item__link:before {
        float: right;
        margin: 10px 6px;
    }
    .body--IE .nav__item--username .nav__item__link {
        padding-right: 20px;
    }
    .body--IE .nav__item--username .nav__item__link:before {
        margin-right: -12px;
    }

    .nav__item__link>img {
        float: left;
        margin-right: 10px;
        width: 24px;
    }

    .subnav__list {
        padding: 0 10px;
    }

    .nav__list--actions .subnav__list {
        width: auto;
        min-width: calc(100% + 4px);
    }

    .nav__list--user .subnav__list {
        width: auto;
        min-width: 100%
    }

    .subnav__item__link {
        padding: 12px 0;
    }

    /* Behaviour
       -------------------------------------------------------------------------- */
    .nav__heading {
        display: none;
    }

    .nav__item--with-subnav {
        position: relative;
    }

    .nav__item--with-subnav .nav__item__link {
        position: relative;
        z-index: 3;
    }

    .nav__item--active .nav__item__link {
        cursor: default;
    }

    .subnav__item--active .subnav__item__link {
        cursor: default;
    }

    .subnav__list {
        position: absolute;
        top: 100%;
        left: -9999px;
        z-index: 2;
    }

    .nav__item--with-subnav:hover .subnav__list {
        left: 0;
    }

    /* Appearance
       -------------------------------------------------------------------------- */
    .nav__list--user {
        border-left-width: 1px;
        border-left-style: solid;
        border-left-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
    }

    /*
     * 1. The height of the logged user image
     */
    .nav__item__link {
        line-height: 1; /* 1 */
    }

    .nav__item--active .nav__item__link {
        text-decoration: underline
    }

    .nav__item--with-subnav:hover .nav__item__link {
        -webkit-box-shadow: 0 -8px 12px 0 rgba(91, 91, 91, 0.15);
        box-shadow: 0 -8px 12px 0 rgba(91, 91, 91, 0.15);
        border-radius: 6px 4px 0 0;
        background: #FFFFFF;
    }

    .nav__item--username .nav__item__link:before {
        content: '';
        border-left: 3px solid transparent;
        border-top: 4px solid #000000;
        border-right: 3px solid transparent;
    }

    .nav__item__link>img {
        border-radius: 100%;
    }

    .subnav__item--active .subnav__item__link {
        text-decoration: underline
    }

    .subnav__list {
        -webkit-box-shadow: 0 0 12px 0 rgba(91, 91, 91, 0.15);
        box-shadow: 0 0 12px 0 rgba(91, 91, 91, 0.15);
        background: #FFFFFF;
    }

    .nav__list--actions .subnav__list {
        border-radius: 0 4px 4px 4px;
    }

    .nav__list--user .subnav__list {
        border-radius: 0 0 4px 4px;
    }

    .subnav__item+.subnav__item {
        border-top-width: 1px;
        border-top-style: solid;
        border-top-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
    }

    .subnav__item__link {
        font-size: 13px;
    }

    .subnav__item--active .subnav__item__link {
        text-decoration: underline
    }

}

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

@media all and (max-width:768px) {

    /* Structure
       -------------------------------------------------------------------------- */
    .header:not(.header--no-nav) .header__wrapper {
        padding-right: 50px;
    }

    .nav__list {
        padding: 0 22px;
    }
    .nav__list--user {
        border-top: solid 1px #1A5960;
        border-bottom: solid 1px #1A5960;
    }

    .nav__heading {
        margin: 16px 0 14px;
    }

    .nav__item__link {
        padding: 21px 3px;
    }

    .nav__item--with-subnav .nav__item__link {
        padding: 21px 3px 11px 3px;
    }

    .nav__list--actions .subnav__list {
        padding: 0 0 9px;
    }

    .nav__list--actions .subnav__item__link {
        padding: 12px 13px;
    }

    .nav__list--user .subnav__item__link {
        padding: 21px 3px;
    }

    /* Behaviour
       -------------------------------------------------------------------------- */
    .body {
        overflow-x: hidden;
    }

    .nav__heading {
        display: block;
    }

    .nav__item--username .nav__item__link {
        display: none;
    }

    /* Appearance
       -------------------------------------------------------------------------- */
    .nav__list--user li a{
        color: #FFFFFF !important;
    }

    .nav__item + .nav__item {
        border-top-width: 1px;
        border-top-style: solid;
        border-top-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
    }

    .nav__item__link {
        font-size: 16px;
        font-weight: bold;
    }

    .nav__item--active .nav__item__link {
        color: #FFFFFF;
    }

    .nav__list--user .subnav__item + .subnav__item {
        border-top-width: 1px;
        border-top-style: solid;
        border-top-color: #CACACA; /* var(--color--borders) in an IE free world - use this comment as a handler for smart find & replace! */
    }

    .nav__list--actions .subnav__item__link {
        font-size: 13px;
    }

    .nav__list--user .subnav__item__link {
        font-size: 16px;
        font-weight: bold;
    }

}

/* PENDING - TO BE IMPROVED
   ========================================================================== */

@media all and (max-width:768px) {

    /* MM: Trigger elements - pushing behaviour */
    .tpt_menuRightSlideAllTrigger {
        display: inline-block;
        position: absolute;
        top: 0;
        left: 0;
        height: 70px;
        padding: 0 22px;
        cursor: pointer;
        background-size: .4em 2em;
        background-position: 1.3em center;
        background-image: url('../images/icon--menu.svg');
        line-height: 70px;
        text-indent: -9999px;
        overflow: hidden;
    }

    .tpt_menuRightSlideAllTrigger:hover,
    .tpt_menuRightSlideAllTrigger:focus,
    .tpt_menuRightSlideAllTrigger:active {
        background-color: #F0F0F0;
        outline-width: 0;
        background-image: url('../images/icon--menu.svg');
    }

    .tpt_menuRightSlideAllTrigger.open {
        outline-width: 0;
        background-image: url('../images/icon--menu.svg');
    }

    /* MM: Menu elements - pushing behaviour */
    .tpt_menuRightSlideAll {
        position: absolute;
        display: block;
        z-index: 100000;
        top: 0;
        left: -265px;
        width: 265px;
        padding: 0;
        max-width: 100%;
        height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        color: #FFFFFF;
        background-color: #252525;
        -webkit-box-shadow: inset -5px 0 10px #000000;
        box-shadow: inset -5px 0 10px #000000
    }

    /* MM: Notified elements - pushing behaviour */
    html.tpt_menuRightSlideAllNotificationOpen,
    html.tpt_menuRightSlideAllNotificationOpen > .body {
        overflow-y: hidden;
        overflow-x: hidden;
        width: 100vw;
        height: 100%;
        min-height: 100%;
        background-color: #252525;
    }

    .body__content {
        -webkit-transition: -webkit-transform 200ms ease-out 0s;
        -ms-transition: transform 200ms ease-out 0s;
        transition: transform 200ms ease-out 0s;
    }

    .tpt_menuRightSlideAllNotificationOpen .body__content {
        -webkit-transform: translate(265px, 0);
        -ms-transform: translate(265px, 0);
        transform: translate(265px, 0);
        -webkit-transform: translate3d(265px, 0, 0);
        transform: translate3d(265px, 0, 0);
    }

    .fallbackMenu.tpt_menuRightSlideAllNotificationOpen .body__content {
        position: relative;
        left: 265px;
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
    }

    /* MM: Trigger elements - over behaviour */
    .tpt_menuRightSlideTrigger {
        display: block;
        position: absolute;
        height: 80px;
        line-height: 80px;
        top: 0;
        right: 15px;
        padding: 0 25px;
        cursor: pointer;
        background-image: url('../images/icon--menu.svg');
        background-position: center center;
        background-size: 2em 2em;
        -webkit-transition: -webkit-transform 200ms ease-out 0s;
        -ms-transition: transform 200ms ease-out 0s;
        transition: transform 200ms ease-out 0s;
        text-indent: -9999px;
        overflow: hidden;
        z-index: 2;
    }

    .tpt_menuRightSlideTrigger:hover,
    .tpt_menuRightSlideTrigger:focus,
    .tpt_menuRightSlideTrigger:active {
        outline-width: 0;
    }

    .tpt_menuRightSlideTrigger.open {
        outline-width: 0;/*-webkit-transform:translate(265px,0);-ms-transform:translate(265px,0);transform:translate(265px,0);-webkit-transform:translate3d(265px,0,0);transform:translate3d(265px,0,0);*/
    }

    .tpt_menuRightSlideTrigger.nav__closing {
        position: static;
        float: right;
        height: 20px;
        line-height: 20px;
        padding: 0;
        background-image: url(../images/icon-close-white.svg);
        text-indent: 0;
        text-align: center;
        color: #FFFFFF;
        border-radius: 100%;
        display: block;
        width: 20px;
        font-size: 12px;
        font-weight: bold;
        margin: 7px 0px;
    }

    .fallbackMenu .tpt_menuRightSlideTrigger.open {
        right: 265px;
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
    }

    /* MM: Menu elements - over behaviour */
    .tpt_menuRightSlide {
        display: block;
        position: absolute;
        top: 0;
        right: -265px;
        z-index: 7;
        overflow-x: hidden;
        overflow-y: auto;
        width: 265px;
        max-width: 100%;
        height: 100vh;
        padding: 0;
        color: #424242;
        background-color: #004750;
        -webkit-transition: -webkit-transform 200ms ease-out 0s;
        -ms-transition: transform 200ms ease-out 0s;
        transition: transform 200ms ease-out 0s;
    }

    .tpt_menuRightSlide.open {
        -webkit-box-shadow: 0 0 20px 1px rgba(91, 91, 91, 0.3);
        box-shadow: 0 0 20px 1px rgba(91, 91, 91, 0.3);
        -webkit-transform: translate(-265px, 0);
        -ms-transform: translate(-265px, 0);
        transform: translate(-265px, 0);
        -webkit-transform: translate3d(-265px, 0, 0);
        transform: translate3d(-265px, 0, 0);
    }

    .fallbackMenu .tpt_menuRightSlide.open {
        right: 0;
        -webkit-transform: none;
        -ms-transform: none;
        transform: none;
    }

    a[class*="Trigger"].open:not(.nav__closing):before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        z-index: 6;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0,71,80,0.70);
        cursor: default;
    }

}
