/* main navigation */
.menu-pc {
  display: none;
}
.menu-mobile {
  display: block;
  & .btn--icon {
    color: var(--color-teal-darker);
    width: 48px;
    height: 48px;
  }
  & .menu-mobile__icon-close {
    display: none;
  }
  &:has(#avchildcare_layout__mobile-menu:popover-open) .menu-mobile__icon-open {
    display: none;
  }
  &:has(#avchildcare_layout__mobile-menu:popover-open) .menu-mobile__icon-close {
    display: block;
  }
}
@media (min-width:1080px) {
  .menu-pc {
    display: block;
  }
  .menu-mobile {
    display: none;
  }
}
.menu-mobile-list:popover-open {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--background-primary);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  top: 82px;
  border: none;

  & ul {
    padding: 0 20px;
    text-align: center;
    & .mobile-nav__has-children {
      display: flex;
      flex-direction: column;
      align-items: center;
      border-radius: 20px;
    }
    & .mobile-nav__has-children > .mobile-nav__parent {
      padding: 12px 0;
      cursor: pointer;
    }
    & .mobile-nav__dropdown-panel {
      gap: 24px;
      display: flex;
      flex-direction: column;
      padding: 12px 0;
    }
  }

  @media (min-width: 1080px) {
    display: none;
  }
}

.desktop-nav__wrap {
  display: flex;
  flex-grow: 1;
  width: 100%;
  justify-content: space-between;
  align-items: flex-end;
}

.desktop-nav__item {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Shared nav link styles */
.desktop-nav__list,
.mobile-nav__list {
  a {
    color: var(--color-teal);
    font-weight: 600;
  }

  a.is-active {
    color: var(--link-secondary);
  }
}

/* Shared chevron arrow */
.desktop-nav__has-children > a::after,
.mobile-nav__has-children > .mobile-nav__parent::after {
  content: '';
  width: 24px;
  height: 24px;
  display: block;
  mask-image: url("/modules/custom/ui_icons_doodle/icons/arrow-single-down.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  background-color: var(--text-primary);
}

.desktop-nav__list {
  display: flex;
  gap: 40px;

  & .desktop-nav__dropdown-panel {
    display: none;
    position: relative;
    flex-direction: column;
    align-items: center;

    & ul {
      display: flex;
      flex-direction: column;
      position: absolute;
      gap: 16px;
      z-index: 10;
      background: white;
      box-shadow: 0px 16px 32px -4px rgba(12, 12, 13, 0.1), 0px 4px 4px -4px rgba(12, 12, 13, 0.05);

      & a {
        font-weight: 400;
        white-space: nowrap;
      }
    }
  }

  & .desktop-nav__has-children {
    & > a {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    & > a.is-active::after {
      background-color: var(--link-secondary);
      transform: rotate(180deg);
    }

    &:hover > .desktop-nav__dropdown-panel {
      display: flex;
    }
  }
}

.mobile-nav__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;

  & .mobile-nav__has-children {
    & > .mobile-nav__parent {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    & > a.is-active::after {
      background-color: var(--link-secondary);
      transform: rotate(180deg);
    }

    &.is-open {
      background: var(--background-secondary);
    }
  }
}

@media (min-width: 768px) {
  .desktop-nav__list {
    margin: 0;

    & .desktop-nav__has-children {
      padding: 42px 0;
    }

    & .desktop-nav__dropdown-panel {
      & ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        gap: 16px;
        z-index: 10;
        background: white;
        border-radius: 0 0 20px 20px;
        padding: 0 40px 24px 40px;
        top: 42px;
      }
    }
  }
}
