/* CSS Styles for oss_header_content */
/* Override bootstrap nav background and color. Remove the bootstrap bottom margin. */
nav.navbar.myucdavis-main-menu {
    background-color: #002855;
    background-image: linear-gradient(to bottom, #335379, #002855);
    background-repeat: repeat-x;
    color: #fff;
    box-sizing: border-box;
    margin-bottom: 0;
    font-family: proximanova-regular;
}

/* Show Accessible Links in place of the logo */
nav.myucdavis-main-menu .accessible-links-wrapper:has(.accessible-link:focus) .navbar-brand {
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    position: absolute !important;
}

nav.myucdavis-main-menu .accessible-links-wrapper .accessible-link:focus {
    width: 120px;
    margin-right: 12px;
    font-size: 14px;
    text-align: center;
}

/* Override bootstrap navbar link color to white and add a 3px bottom border */
nav.myucdavis-main-menu a.dropdown-toggle.nav-link,
nav.myucdavis-main-menu .navbar-nav a.nav-link {
    color: #fff;
    box-sizing: border-box;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s;
    padding: 13px 10px;
    font-size: 14px;
}

/* Add bottom border to navbar elements and override color to white. */
nav.myucdavis-main-menu .navbar-nav a.dropdown-toggle.nav-link:hover,
nav.myucdavis-main-menu .navbar-nav a.dropdown-toggle.nav-link[aria-expanded=true],
nav.myucdavis-main-menu .navbar-nav a.nav-link:hover,
nav.myucdavis-main-menu .navbar-nav a.nav-link:focus {
    color: #fff;
    background: #355B85;
    height: 100%;
    border-bottom: 3px solid #daaa00;
    box-sizing: border-box;
}

/* Override the navbar padding */
nav.myucdavis-main-menu.navbar,
nav.myucdavis-main-menu a.navbar-brand {
    padding-bottom: 0;
    padding-top: 0;
}

/* Make sure the nav-items and nav-links fill the height of their parent */
nav.myucdavis-main-menu.navbar .nav-item,
nav.myucdavis-main-menu.navbar .nav-item .nav-link {
    height: 100%;
}

nav.myucdavis-main-menu.navbar .nav-item .nav-link svg{
    height: 1.2rem;
    width: 1.2rem;
}

/* Remove the margin from the dropdown menus so they render in the correct place */
nav.myucdavis-main-menu.navbar ul {
    margin: 0;
}

/* Force the myucdavis logo to be max 120px */
nav.myucdavis-main-menu.navbar .navbar-brand img {
    width: 120px;
    max-width: 100%;
    height: auto;
}

nav.myucdavis-main-menu.navbar .nav-item.dropdown a span svg{
    width: 1.2rem;
    height: 1.2rem;
    color: #FFBF00;
    text-shadow: 0px -1px #C69502;
}

/* Color the dropdown triangle icon the UCD gold color */
nav.myucdavis-main-menu.navbar .nav-item.dropdown a:after {
    color: #daaa00;
}

/* Override the MYUCDAVIS styles that cause the bootstrap 5 menu to not render on the homepage */
nav.myucdavis-main-menu.navbar .collapse {
    position: inherit;
    height: auto;
    overflow: inherit;
}

/* The Triangle Point out of the top of dropdown menus. Shift the LAST dropdown menu to the right side */
nav.myucdavis-main-menu.navbar .dropdown-menu-end::before,
nav.myucdavis-main-menu.navbar .dropdown-menu-end::after {
    left: auto;
    right: 12px;
}

/* Used to hide icons in the main menu. */
nav.myucdavis-main-menu.navbar .hide {
    display: none;
}

/* Change Z-Index to appear in front of grid menu */
nav.myucdavis-main-menu.navbar .dropdown-menu {
    z-index: 25000;
}

.modal-xxl {
    max-width: 90vw;
    max-width: 1920px;
    max-width: min(90vw, 1920px);
    max-height: 90vh;
}

.saot .accordion-button.accordion-button-icon-start::after {
    display: none;
}

.saot .accordion-button.accordion-button-icon-start::before {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 1em;
    content: "";
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    transition: transform .2s ease-in-out;
}

.saot .accordion-button.accordion-button-icon-start:not(.collapsed)::before {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-180deg);
}

/* Responsive adjustments using Bootstrap breakpoints */
@media (max-width: 991.98px) {
    /*  */
    nav.myucdavis-main-menu.navbar .navbar-brand img {
        width: 100px;
    }

    nav.myucdavis-main-menu .navbar-nav .nav-link {
        padding: 10px 8px;
        font-size: 11px;
    }

    /* Hide the white triangle at the top of the dropdown menus */
    nav.myucdavis-main-menu.navbar .dropdown-menu::before,
    nav.myucdavis-main-menu.navbar .dropdown-menu::after {
    display: none;
}

    /* When the menu is expanded in a mobile layout, make sure it only takes up most
        of the screen and is scrollable. */
    nav.myucdavis-main-menu.navbar .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }

    /* Make sure the main menu stays the same size, large enough to be reasonably clicked. */
    nav.myucdavis-main-menu.navbar .navbar-toggler{
        min-height: 49px;
    }

    /* Make the dropdown menus not white background */
    nav.myucdavis-main-menu.navbar .dropdown-menu {
        background: #335379;
        padding: 0 10px 10px;
    }
    nav.myucdavis-main-menu.navbar .dropdown-menu .dropdown-item {
        background: #002855 !important;
    }
    nav.myucdavis-main-menu.navbar .navbar-nav .nav-link, 
    nav.myucdavis-main-menu.navbar .nav-item .dropdown-item,
    nav.myucdavis-main-menu .navbar-nav a.nav-link:focus {
        border-radius: 3px;
        background-color: #002855;
        color: #fff;
        box-sizing: border-box;
        margin-bottom: 3px;
        padding: 10px 15px 10px;
        border: 1px solid #355B85;
        box-sizing: border-box;
    }

    /* Style the nav links */
    nav.myucdavis-main-menu .navbar-nav a.dropdown-toggle.nav-link:hover,
    nav.myucdavis-main-menu .navbar-nav a.dropdown-toggle.nav-link[aria-expanded=true],
    nav.myucdavis-main-menu .navbar-nav a.nav-link:hover,
    nav.myucdavis-main-menu .navbar-nav a.nav-link:focus {
        color: #fff;
        background: #355B85;
        height: 100%;
        border: inherit;
        box-sizing: border-box;
    }
}