/* LDIVN Cleanup Map: the menu items for the map and the sign-up form (includes/menu.php). */

/* The map's page: a pink pin before its name. */
.ldivn-menu-map > a .ldm-menu-pin {
  display: inline-block;
  flex-shrink: 0;
  width: 1.15em;
  height: 1.15em;
  margin-right: 0.4em;
  vertical-align: -0.2em;
  color: #e81a7f;
}
.ldivn-menu-map > a {
  align-items: center;
}

/* "#volunteer": an outlined pink button, like the "Contact us" one but white. */
.ldivn-menu-volunteer > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px !important;
  border: 2px solid #f1138d !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #f1138d !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.2s;
}
.ldivn-menu-volunteer > a:hover,
.ldivn-menu-volunteer > a:focus {
  background: #fdf2f8 !important;
  color: #f1138d !important;
  transform: translateY(-2px);
}
/* Without the menu's underline/frame hover effect (Elementor's "pointers"). */
.ldivn-menu-volunteer > a::before,
.ldivn-menu-volunteer > a::after {
  display: none !important;
}

/* On computers, an Elementor header holding the map's item or the Volunteer button is laid out
   like the Let's Do It Vietnam one so the longer menu stays on one line: up to
   1600px wide, the logo only as wide as it is, the menu taking the rest. */
@media (min-width: 1025px) {
  .elementor-location-header .e-con-boxed:has(.ldivn-menu-map, .ldivn-menu-volunteer) {
    --content-width: min(1600px, 100%) !important;
    --padding-left: 32px !important;
    --padding-right: 32px !important;
  }
  .elementor-location-header .e-con-boxed:has(.ldivn-menu-map, .ldivn-menu-volunteer) > .e-con-inner > .e-con:first-child {
    --width: auto !important;
  }
  .elementor-location-header .e-con-boxed:has(.ldivn-menu-map, .ldivn-menu-volunteer) > .e-con-inner > .e-con:last-child {
    --width: auto !important;
    --flex-grow: 1 !important;
    --flex-shrink: 1 !important;
    margin-left: 32px;
  }
  /* The menu to the right, right before the "Contact us" button (Elementor lets
     the button take the free space otherwise, leaving a gap before it). */
  .elementor-location-header .e-con:has(> .elementor-widget-nav-menu :is(.ldivn-menu-map, .ldivn-menu-volunteer)) > .elementor-widget-button {
    --flex-grow: 0 !important;
  }
  .elementor-location-header .e-con:has(> .elementor-widget-nav-menu :is(.ldivn-menu-map, .ldivn-menu-volunteer)) > .elementor-widget-nav-menu {
    --flex-grow: 1 !important;
  }

  /* --- The items, as in that header: pink for the page you're on, a grey
     pill under the mouse, a chevron on the ones with a dropdown. --- */
  .elementor-location-header .elementor-widget-nav-menu:has(.ldivn-menu-map, .ldivn-menu-volunteer) {
    --e-nav-menu-horizontal-menu-item-margin: 7px !important;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) > .elementor-nav-menu > li:not(.ldivn-menu-volunteer) > .elementor-item {
    padding: 8px !important;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #1c244b;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) > .elementor-nav-menu > li:not(.ldivn-menu-volunteer) > .elementor-item:is(:hover, :focus-visible, .highlighted, [aria-expanded="true"]) {
    background: rgba(241, 245, 249, 0.8);
    color: #f1138d;
  }
  /* The page you're on: just its name in pink, no frame. */
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) > .elementor-nav-menu > li:not(.ldivn-menu-volunteer) > .elementor-item.elementor-item-active {
    background: transparent;
    border-color: transparent;
    color: #f1138d;
    font-weight: 600;
    box-shadow: none;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .elementor-item .sub-arrow {
    display: inline-block !important;
    width: 16px;
    height: 16px;
    margin: 0 0 0 6px !important;
    padding: 0 !important;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
    transition: transform 0.2s;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .elementor-item .sub-arrow > * { display: none !important; }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .elementor-item:is(.highlighted, [aria-expanded="true"]) .sub-arrow { transform: rotate(180deg); }

  /* --- The dropdowns: a white rounded card, just the items' names in it. --- */
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .sub-menu {
    width: 320px !important;
    min-width: 0 !important;
    margin-top: 6px !important;
    padding: 8px 0 !important;
    overflow: hidden;
    border: 1px solid #f1f5f9 !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .sub-menu .elementor-sub-item {
    display: flex !important;
    align-items: center;
    padding: 10px 20px !important;
    border: 0 !important;
    background: transparent !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    white-space: normal;
    transition: color 0.15s, background-color 0.15s;
  }
  /* No bullet, no arrow: the items open nothing further. */
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .sub-menu .elementor-sub-item::before,
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .sub-menu .elementor-sub-item::after {
    content: none !important;
    display: none !important;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .sub-menu .elementor-sub-item:is(:hover, :focus-visible, .elementor-item-active) {
    background: rgba(253, 242, 248, 0.6) !important;
    color: #e81a7f !important;
  }
}
/* Narrower computer screens: smaller items, as that header does below 1536px. */
@media (min-width: 1025px) and (max-width: 1535px) {
  .elementor-location-header .elementor-widget-nav-menu:has(.ldivn-menu-map, .ldivn-menu-volunteer) {
    --e-nav-menu-horizontal-menu-item-margin: 2px !important;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-map, .ldivn-menu-volunteer) .elementor-item {
    font-size: 15px !important;
  }
  .elementor-location-header .elementor-nav-menu--main:has(.ldivn-menu-volunteer) .ldivn-menu-volunteer > a {
    height: 42px;
    padding: 0 20px !important;
  }
}

/* In the mobile dropdown it is an ordinary item, in pink. */
.elementor-nav-menu--dropdown .ldivn-menu-volunteer > a {
  display: flex !important;
  height: auto;
  padding: 13px 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  transform: none;
}
