@import "variables.less";
@import "mixins.less";
@import "base.less";
 // Global nav //
#ou-head #ou-header {
    .ou-ia-nav {
        margin-top: 0;
        //font-size: 0.875rem;
        ul {
            li {
                display: inline-block;
                top: .5em;

                a {
                    text-decoration: none;
                    color: #FFFFFF;
                    padding: 4px 11px;
                    border-radius: 3px;

                    &:focus-visible {
                        border-radius: 0 15px 0 0;
                        outline: 2px solid #FDF289;
                    }

                    &:hover {
                        text-decoration: underline;
                    }

                    &.ou-button {
                        .ou-button();
                    }
                }
            }

            &.ou-ia-international {
                li a.ou-button {
                    .ou-international-button();
                }
            }
        }

        li {
            &.ou-ia-open,
            &.ou-ia-study {
                .visibilityHidden();
            }
        }

        .ou-search {
            .ou-search();
        }
    }

    #ou-header-nav {
        a.ou-ia-public {
            .visibilityVisible();
        }

        #ou-service-links {
            ul li a.ou-ia-student,
            ul li a.ou-ia-tutor {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open); //chains onto
            }

            li {
                &.ou-ia-open {
                    .visibilityHidden();
                }

                &.ou-ia-public {
                    visibility: visible;
                    display: inline-table;
                }
            }
        }

        .ou-ia-international {
            .visibilityHidden();
        }
    }
}

// highlight an IA
body.ou-ia-courses #ou-head #ou-header .ou-ia-nav li.ou-ia-courses a,
body.ou-ia-postgraduate #ou-head #ou-header .ou-ia-nav li.ou-ia-postgraduate a,
body.ou-ia-inter_national #ou-head #ou-header .ou-ia-nav li.ou-ia-inter_national a,
body.ou-ia-research #ou-head #ou-header .ou-ia-nav li.ou-ia-research a,
body.ou-ia-about #ou-head #ou-header .ou-ia-nav li.ou-ia-about a,
body.ou-ia-news #ou-head #ou-header .ou-ia-nav li.ou-ia-news a,
body.ou-ia-employers #ou-head #ou-header .ou-ia-nav li.ou-ia-employers a,
body.ou-ia-employers #ou-head #ou-header .ou-ia-nav li.ou-ia-business a,
body.ou-ia-business #ou-head #ou-header .ou-ia-nav li.ou-ia-business a,
body.ou-ia-studenthome #ou-head #ou-header .ou-ia-nav li.ou-ia-studenthome a,
body.ou-ia-profile #ou-head #ou-header .ou-ia-nav li.ou-ia-profile a,
body.ou-ia-dashboard #ou-head #ou-header .ou-ia-nav li.ou-ia-dashboard a,
body.ou-ia-library #ou-head #ou-header .ou-ia-nav li.ou-ia-library a,
body.ou-ia-careers #ou-head #ou-header .ou-ia-nav li.ou-ia-careers a,
body.ou-ia-community #ou-head #ou-header .ou-ia-nav li.ou-ia-community a,
body.ou-ia-helpcentre #ou-head #ou-header .ou-ia-nav li.ou-ia-helpcentre a,
body.ou-ia-open #ou-head #ou-header .ou-ia-nav li.ou-ia-open a,
body.ou-ia-study #ou-head #ou-header .ou-ia-nav li.ou-ia-study a,
body.ou-ia-dashboard #ou-head #ou-header .ou-ia-nav li.ou-ia-study a {
    .iaNavActive();
}

