/* Avail Website · Shared nav dropdown styles */

/* Shared nav dropdown styles */

.page-shell > .nav-header,
.landing__container > .nav-header {
  position: relative;
  z-index: 50;
  width: 100%;
  max-width: var(--max-width, var(--maxw, 1440px));
  margin-inline: auto;
  box-sizing: border-box;
}

.page-shell > .mobile-menu,
.landing__container > .mobile-menu {
  z-index: 40;
}

.nav-header,
.nav-pill,
.nav-links {
  overflow: visible;
}

.nav-pill {
  --nav-pill-height: 62px;
}

.nav-pill .nav-links {
  align-self: stretch;
  align-items: center;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
}

/* Invisible hover bridge across the 10px gap below the nav pill */
.nav-dropdown::after {
  content: '';
  position: absolute;
  left: 0;
  min-width: 248px;
  top: 100%;
  height: 10px;
  z-index: 99;
  pointer-events: none;
}

.nav-dropdown:hover::after,
.nav-dropdown:focus-within::after {
  pointer-events: auto;
}

.nav-links__trigger {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: normal;
  font-weight: 600;
  color: var(--nav-link, #858582);
  padding: 8px 14px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.nav-links__trigger:hover,
.nav-dropdown:hover .nav-links__trigger,
.nav-dropdown:focus-within .nav-links__trigger {
  color: var(--black, #141413);
}

.nav-dropdown__menu {
  position: absolute;
  /* Anchor below the nav bar, not the centered trigger button */
  top: calc((var(--nav-pill-height, 62px) + 100%) / 2 + 10px);
  left: 0;
  min-width: 248px;
  padding: 16px 20px;
  background: var(--nav-pill, var(--grey, #f0f0ef));
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, visibility 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}

/* Keeps the 10px gap hoverable so the menu stays open */
.nav-dropdown__menu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown:focus-within .nav-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Only one dropdown open at a time */
.nav-links:has(.nav-dropdown:hover) .nav-dropdown:not(:hover) .nav-dropdown__menu,
.nav-links:has(.nav-dropdown:focus-within) .nav-dropdown:not(:focus-within) .nav-dropdown__menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
}

.nav-links:has(.nav-dropdown:hover) .nav-dropdown:not(:hover)::after,
.nav-links:has(.nav-dropdown:focus-within) .nav-dropdown:not(:focus-within)::after {
  pointer-events: none;
}

.nav-dropdown__section + .nav-dropdown__section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 20, 19, 0.08);
}

.nav-dropdown__heading {
  margin: 0 0 4px;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

.nav-dropdown__link {
  display: block;
  padding: 6px 0;
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 14px;
  line-height: normal;
  color: var(--black, #141413);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.nav-dropdown__link:hover {
  color: var(--nav-link, #858582);
  opacity: 1;
}

.nav-dropdown__menu--products {
  padding-top: 12px;
  padding-bottom: 12px;
}

.nav-dropdown__menu--products .nav-dropdown__link {
  padding: 8px 0;
}

/* Mobile expandable sections */
.mobile-menu__details {
  border-bottom: 1px solid var(--border, #f0f0ef);
}

.mobile-menu__details > summary {
  list-style: none;
  cursor: pointer;
}

.mobile-menu__details > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu__details > summary.mobile-menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu__details > summary.mobile-menu__link::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 4px;
}

.mobile-menu__details[open] > summary.mobile-menu__link::after {
  transform: rotate(-135deg);
}

.mobile-menu__sub {
  padding: 0 0 12px 16px;
}

.mobile-menu__heading {
  margin: 8px 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888888;
}

.mobile-menu__sublink {
  display: block;
  padding: 10px 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--black, #141413);
}

@media (max-width: 900px) {
  .nav-pill {
    --nav-pill-height: 50px;
  }

  .nav-dropdown__menu {
    display: none;
  }
}

/* Nav header styles from style.css */

.nav-header {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 72px;
  overflow: visible;
}

.nav-pill,
.nav-links {
  overflow: visible;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 8px;
  border-radius: 4px;
  background: var(--nav-pill);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  flex-shrink: 0;
}

.nav-logo__mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-logo__wordmark {
  width: 57px;
  height: 21px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links__item {
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 14px;
  line-height: normal;
  font-weight: 600;
  color: var(--nav-link);
  transition: color 0.2s ease;
}

.nav-links__item:hover {
  color: var(--black);
}

.nav-header__cta {
  flex-shrink: 0;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 4px;
  color: var(--black);
}

.nav-menu__icon {
  position: relative;
  width: 16px;
  height: 11px;
}

.nav-menu__icon::before,
.nav-menu__icon::after {
  content: '';
  position: absolute;
  left: 2px;
  width: 12px;
  height: 1.33px;
  border-radius: 0.67px;
  background: currentColor;
}

.nav-menu__icon::before {
  top: 0;
  box-shadow: 0 4.67px 0 currentColor;
}

.nav-menu__icon::after {
  bottom: 0;
}

.nav-menu[aria-expanded="true"] .nav-menu__icon::before {
  top: 5px;
  box-shadow: none;
  transform: rotate(45deg);
}

.nav-menu[aria-expanded="true"] .nav-menu__icon::after {
  top: 5px;
  bottom: auto;
  transform: rotate(-45deg);
}

.nav-menu__label {
  font-size: 14px;
  line-height: normal;
  font-weight: 400;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 88px 0 0;
  z-index: 15;
  background: rgba(255, 255, 254, 0.98);
  backdrop-filter: blur(8px);
  padding: 24px 40px;
}

.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.mobile-menu__link {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  line-height: 1.3;
  color: var(--black);
  border-bottom: 1px solid var(--border);
}

.mobile-menu__cta {
  margin-top: 24px;
  width: 100%;
}

/* ---------- Deposit page nav overrides ---------- */
.page-shell > .nav-header {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px 72px;
  width: 100%;
  max-width: var(--max-width, 1440px);
  margin-inline: auto;
  box-sizing: border-box;
  overflow: visible;
}

.page-shell > .mobile-menu {
  z-index: 40;
}

/* Deposit page button sizing */
.page-shell .nav-header__cta,
.page-shell .mobile-menu__cta {
  height: auto;
  padding: 14px 22px;
  font-size: 15px;
  border-radius: 4px;
  background: var(--black);
  color: var(--white);
}

/* Responsive (unified breakpoints) */
@media (max-width: 1024px) {
  .page-shell > .nav-header,
  .landing__container > .nav-header { padding: 40px; }
  .page-shell .nav-links,
  .page-shell .nav-header__cta,
  .landing__container .nav-links,
  .landing__container .nav-header__cta { display: none; }
  .nav-menu,
  .page-shell .nav-menu,
  .landing__container .nav-menu { display: inline-flex; }
  .page-shell .mobile-menu:not([hidden]),
  .landing__container .mobile-menu:not([hidden]) { display: block; }
}

@media (max-width: 460px) {
  .page-shell > .nav-header {
    padding: 20px 24px 0;
  }

  .page-shell .nav-logo {
    height: 24px;
    gap: 3px;
  }

  .page-shell .nav-logo__mark {
    width: 24px;
    height: 24px;
  }

  .page-shell .nav-logo__wordmark {
    width: 46px;
    height: 17px;
  }

  .page-shell .nav-pill {
    height: 50px;
    background: transparent;
    padding: 0;
  }

  .page-shell .mobile-menu {
    inset: 70px 0 0;
    padding: 16px 24px 24px;
  }
}