.vmcm {
  --vmcm-border: #d9dde3;
  --vmcm-bg: #fff;
  --vmcm-accent: #1f5f4a;
  position: relative;
  font: inherit;
}

.vmcm__toggle {
  appearance: none;
  border: 1px solid var(--vmcm-accent);
  border-radius: .35rem;
  background: var(--vmcm-accent);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: .7rem 1rem;
}

.vmcm__desktop-departments {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  width: 100%;
}

.vmcm__desktop-department {
  appearance: none;
  min-width: 0;
  min-height: 3.5rem;
  border: 0;
  border-inline-end: 1px solid rgb(255 255 255 / 18%);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: clamp(.68rem, .72vw, .88rem);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  padding: .65rem .3rem;
  text-align: center;
  white-space: normal;
}
.vmcm__desktop-department:last-child { border-inline-end: 0; }
.vmcm__desktop-department:hover,
.vmcm__desktop-department:focus-visible,
.vmcm__desktop-department[aria-expanded="true"] { background: var(--vmcm-accent); outline: none; }

.vmcm__surface {
  position: absolute;
  z-index: 1000;
  inset-block-start: calc(100% + .35rem);
  inset-inline-start: 0;
  max-width: min(96vw, 78rem);
  border: 1px solid var(--vmcm-border);
  border-radius: .45rem;
  background: var(--vmcm-bg);
  box-shadow: 0 .75rem 2rem rgb(0 0 0 / 16%);
}

.vmcm__surface[hidden] { display: none; }
.vmcm__close { display: none; }
.vmcm__levels { display: flex; min-width: 18rem; max-height: 70vh; overflow: auto; }
.vmcm__level { flex: 0 0 18rem; padding: .65rem; border-inline-end: 1px solid var(--vmcm-border); }
.vmcm__level:last-child { border-inline-end: 0; }
.vmcm__list { display: grid; gap: .15rem; }
.vmcm__item,
.vmcm__all {
  display: block;
  border-radius: .3rem;
  color: inherit;
  padding: .55rem .65rem;
  text-decoration: none;
}
.vmcm__item:hover,
.vmcm__item:focus-visible,
.vmcm__all:hover,
.vmcm__all:focus-visible { background: #eef5f2; outline: 2px solid transparent; }
.vmcm__item--parent::after { content: "›"; float: right; font-weight: 700; }
.vmcm__level-header { display: flex; align-items: center; gap: .65rem; margin-bottom: .4rem; }
.vmcm__back {
  display: none;
  border: 0;
  background: transparent;
  color: var(--vmcm-accent);
  cursor: pointer;
  font: inherit;
  padding: .45rem;
}
.vmcm__all { border-bottom: 1px solid var(--vmcm-border); font-weight: 700; margin-bottom: .35rem; }
.vmcm__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.vmcm-fallback { margin: 0; padding: 1rem 2rem; }

@media (max-width: 767px) {
  .vmcm__desktop-departments { display: none; }
  .vmcm__surface { position: fixed; inset: 0; max-width: none; border: 0; border-radius: 0; overflow: auto; }
  .vmcm__levels { display: block; max-height: none; min-width: 0; }
  .vmcm__level { width: auto; border: 0; padding: 1rem; }
  .vmcm__back { display: inline-block; }
  .vmcm__close {
    display: block;
    margin: .75rem .75rem 0 auto;
    border: 0;
    background: transparent;
    color: var(--vmcm-accent);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: .6rem;
  }
  .vmcm__item,
  .vmcm__all { min-height: 2.75rem; padding: .8rem; }
}

@media (min-width: 768px) {
  .vmcm__toggle { display: none; }
  .vmcm__surface { inset-block-start: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .vmcm * { scroll-behavior: auto !important; transition: none !important; }
}