body {
    // Open Learn
    &.ou-ia-openlearn {
        #ou-head #ou-header .ou-ia-nav {
            li.ou-ia-courses,
            li.ou-ia-postgraduate,
            li.ou-ia-inter_national,
            li.ou-ia-news,
            li.ou-ia-research,
            li.ou-ia-about,
            li.ou-ia-business,
            li.ou-ia-employers {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            li.ou-ia-open,
            li.ou-ia-study {
                //.visibilityVisible();
                &:extend(#ou-head #ou-header #ou-header-nav a.ou-ia-public);
            }
        }

        #ou-head #ou-header #ou-header-nav #ou-service-links {
            li {
                &.ou-ia-open {
                    visibility: visible;
                    display: inline-table;
                }

                &.ou-ia-public,
                &.ou-search.ou-ia-public {
                    .visibilityHidden();
                }
            }
        }
    }

    &.ou-ia-nonav {
        #ou-head #ou-header {
            #ou-ia-nav {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            #ou-service-links {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            .ou-mobile-menu-toggle {
                display: none;
            }
        }
    }

    &.ou-ia-isw-nonav {
        #ou-head #ou-header {
            #ou-ia-nav {
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            #ou-service-links {
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            .ou-mobile-menu-toggle {
                display: none;
            }

            #ou-head #ou-header-nav {
                #ou-ia-nav {
                    ul.ou-ia-international {
                        &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
                    }
                }
            }
        }

        #ou-org-footer {
            .ou-header .ou-crest,
            .ou-header .ou-footer-title,
            .ou-footer-nav #ou-ia-international {
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            .ou-small-print {
                padding-left: 72px;
            }
        }
    }
    // Nations
    &.ou-ia-student,
    &.ou-ia-tutor,
    &.wales,
    &.roi,
    &.nir,
    &.scotland,
    &.cymraeg {
        #ou-head #ou-header #ou-ia-nav {
            //.visibilityHidden();
            &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
        }
    }
    // Tutors
    &.ou-ia-tutor {
        #ou-head #ou-header #ou-header-nav #ou-service-links ul li {
            a.ou-ia-student,
            a.ou-ia-public {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            a.ou-ia-tutor,
            a.ou-display-public-tutor {
                //.visibilityVisible();
                &:extend(#ou-head #ou-header #ou-header-nav a.ou-ia-public);
            }
        }

        .ou-footer-nav ul li {
            a.ou-ia-tutor {
                visibility: visible;
                display: block;
                border-right: none;
            }

            a.ou-ia-student,
            a.ou-ia-public {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }
        }
    }
    // Students
    &.ou-ia-student {
        #ou-head #ou-header {
            #ou-ia-nav {
                .visibilityVisible();

                .ou-ia-students {
                    .visibilityVisible();
                }

                .ou-ia-public {
                    .visibilityHidden();
                }
            }

            #ou-header-nav {
                #ou-service-links ul li {
                    a.ou-ia-student {
                        //.visibilityVisible();
                        &:extend(#ou-head #ou-header #ou-header-nav a.ou-ia-public);
                    }

                    a.ou-ia-tutor,
                    a.ou-ia-public,
                    a.ou-display-public-tutor {
                        //.visibilityHidden();
                        &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
                    }
                }
            }
        }

        #ou-org-footer {
            #ou-ia-student {
                visibility: visible;
                display: block;
                margin-left: 0px;
            }

            #ou-ia-public {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }
        }
    }
    // Override the Study IA link in student site navigation to make it visible
    #ou-head #ou-header .ou-ia-nav li.ou-ia-study.student {
        .visibilityVisible();
    }
    // International Student Website
    &.ou-ia-international {
        #ou-head #ou-header {
            #ou-service-links {
                .visibilityHidden();
                //&:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }

            .ou-mobile-menu-toggle {
                display: none;
            }

            #ou-header-nav {
                #ou-ia-nav {
                    .visibilityVisible();

                    .ou-ia-international {
                        .visibilityVisible();
                        display: block;
                    }

                    .ou-ia-public {
                        .visibilityHidden();
                    }
                }
            }
        }

        #ou-org-footer {
            #ou-ia-international {
                visibility: visible;
                display: block;
            }

            #ou-ia-public,
            #ou-ia-student,
            #ou-ia-outis1bd-footer {
                //.visibilityHidden();
                &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
            }
        }
    }
    // Footer
    #ou-org-footer {
        #ou-ia-student,
        #ou-ia-international,
        #ou-ia-outis1bd-footer {
            //.visibilityHidden();
            &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);
        }

        #ou-ia-public {
            visibility: visible;
            //US-590505_Footer_OU_Public_:na5649
            display: flex;
        }
    }

    .ou-footer-nav a.ou-ia-tutor {
        //.visibilityHidden();
        &:extend(#ou-head #ou-header .ou-ia-nav li.ou-ia-open);

    }
}
