// _header.scss

.header-grid {
    background: $gorilla;
    text-align: center;

    .logo-grid {
        float: left;
        text-align: left;
        width: 300px;

        .navigate-to {

            &-wr,
            &-hc {
                color: $white;
                display: inline-block;
                text-decoration: none;
                vertical-align: top;
            }

        }

        .navigate-to-wr {
            cursor: pointer;
            font-size: 11px;
            height: 40px;
            text-align: left;
            width: 108px;

            .back-link-txt {
                left: 50%;
                line-height: 14px;
                padding-left: 20px;
                position: absolute;
                top: 50%;
                transform: translate(-50%, -20%);

                &:before {
                    content: "";
                    background: url("../images/glyph-back-arrow.svg") no-repeat center center;
                    height: 15px;
                    left: -5%;
                    position: absolute;
                    top: 25%;
                    width: 15px;
                }

            }

        }

        .navigate-to-hc {
            font-size: 17px;
            padding: 14px 0 0 12px;
            position: relative;

            &:before {
                background: $timberwolf;
                content: "";
                display: block;
                height: 26px;
                position: absolute;
                left: 0;
                top: 13px;
                width: 2px;
            }

        }

    }

    .header-search-bar {
        display: inline-block;
        max-width: calc(100% - 700px);
        width: 100%;

        h1 {
            color: $white;
            margin-bottom: 20px;
        }

        .searchform {
            position: relative;

            &.search-term {

                .search-input {

                    &-submit-btn {
                        display: none;
                    }

                    &-reset-btn {
                        display: block;
                    }

                }

            }

            .search-input {

                &-box {
                    background: $nero-grey;
                    border-radius: 2px;
                    border: 1px solid $nero-grey-light;
                    border-right: 0;
                    color: $white;
                    padding: 12px 43px 12px 20px;
                    width: 100%;

                    &:focus,
                    &:hover {
                        box-shadow: 0 0 5px 0 rgba(255, 255, 255, 0.5);
                        outline: none;
                    }

                    &:-webkit-autofill {
                        -webkit-box-shadow: 0 0 5px 100px $nero-grey inset;
                        -webkit-text-fill-color: $white;

                        &:focus {
                           box-shadow: 0 0 5px 0 rgba(255, 255, 255, 0.5), 0 0 5px 100px $nero-grey inset;
                        }

                    }

                }

                &-submit-btn {
                    background: url("../images/glyph-search.svg") no-repeat center center;
                    border: none;
                    height: 43px;
                    outline: none;
                    position: absolute;
                    right: 0;
                    top: 0;
                    text-indent: -10000;
                    width: 43px;
                }

                &-reset-btn {
                    background: url("../images/glyph-search-cancel.svg") no-repeat center center;
                    border: none;
                    display: none;
                    height: 43px;
                    outline: none;
                    position: absolute;
                    right: 0;
                    top: 0;
                    text-indent: -10000;
                    width: 43px;
                }

            }

        }

    }

    .top-right-section {
        float: right;
        text-align: right;
        width: 370px;

        > .section {
            display: inline-block;
            vertical-align: middle;

            .display-text {
                background: none;
                border: none;
                color: $white;
                position: relative;
                padding-right: 20px;
                outline: 0;

                > .arrow {
                    background: url(../images/down-caret-icon.svg) no-repeat center center;
                    height: 8px;
                    margin-top: -5px;
                    position: absolute;
                    right: 0;
                    top: 50%;
                    width: 10px;
                }

            }

            a:hover,
            a:focus {
                text-decoration: none;
            }

            &.language-switcher {

                .dropdown-menu {
                    margin-top: 10px;
                }

            }

            &.user-details {
                margin: 0 10px 0 15px;
                max-width: 250px;

                .user-name {
                    font-size: 11px;
                }

                ul {
                    margin-left: 20px;
                }

            }

        }

    }

}

.breadcrumb-disabled {

    .header-grid {
        padding-bottom: 95px;
    }

}

// Flip Animation for Back To Workstation Link
.animate-container {
    display: inline-block;
    position: relative;
    z-index: 1;

    .animate-grid {
        transition: transform 0.5s ease-out;
        transform-style: preserve-3d;

        .front-face {
            position: absolute;
        }

        .back-face {
            transform: rotateY(180deg);
            position: relative;
        }

        .front-face,
        .back-face {
            background: $gorilla;
            backface-visibility: hidden;
            -webkit-backface-visibility: hidden;
            height: 100%;
            width: 100%;
        }

    }

    &:hover .animate-grid {
        transform: rotateY(180deg);
    }

}

.template-front-page {

    .animate-grid {
        animation: flip 2s linear normal;
    }

}

@keyframes flip {

    0% {
        transform: rotateY(0deg);
    }

    20% {
        transform: rotateY(0deg);
    }

    40% {
        transform: rotateY(180deg);
    }

    60% {
        transform: rotateY(180deg);
    }

    80% {
        transform: rotateY(360deg);
    }

    100% {
        transform: rotateY(360deg);
    }

}
