/* Styles for the new header */
/* Paperthin - BD - 11/2019 */

/* 
Colors:

Dark Blue: #062042
Medium Blue: #01428c
Light Blue: #658fba 
*/

.header-top {
    background-color: #062042;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0 20px;
}

    .header-top, 
    .header-top a,
    .header-top a:visited {
        color: #fff;
    }

        .logo img {
            width: 100%;
            max-width: 300px;
            height: auto;
            margin-top: 5px;
        }

        .header-nav {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            justify-content: space-between;
        }

            .header-nav-secondary,
            .header-nav-primary {
                display: flex;
                flex-direction: row;
                justify-content: flex-end;
                align-items: center;
            }

            .header-nav-secondary {
                align-items: flex-start;
                margin-bottom: 10px;
            }

               .header-nav-secondary a, 
               .header-nav-secondary input {
                    display: inline-block;
                    padding: 5px 15px;
                    margin-left: 3px;
                    background-color: #01428c;
                    text-decoration: none;
                    border: 1px solid transparent;
                }

                .header-nav-secondary a:hover {
                    background-color: #00346f;
                }

                .site-search-top {
                    display: flex; 
                    justify-content: flex-end;
                    align-items: center;
                }

                    /* We need this for accessibility, but hididng for others */
                    .site-search-top label {
                        position: absolute;
                        left: -10000000px;
                    }

                    .site-search-top input {
                        background-color: black;
                        color: rgba(255,255,255,.9);
                        width: fit-content;
                    }

                    .site-search-top input:focus {
                        background-color: black;
                    }

                    .site-search-top input[type="submit"] {
                        margin: 0;
                        background-image: url(https://www.shu.edu/images/sprite.png);
                        background-position: 1px 5px;
                        width: fit-content;
                    }
            
            .header-nav-primary .mobile-only {
                display: none;
            }

            .header-nav-primary .site-search-top {
                padding: .5em 1em;
            }

                .header-nav-primary .site-search-top input {
                    border: 1px solid black;
                    padding: 3px;
                }

                .header-nav-primary .site-search-top input[type="submit"] {
                    width:30px;
                }

            .header-nav-primary a {
                padding: 12px 10px;
                margin-left: 3px;
                text-decoration: none;
                display: block;
                position: relative;
            }

            .header-nav-primary a:hover {
                text-decoration: underline;
            }

            .header-nav-primary a.highlighted:after {
                content: ' ';

            }

            .header-nav-primary a.has-submenu.highlighted .sub-arrow {
                background-color: white;
                position: absolute;
                bottom: -6px;
                height: 10px;
                width: 12px;
                left: calc(50% - 6px);
                transform: rotate(45deg);
            }

            .header-nav-primary .has-mega-menu .mega-menu {
                color: #333;
                background-color: #eee;
                width: 100%;
                max-width: 100% !important;
                left: 0 !important;
                right: 0 !important;
                margin: 0 !important;
                position: absolute;
                box-shadow: 0 2px 5px rgba(0,0,0,.3);
                padding: 1em;
            }

            .header-nav-primary .has-mega-menu .mega-menu ul {
                display: block !important;
            }

            .header-nav-primary .has-mega-menu .mega-menu ul a {
                color: #048;
                padding: 3px 0;
            }

            .main-menu-btn,
            #main-menu-state,
            .mobile-search-btn,
            #mobile-search-state,
            .mobile-search-form label {
                position: absolute;
                top: -99999px;
            }

            #main-menu-state:not(:checked) ~ #cs_control_624644.header-nav-primary {
                display: flex;
            }

            .mobile-search-form {
                display: none;
            }

@media(max-width: 1023px) {
    .header-nav-primary li img {
        display:none
    }
}
    
@media (min-width: 900px){
    em.mobile-search-closed{display:none;}
    em.fa-bars {display:none;}
}

