@use "../../tokens/color" as *;
@use "../../tokens/font" as *;
@use "../../tokens/spacing" as *;

.iati-mobile-nav {
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  transition: all 0.5s;
  &--open {
    z-index: 100;
  }
}

.iati-mobile-nav__overlay {
  height: 100%;
  min-height: 100vh;
  width: 100%;
  background-color: #000;
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  transition: all 0.5s;
  z-index: -1;
  .iati-mobile-nav--open & {
    opacity: 0.6;
    visibility: visible;
  }
}

.iati-mobile-nav__menu {
  background-color: $color-teal-90;
  padding: 1rem;
  color: #fff;
  position: absolute;
  z-index: 101;
  right: 0;
  top: 0;
  height: 100%;
  width: min(90vw, 400px);
  margin: 0;
  transform: translateX(400px);
  transition: transform 0.5s;
  .iati-mobile-nav--open & {
    transform: translateX(0);
  }
  ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
  }
}

.iati-mobile-nav__label {
  font-size: 1.375rem;
  margin-block-end: 2rem;
  margin: 0;
}

.iati-mobile-nav__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block-end: 2rem;
}

.iati-mobile-nav__item {
  border-block-start: 1px solid #fff;
}

.iati-mobile-nav__link {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1;
  padding-block: 0.75em;
  display: block;
  transition: all 0.2s ease-in-out;

  &:active,
  &:focus,
  &:hover {
    color: $color-blue-30;
    text-decoration: none;
  }
}
