@import './navbar/navbar-nav-section.css';
@import './navbar/navbar-dropdown-section.css';
@import './navbar/navbar-collapse-trigger.css';

.fixed-on-scroll-up {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: white;
  transition: all 0.2s ease-in-out;
}
.fixed-on-scroll-up.down {
  transform: translate3d(0, -100%, 0);
}

.navbar-brand {
  background-color: #fff;
  z-index: 1031;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar-collapse {
  display: flex;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1030;
  background-color: black;
  height: 100%;
  flex-direction: column;
  overflow: auto;
  padding-top: 60px;
}
@media (min-width: 1024px) {
  .navbar-collapse {
    position: static;
    height: auto;
    background-color: transparent;
    flex-direction: row;
    overflow: visible;
    padding-top: 0;
  }
}

.navbar-nav {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 0;
}
@media (min-width: 1024px) {
  .navbar-nav {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 1024px) {
  .navbar-link {
    position: relative;
  }
  .navbar-link::before,
  .navbar-link::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    right: 0;
    border-style: solid;
    border-color: transparent;
    transform: translate(0, -50%);
    opacity: 0;
    transition: all 0.2s ease-in-out;
  }
  .navbar-link::before {
    @apply bg-accent-blue;
    width: 170px;
    height: 1px;
  }
  .navbar-link::after {
    @apply border-accent-blue;
    width: 0;
    height: 0;
    border-top-width: 20px;
    border-bottom-width: 20px;
    border-left-width: 15px;
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-right-color: transparent;
  }
  .navbar-link:hover::before,
  .navbar-link:hover::after {
    transform: translate(185px, -50%);
    opacity: 1;
  }
  .navbar-link .label {
    display: inline-block;
    position: relative;
  }

  .navbar-link .label::after {
    content: '';
    width: 100%;
    height: 1px;
    background-color: white;
    display: block;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
  }

  .navbar-link:hover .label::after {
    background-color: transparent;
    width: 0;
  }
}

.navbar-item .icon-plus {
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: auto;
}
.navbar-item .icon-plus::before,
.navbar-item .icon-plus::after {
  @apply bg-accent-red;
  content: '';
  display: block;
  width: 5px;
  height: 100%;
  position: absolute;
}
.navbar-item .icon-plus::before {
  transform: translateX(-50%);
  left: 50%;
}
.navbar-item .icon-plus::after {
  transform: translateX(-50%) rotate(90deg);
  left: 50%;
}
.navbar-item .icon-plus.active::before {
  display: none;
}
@media (min-width: 1024px) {
  .navbar-item .icon-plus {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
  }
}

.navbar-dropdown {
  margin-bottom: 30px;
  transition: all 0.2s ease-out;
}
.navbar-nav > .navbar-item > .navbar-dropdown {
  max-height: 0;
  overflow: hidden;
}
.navbar-nav > .navbar-item > .navbar-dropdown.active {
  max-height: 1000px;
  transition: all 0.2s ease-in;
  overflow: scroll;
}
@media (min-width: 1024px) {
  .navbar-dropdown {
    max-height: 0;
    overflow: hidden;
  }
  .navbar-dropdown.active {
    @apply border-b border-accent-red;
    padding-bottom: 40px;
    max-height: 1000px;
    transition: all 0.2s ease-in;
  }
  .navbar-nav > .navbar-item > .navbar-dropdown {
    position: absolute;
    width: 100%;
    height: 100vh;
    left: 0;
    background-color: black;
  }
}

html.mobile-menu-open,
body.mobile-menu-open {
  overflow: hidden;
}
@media (min-width: 1024px) {
  html.mobile-menu-open,
  body.mobile-menu-open {
    overflow: auto;
  }
}

.search-btn {
  position: relative;
  z-index: 0;
}

.search-btn::after {
  @apply bg-black;
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  opacity: 0;
  z-index: -1;
  transition: all 0.1s ease-in-out;
}

.search-btn:hover {
  @apply text-white;
}

.search-btn:hover::after {
  width: 100%;
  opacity: 1;
}

@media (max-width: 1024px) {
  .search-btn.mobile-active:before {
    @apply bg-accent-red;
    content: '';
    position: absolute;
    top: 50%;
    width: 100%;
    height: 5px;
  }
  .search-btn.mobile-active .icon-magnifying-glass {
    display: none;
  }
}

/* section to borrow styles from menu for collapsable FAQ */
/* content-list-section = navbar-nav-section */
.content-list-section {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 45px;
  line-height: 1;
  white-space: nowrap;
}
/* content-list = navbar-item */
.content-list .icon-plus {
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: auto;
  margin-bottom: -10px;
}
.content-list .icon-plus::before,
.content-list .icon-plus::after {
  content: '';
  display: block;
  width: 5px;
  height: 100%;
  position: absolute;
}
/* content-dropdown = navbar-dropdown */
.content-dropdown {
  margin-bottom: 30px;
  transition: all 0.2s ease-out;
  max-height: 0;
  overflow: hidden;
}
.content-dropdown.active {
  max-height: 1000px;
  transition: all 0.2s ease-in;
}
