/**
 * VinFast US: aftersales mega menu under the hand-written header.
 *
 * Positioned like the models menu (.mega-menu in common.css).
 */

.aftersales-dropdown {
  position: fixed;
  top: 5.563rem;
  left: 0;
  z-index: 99;
  display: none;
  width: 100vw;
  max-height: calc(100vh - 5.563rem);
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 0.188rem 0.375rem #00000029;
}

/* Logged-in editors: the admin toolbar pushes the header down (common.css). */
body.toolbar-horizontal .aftersales-dropdown {
  top: calc(5.563rem + 2.438rem);
}

body.toolbar-horizontal.toolbar-tray-open .aftersales-dropdown {
  top: calc(5.563rem + 4.938rem);
}

.aftersales-dropdown .aftersales-mega-menu__desktop {
  padding: 2rem 0;
}

/* Bootstrap underlines every a:hover; the VN menu only changes the colour. */
.aftersales-dropdown a:hover,
.aftersales-dropdown a:focus,
.aftersales-mega-menu--hamburger a:hover,
.aftersales-mega-menu--hamburger a:focus {
  text-decoration: none;
}

/* Vehicle tab without an uploaded picture: its name instead. */
.aftersales-mega-menu__vehicle-label {
  padding: 0 8px;
  color: #1f2125;
  font-family: 'Mulish', sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

/* The trigger is desktop-only (#vehicles-nav), so is the dropdown. */
@media (max-width: 1199px) {
  .aftersales-dropdown {
    display: none !important;
  }
}

/* Hamburger menu item. */
#menu-main-nav .aftersales-hamburger-item .aftersales-mega-menu--hamburger {
  display: none;
  padding: 8px 0 0;
}

#menu-main-nav .aftersales-hamburger-item.is-open .aftersales-mega-menu--hamburger {
  display: block;
}

#menu-main-nav .aftersales-mega-menu--hamburger .aftersales-mega-menu__mobile {
  display: block;
}

#menu-main-nav .aftersales-mega-menu--hamburger .aftersales-mega-menu__mobile-toggle {
  font-size: 16px;
}

#menu-main-nav .aftersales-mega-menu--hamburger .aftersales-mega-menu__mobile-content a.is-active {
  color: #1464f4;
  font-weight: 600;
}

/* Menu cards are an editable list (Aftersales Settings): more than the three
   of the VN design shrink to share the row, down to 140px, then the row
   scrolls sideways instead of pushing the links out. */
.aftersales-mega-menu .aftersales-mega-menu__ctas {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  /* flex-end would push overflowing cards out on the left, where they cannot
     be scrolled to: right-align with an auto margin instead. */
  justify-content: flex-start;
}

.aftersales-mega-menu .aftersales-mega-menu__ctas > :first-child {
  margin-left: auto;
}

.aftersales-mega-menu .aftersales-mega-menu__cta-card {
  flex: 0 1 220px;
  width: auto;
  min-width: 140px;
}
