/* Override Cover Block Dimmer from blocking navigation */
.ucla-main-nav {
  z-index: 10;
}

.ucla-header--school__logo-link {
  inline-size: unset;
}

.ucla-header--school__custom-logo, .ucla-header--mobile-logo {
  max-height: 2.75rem;
}

.ucla-header--school__custom-logo.ucla-header--has-mobile-logo, .ucla-dept-footer__custom-logo.ucla-footer--has-mobile-logo {
  display: none;
}

.skip-nav__link {
  color: #ffffff;
  background-color: #00598c;
  position: absolute;
  left: 50%;
  transform: translateY(-100%);
  padding: 4px;
}

.skip-nav__link:focus {
  transform: translateY(0%);
  transition: transform 0.3s;
}

.ucla-header__site-name > a.ucla-header__site-name-img {
  line-height: 0;
  display: inline-block;
}

.ucla-header__site-name > a.ucla-header__site-name-img > img {
  width: 100%;
  max-width: 450px;
  height: auto;
}

/*
 * Mega Menu Styles
 */
 .ucla-main-nav__mega-menu ul.wp-block-list.is-style-unstyled {
  padding-left: 0;
 }

 .ucla-main-nav__mega-menu a {
  text-decoration: none;
 }

 .ucla-main-nav__mega-menu a:not([class]):visited {
  color: #00598C;
 }

/* 
 * Secondary Navigation active class.
 * WordPress Menu CSS Class field only adds CSS classes to
 * the <li> element. This is the fix for the active class
 * in Design System 2.0.
 */

 li.ucla-secondary-nav__link--active > a.ucla-secondary-nav__link {
  background-color: #00598c;
  color: #fff;
}

/* Search */
.search.search-results > .ucla-header,
.search.search-no-results > .ucla-header {
  margin-bottom: 32px;
}

.post-template:not(.home) > .ucla-header,
.page-template:not(.home, .page-template-page-landing) > .ucla-header,
.page-template-default:not(.home) > .ucla-header,
.archive > .ucla-header,
.blog:not(.home) > .ucla-header,
.single-post > .ucla-header {
  margin-bottom: 32px;
}

/* WPML styles */
.ucla-header__logo:has(.ucla-header__logo-language-switcher) {
  justify-content: space-between;
}

.ucla-header__logo-language-switcher .wpml-ls {
  width: unset;
}

.ucla-header__logo-language-switcher .wpml-ls.wpml-ls-legacy-list-horizontal,
.ucla-header__logo-language-switcher .wpml-ls.wpml-ls-legacy-list-vertical {
  padding: 0;
}

.ucla-header__logo-language-switcher .wpml-ls ul .wpml-ls-item a {
  padding:0;
  border: 0;
  background-color: transparent;
  white-space: nowrap;
}

.ucla-header__logo-language-switcher .wpml-ls ul .wpml-ls-item a.wpml-ls-item-toggle {
  display: flex;
  align-items: center;
}

.ucla-header__logo-language-switcher .wpml-ls ul .wpml-ls-item a.wpml-ls-item-toggle:focus {
  outline: 1px solid white;
  outline-offset: 0;
}

.ucla-header__logo-language-switcher .wpml-ls ul .wpml-ls-item a span {
  color: white;
  font-size: 0.8rem;
}

.ucla-header__logo-language-switcher .wpml-ls:not(.wpml-ls-legacy-list-horizontal, .wpml-ls-legacy-list-vertical) ul:not(.wpml-ls-sub-menu) > .wpml-ls-item.wpml-ls-current-language > a::after {
  border: 0;
  display: block;
  position: static;
  margin-left: 4px;
  line-height: 0;
  content: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' height='20px' viewBox='0 -960 960 960' width='20px' fill='%23e3e3e3'%3E%3Cpath d='M480-80q-82 0-155-31.5t-127.5-86Q143-252 111.5-325T80-480q0-83 31.5-155.5t86-127Q252-817 325-848.5T480-880q83 0 155.5 31.5t127 86q54.5 54.5 86 127T880-480q0 82-31.5 155t-86 127.5q-54.5 54.5-127 86T480-80Zm0-82q26-36 45-75t31-83H404q12 44 31 83t45 75Zm-104-16q-18-33-31.5-68.5T322-320H204q29 50 72.5 87t99.5 55Zm208 0q56-18 99.5-55t72.5-87H638q-9 38-22.5 73.5T584-178ZM170-400h136q-3-20-4.5-39.5T300-480q0-21 1.5-40.5T306-560H170q-5 20-7.5 39.5T160-480q0 21 2.5 40.5T170-400Zm216 0h188q3-20 4.5-39.5T580-480q0-21-1.5-40.5T574-560H386q-3 20-4.5 39.5T380-480q0 21 1.5 40.5T386-400Zm268 0h136q5-20 7.5-39.5T800-480q0-21-2.5-40.5T790-560H654q3 20 4.5 39.5T660-480q0 21-1.5 40.5T654-400Zm-16-240h118q-29-50-72.5-87T584-782q18 33 31.5 68.5T638-640Zm-234 0h152q-12-44-31-83t-45-75q-26 36-45 75t-31 83Zm-200 0h118q9-38 22.5-73.5T376-782q-56 18-99.5 55T204-640Z'/%3E%3C/svg%3E");
}

.ucla-header__logo-language-switcher .wpml-ls-item > .wpml-ls-sub-menu {
  margin-top: 1px;
  background-color: #2774ae;
  border: 0;
  left: unset;
}

.ucla-header__logo-language-switcher .wpml-ls-sub-menu > li {
  padding: 0.5rem;
}

.ucla-header__logo-language-switcher .wpml-ls-legacy-list-horizontal .wpml-ls-current-language, .ucla-header__logo-language-switcher .wpml-ls-legacy-list-vertical .wpml-ls-current-language {
  font-weight: bold;
}

.ucla-header__logo-language-switcher .wpml-ls-legacy-list-horizontal ul .wpml-ls-item-legacy-list-horizontal:not(:first-child) {
  margin-left: 0.5rem;
}

@media (min-width:768px) {
  .ucla-header--school__custom-logo {
    max-height: 3.563rem;
  }
  .ucla-header--school__custom-logo.ucla-header--has-mobile-logo, .ucla-dept-footer__custom-logo.ucla-footer--has-mobile-logo {
    display: block;
  }

  .ucla-header--mobile-logo, .ucla-footer--mobile-logo {
    display: none;
  }
}

@media (min-width: 1024px) {
  .post-template:not(.home) > .ucla-header,
  .page-template:not(.home, .page-template-page-landing) > .ucla-header,
  .page-template-default:not(.home) > .ucla-header,
  .archive > .ucla-header,
  .blog:not(.home) > .ucla-header,
  .single-post > .ucla-header {
    margin-bottom: 64px;
  }
}