themes/olivero/css/components/navigation/nav-primary-button.css
/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Button that expands second level nav when clicked.
 */

.primary-nav__button-toggle {
  position: relative;
  overflow: hidden;
  width: var(--sp2);
  height: var(--sp2);
  margin-block-start: var(--sp0-5); /* Visually align button with menu link text. */
  padding-block: 0;
  padding-inline-start: 0;
  padding-inline-end: 0;
  cursor: pointer;
  text-indent: -62.4375rem;
  border: 0;
  background: transparent;
  -webkit-appearance: none;
}

.primary-nav__button-toggle:focus {
  outline: auto 2px var(--color--primary-50);
  outline-offset: 2px;
}

.primary-nav__button-toggle .icon--menu-toggle {
  position: absolute;
  /* stylelint-disable csstools/use-logical */
  top: 50%;
  left: 50%;
  /* stylelint-enable csstools/use-logical */
  width: 1rem;
  height: 1rem;
  transition: background-color 0.2s;
  transform: translate(-50%, -50%);
  border-radius: 2px;
}

:is(.primary-nav__button-toggle .icon--menu-toggle)::before,
:is(.primary-nav__button-toggle .icon--menu-toggle)::after {
  position: absolute;
  /* stylelint-disable csstools/use-logical */
  top: 50%;
  left: 50%;
  /* stylelint-enable csstools/use-logical */
  width: var(--sp);
  height: 0;
  content: "";
  transform: translate(-50%, -50%);
  /* Intentionally not using CSS logical properties. */
  border-top: solid 3px var(--color--primary-50);
}

:is(.primary-nav__button-toggle .icon--menu-toggle)::after {
  transition: opacity 0.2s;
  transform: translate(-50%, -50%) rotate(90deg);
}

.primary-nav__button-toggle[aria-expanded="true"] .icon--menu-toggle::after {
  opacity: 0;
}

/* aria-hidden attribute is removed by JS. Button is non-functional
     until JS is enabled.
  */

.primary-nav__button-toggle[aria-hidden="true"] {
  pointer-events: none;
}

@media (min-width: 75rem) {
  body:not(.is-always-mobile-nav) .primary-nav__button-toggle {
    flex-shrink: 0;
    align-self: stretch;
    width: calc(var(--sp2) + 0.5rem);
    height: auto;
    margin-block-start: 0;
    margin-inline-end: calc(-1 * var(--sp2));
  }

  :is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle):focus {
    border: 0;
    outline: 0;
  }

  :is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle):focus .icon--menu-toggle {
    border: solid 2px var(--color--primary-40);
  }

  :is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle):active {
    /* Necessary for Safari. */
    color: currentColor;
  }

  [aria-expanded="true"]:is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle) .icon--menu-toggle::after {
    opacity: 0.8;
  }

  :is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle) .icon--menu-toggle {
    inset-inline-start: 0.1875rem;
    width: 1.125rem;
    transform: translateY(-50%);
    border-radius: 0.25rem;
    background-color: var(--color--white);
  }

  :is(:is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle) .icon--menu-toggle)::before {
    content: none;
  }

  :is(:is(body:not(.is-always-mobile-nav) .primary-nav__button-toggle) .icon--menu-toggle)::after {
    /* stylelint-disable csstools/use-logical */
    top: calc(50% - 2px);
    left: 0.1875rem;
    /* stylelint-enable csstools/use-logical */
    width: 0.5rem;
    height: 0.5rem;
    content: "";
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.8;
    /* Intentionally not using CSS logical properties. */
    border-top: none;
    border-right: solid 2px currentColor;
    border-bottom: solid 2px currentColor;
    background: transparent;
  }
}
