@import '../../themes/variables.scss';
@import '../../themes/default/breakpoints.module.scss';
$banner-height: 36px;
$nav-bar-height: 80px;
$nav-bar-height-tablet: 88px;

.nav-bar {
  &__buttonLink {
    text-decoration: unset;
  }
  &__content {
    background-color: #00256b !important;
    .nav-bar-link-container {
      background-color: red;
      border-right: unset;
    }
  }
  top: 0px;
  left: 0px;
  z-index: 1001;
  width: 100%;
  padding: 0px;
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  overflow: unset;
}
.nav {
  z-index: 1;
  width: 100%;
  &,
  & * {
    box-sizing: border-box;
  }

  .nav-bar-spacer {
    width: 100%;
    height: calc($banner-height + $nav-bar-height);

    @media screen and (max-width: $desktop-min) {
      height: calc($banner-height + $nav-bar-height-tablet);
    }

    @media screen and (max-width: $tablet-min) {
      height: $nav-bar-height;
    }
  }
  &.horizontal {
  }
  &.vertical {
    padding: unset;
    width: 100%;

    .nav-bar {
      height: fit-content;
      flex-direction: column;
      align-items: flex-start;
    }
  }
}

.banner {
  width: 100%;
  height: 36px;
  display: flex;
  padding: 0 24px;
  align-items: center;
  flex-direction: row;
  box-sizing: border-box;
  justify-content: space-between;
  background: $light-light-purple;

  p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    font-style: normal;
    letter-spacing: 0.1px;
    font-family: $font-01;
  }
}

.nav-bar-content {
  width: 100%;
  row-gap: 4px;
  display: flex;
  column-gap: 24px;
  padding: 12px 0px 12px 24px;
  align-items: center;
  flex-direction: row;
  height: $nav-bar-height;
  justify-content: space-between;
  background-color: $standard-color-contrast;
  box-shadow: 0px 12px 16px -4px rgba(16, 24, 40, 0.08),
    0px 4px 6px -2px rgba(16, 24, 40, 0.03);

  @media screen and (min-width: $mobile-max) and (max-width: $desktop-min) {
    flex-wrap: wrap;
    padding: 8px 16px;
    height: $nav-bar-height-tablet;
  }

  @media screen and (max-width: $mobile-max) {
    height: $nav-bar-height;
  }

  .nav-bar-container-logo {
    gap: 8px;
    padding: 0px;
    display: flex;
    align-items: center;
    flex-direction: row;

    @media screen and (max-width: $desktop-min) {
      height: 36px;
    }

    @media screen and (max-width: $mobile-max) {
      width: 276px;

      .logo {
        width: 76.88px;
      }

      .logo-text {
        font-size: 22px;
        line-height: 23px;
      }
    }

    /* Align logo text with text from other nav bar links */
    h2 {
      margin-bottom: 4px;
    }
  }

  .nav-bar-links {
    flex: none;
    flex-grow: 0;
    padding: 0px;
    display: flex;
    column-gap: 0px;
    align-items: center;
    flex-direction: row;
    height: fit-content;

    @media screen and (min-width: $tablet-min) and (max-width: $desktop-min) {
    }

    @media screen and (max-width: $mobile-max) {
    }

    .nav-bar-link {
      all: unset;
      color: var(--Primary-700, #00256b);
      font-size: 18px;
      font-style: normal;
      font-weight: 600;
      line-height: 28px;
      padding: unset !important;
      cursor: pointer;
      font-family: $font-01;

      &:hover {
        color: $highlightColor;
        transition: color $button-transition,
          background-color $button-transition;
      }

      .button-content .chevron {
        margin-left: 6px;
      }
    }

    .shopping-cart-icon {
      margin: 0 6px;
    }

    .chevron {
      cursor: pointer;
      margin-bottom: -5px;
    }

    .nav-cta-button {
      height: 44px !important;

      @media screen and (max-width: $desktop-min) {
        font-weight: 600 !important;
        line-height: 20px !important;
        font-size: 14px !important;
        height: 36px !important;
      }
    }

    .dry-button__button-content {
      font-size: 14px !important;
    }
  }

  .tablet-nav-links {
    width: fit-content;
    height: fit-content;
  }
}

.nav-bar-content-mobile {
  column-gap: unset;
  padding: unset;
  justify-content: space-around;
}
.vertical-wrapper {
  min-width: 300px;
  width: 100%;

  &__nav-bar1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  &__nav-bar2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
    height: fit-content;
  }

  &__mobile-menu {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 0 24px;
  }
}
.vertical-nav {
  width: 100%;
}
.horizontal-nav {
  position: fixed;
  top: 0;
  width: 100%;
}

.nav-bar-link-container {
  position: relative;
  display: flex;
  justify-content: center;

  padding: 10px 16px;
  // align-items: self-end;
  align-items: center;
  gap: 8px;
  align-self: stretch;

  border-right: 1px solid var(--gray-300, #d0d5dd);

  &__infoWrapper {
    display: flex;
    gap: 8px;
    align-items: baseline;
  }
}

.nav-bar-link-container-mobile {
  position: relative;
  display: flex;
  justify-content: center;
  flex-direction: column;

  // align-items: self-end;
  align-items: center;
  gap: 8px;
  align-self: stretch;

  border-right: 1px solid var(--gray-300, #d0d5dd);

  &__infoWrapper {
    display: flex;
    gap: 8px;
    align-items: baseline;
  }

  &__link {
    color: var(--Gray-600, #475467);
    /* Text xs/Medium */
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 18px; /* 150% */
    text-align: center;
  }
}

.nav-bar-link {
  &__dropdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
  }

  &__dropdown {
    width: 336px;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 12px;
    border: 1px solid var(--Gray-200, #eaecf0);
    background: var(--Base-White, #fff);
    box-shadow: 0px 4px 6px -2px rgba(16, 24, 40, 0.03),
      0px 12px 16px -4px rgba(16, 24, 40, 0.08);
  }
}

// New styles for skeleton loading
.nav-loading {
  background: green;
  &__nav-link-skeleton {
    width: 80px;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    margin: 16px;
  }

  &__skeleton-text {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
  }
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

// ========================================
// Media Queries
// ========================================
// Adjusting desktop screens
@media (min-width: 1024px) {
}

// Adjusting  for tablet screens on there side
@media (min-width: 1000px) and (max-width: 1500px) {
  .nav-bar-link-container {
    padding: 10px 12px;
  }
}

// Adjusting  for tablet screens (between small tablets and desktops)
@media (max-width: 1150px) {
  .nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    top: unset;
  }
}
// Adjusting for smaller screens (small tablets and mobiles)
@media (max-width: 768px) {
  .nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    top: unset;
  }
  .nav-bar-link-container-mobile {
    &__link {
      font-size: 10px;
    }
  }
}
// Adjusting  for smaller screens (mobiles)
@media (max-width: 480px) {
  .nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    top: unset;
  }
  .nav-bar-link-container-mobile {
    &__link {
      font-size: 10px;
    }
  }
}
