@import url("../../inati/_palette-ySWM8g-.css");

[data-controller~="inati--navbar"] {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  min-height: var(--navbar-size);
  box-sizing: border-box;
  z-index: 1000; /* High z-index to ensure the navbar stays on top of other content */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  padding: 0 1rem;
  background-color: var(--inati-orange-lightest);

  @media (min-width: 500px) {
    flex-direction: row;
    justify-content: space-between;
    height: 3rem;
    overflow: hidden;
  }

  @media (min-width: 1400px) {
    padding-left: calc(1rem + (50vw - 700px));
    padding-right: calc(1rem + (50vw - 700px));
  }

  &.is-active {
    @media (min-width: 500px) {
      height: unset;
    }
  }

  .navbar-minimal {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-size);

    @media (min-width: 500px) {
      width: unset;
    }

    .navbar-brand > img {
      height: 2.5rem;
    }
  }

  .navbar-menu {
    display: none;
    opacity: 0;
    visibility: hidden;

    @media (min-width: 500px) {
      display: flex;
      opacity: 100%;
      visibility: visible;
    }

    &.is-active {
      display: flex;
      flex-direction: column;
      width: 100%;
      opacity: 100%;
      visibility: visible;
      padding: 1rem 0;

      ul.navbar-nav {
        padding-top: unset;
      }

    }
  }

  ul.navbar-nav {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem;
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 100%;
    align-items: center;

    @media (min-width: 500px) {
      padding-top: 1rem;
      flex-direction: row;
      justify-content: center;
      gap: 1.5rem;
    }

    li {
      text-decoration: none;
      display: block;
      width: fit-content;

      a {
        width: 100%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        text-decoration: none;
        padding: .5rem 1rem;
        border-radius: 1rem;
        background-color: white;
        color: var(--inati-orange);
        font-weight: bold;
        box-sizing: border-box;
      }
    }
  }

  .navbar-button {
    padding: .5rem .75rem;
    background-color: white;
    color: inherit;
    border: none;
    border-radius: 1rem;
    font: inherit;
    cursor: pointer;
    outline: inherit;
    align-items: center;
    justify-content: center;
    max-height: 36px;

    @media (min-width: 500px) {
      margin-top: 1rem;
    }

    svg {
      color: var(--inati-orange);
      width: 1.5rem;
      height: 1.5rem;
    }

    &.navbar-button-end {
      display: none;

      @media (min-width: 500px) {
        display: flex;
      }

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

    &:not(.navbar-button-end) {
      display: flex;

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