@media (max-width: 899px) {
    
	div.mobile-search:focus-within, div#mobile-menu:focus-within {
		color: #8dacd6;
		outline: 1px solid white;
		padding: 10px;
	}	
	
	 .header-top {
        padding: 10px;
        flex-direction: column-reverse;
        background-color: #01428c;
        padding-left: 0;
        padding-right: 0;
    }

    .logo img {
        margin-top: 18px;
        /*width: 180px;*/
    }

    .header-nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background-color: #062042;
        padding: 10px 15px;

    }
	
    .mobile-search {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }

    .mobile-search-form input[type="text"] {
        width: 300px;
    }

    .main-menu-btn,
    .mobile-search-btn {
        position: relative;
        top: auto;
        height: 30px;
        overflow: hidden;
        line-height: 2em;
        text-align: right;
    }   

        .mobile-search-btn .mobile-search-closed {
            font-size: 1.2em;
        }
	
	
    .main-menu-btn {
        width: 85px;
        text-indent: 30px;
        /* right: -26%; */
    }

    .mobile-search-open {
        display: inline-block;
    }

    .main-menu-btn-icon, 
    .main-menu-btn-icon:before, 
    .main-menu-btn-icon:after,
    .mobile-search-open:before,
    .mobile-search-open:after {
        position: absolute;
        top: 50%;
        left: 10px;
        height: 2px;
        width: 20px;
        background: #fff;
        -webkit-transition: all 0.25s;
        transition: all 0.25s;
    }

    .main-menu-btn-icon:before,
    .mobile-search-open:before {
        content: '';
        top: -7px;
        left: 0;
    }

    .main-menu-btn-icon:after,
    .mobile-search-open:after {
        content: '';
        top: 7px;
        left: 0;
    }

    .header-nav-secondary {
        display: none;
    } 

    .mega-menu li .fr-rw {
        width: auto;
    }

    #main-menu-state:not(:checked) ~ #cs_control_624644 .header-nav-primary,
    #mobile-search-state:not(:checked) ~ .mobile-search-form,
    #mobile-search-state:not(:checked) ~ .mobile-search-btn .mobile-search-open
     {
        display: none;
    }

    #main-menu-state:checked ~ #cs_control_624644 .header-nav-primary {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        left: 0;
        right: 0;
        top: 60px;
        background-color: #eee;
        position: absolute;
    }

        #main-menu-state:checked ~ #cs_control_624644 .header-nav-primary li {
            display: block;
            width: 100%;
        }

        #main-menu-state:checked ~ #cs_control_624644 .header-nav-primary a {
            color: #333;
            border-bottom: 1px solid rgba(0,0,0,.1);
        }


        #main-menu-state:checked ~ #cs_control_624644 .header-nav-primary .has-mega-menu .mega-menu {
            position: relative;
            box-shadow: none;
            background-color: #fff;
            padding: 0;
        }

        .header-nav-primary a.has-submenu .sub-arrow,
        #main-menu-state:checked ~ #cs_control_624644 .header-nav-primary a.has-submenu .sub-arrow {
            position: absolute;
            right: 8px;
            top: 8px;
            height: 30px;
            width: 30px;
            background-color: rgba(0,0,0,.1);
            color: rgba(0,0,0,.2);
        }

        .header-nav-primary a.has-submenu .sub-arrow:before {
            content: '+';
        }

        #main-menu-state:checked ~ #cs_control_624644 .header-nav-primary a.has-submenu .sub-arrow {
            transform: none;
            left: auto;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.3em;
            font-weight: 800;
        }

        .header-nav-primary a.has-submenu.highlighted .sub-arrow:before {
            content: '-';
            margin-top: -5px;
        }

        #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon {
            height: 0;
            background: transparent;
        }

        #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:before {
            top: 0;
            -webkit-transform: rotate(-45deg);
            transform: rotate(-45deg);
        }

        #main-menu-state:checked ~ .main-menu-btn .main-menu-btn-icon:after {
            top: 0;
            -webkit-transform: rotate(45deg);
            transform: rotate(45deg);
        }
        
    #mobile-search-state:checked ~ .mobile-search-form {
        display: block;
    }

        #mobile-search-state:checked ~ .mobile-search-btn .mobile-search-closed {
            display: none;
        }

        #mobile-search-state:checked ~ .mobile-search-btn .mobile-search-open {
            display: inline-block;
            position: relative;
            width: 30px;
            height: 30px;
        }

            #mobile-search-state:checked ~ .mobile-search-btn .mobile-search-open:before {
                top: 15px;
                -webkit-transform: rotate(-45deg);
                transform: rotate(-45deg);
            }

            #mobile-search-state:checked ~ .mobile-search-btn .mobile-search-open:after {
                top: 15px;
                -webkit-transform: rotate(45deg);
                transform: rotate(45deg);
            }

    .header-nav-primary .mobile-only {
        display: block;
    }


}