.vms {
  --vms-primary: #25635b;
  --vms-title: #182c2a;
  --vms-description: #667772;
  --vms-card-bg: #fff;
  --vms-border: #dfe8e4;
  --vms-radius: 14px;
  --vms-gap: 12px;
  --vms-min-width: 140px;
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  column-gap: 12px;
  align-items: center;
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-block: 20px;
  font-family: inherit;
  color: var(--vms-title);
  text-align: start;
  direction: inherit;
}

.vms *,.vms *::before,.vms *::after {
  box-sizing: border-box;
}

.vms .vms__header {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 10px;
  min-width: 0;
}

.vms .vms__badge {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  inline-size: 36px;
  block-size: 36px;
  border: 1px solid var(--vms-border);
  border-radius: 10px;
  color: var(--vms-primary);
  background: var(--vms-card-bg);
}

.vms .vms__badge svg {
  inline-size: 22px;
  block-size: 22px;
}

.vms .vms__intro {
  min-width: 0;
}

.vms .vms__title {
  font-family: inherit;
  color: var(--vms-title);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.vms .vms__description {
  font-family: inherit;
  font-size: .8rem;
  line-height: 1.7;
  color: var(--vms-description);
  margin: 2px 0 0;
  padding: 0;
  overflow-wrap: anywhere;
}

.vms .vms__list {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,max(var(--vms-min-width),calc((100% - 3 * var(--vms-gap)) / 4))),1fr));
  gap: var(--vms-gap);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  list-style: none!important;
  margin: 0!important;
  padding: 8px 6px 12px!important;
}

.vms.is-grid .vms__list {
  grid-template-columns: repeat(var(--vms-count),minmax(0,1fr));
}

.vms.is-carousel .vms__list {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: var(--vms-card-width);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 6px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--vms-border) transparent;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
}

.vms .vms__item {
  display: block;
  min-width: 0;
  margin: 0!important;
  padding: 0!important;
  list-style: none!important;
  scroll-snap-align: start;
}

.vms .vms__item::before,.vms .vms__item::marker {
  content: none!important;
}

.vms .vms__card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--vms-border);
  border-radius: var(--vms-radius);
  background: var(--vms-card-bg);
  color: var(--vms-title);
  text-decoration: none!important;
  box-shadow: 0 2px 5px rgb(20 50 40 / 2%);
  transition: transform .2s ease,border-color .2s ease;
  overflow: hidden;
  -webkit-user-drag: none;
}

.vms .vms__media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16/10;
  max-height: 96px;
  min-height: 60px;
  margin-block-end: 8px;
  border-radius: 10px;
  overflow: hidden;
}

.vms .vms__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 96px;
  object-fit: contain;
  transition: transform .25s ease;
  border: 0;
  border-radius: 10px;
  background: transparent;
  -webkit-user-drag: none;
}

.vms .vms__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--vms-primary);
  background: linear-gradient(145deg,rgb(128 150 140 / 7%),rgb(128 150 140 / 2%));
  border-radius: max(0px,calc(var(--vms-radius) - 8px));
}

.vms .vms__placeholder svg {
  width: 52px;
  height: 52px;
  opacity: .55;
  stroke-width: 1;
}

.vms .vms__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-start: auto;
  min-width: 0;
}

/* Use horizontal cards for one or two models when their container has room. */
@container (min-width: 550px) {
  .vms--few .vms__card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .vms--few .vms__media {
    flex: 0 0 88px;
    width: 88px;
    height: 72px;
    min-height: 0;
    aspect-ratio: auto;
    margin-block-end: 0;
  }

  .vms--few .vms__image {
    max-height: 72px;
  }

  .vms--few .vms__caption {
    flex: 1;
    margin-block-start: 0;
  }
}

.vms .vms__name {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.7rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  color: var(--vms-title);
}

.vms .vms__arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--vms-primary);
  transition: transform .2s ease;
}

.vms .vms__arrow svg {
  width: 16px;
  height: 16px;
}

.vms:dir(rtl) .vms__arrow svg {
  transform: rotate(180deg);
}

.vms .vms__controls {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  margin-block: 0 10px;
}

.vms .vms__control {
  appearance: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--vms-border);
  border-radius: 50%;
  background: var(--vms-card-bg);
  color: var(--vms-primary);
  cursor: pointer;
  box-shadow: none;
  transition: border-color .2s ease,opacity .2s ease;
}

.vms .vms__control svg {
  width: 18px;
  height: 18px;
  color: inherit;
  stroke: currentColor;
  fill: none;
}

/* Keep theme and page-builder button states from washing out the icons. */
.vms .vms__control:is(:hover,:focus,:active) {
  color: var(--vms-primary);
  background: var(--vms-card-bg);
}

.vms .vms__control--prev svg {
  transform: rotate(180deg);
}

.vms:dir(rtl) .vms__control--prev svg {
  transform: none;
}

.vms:dir(rtl) .vms__control--next svg {
  transform: rotate(180deg);
}

.vms .vms__control:disabled {
  opacity: .3;
  cursor: default;
}

.vms .vms__control:hover:not(:disabled) {
  border-color: var(--vms-primary);
}

.vms .vms__card:focus-visible,.vms .vms__control:focus-visible {
  outline: 2px solid var(--vms-primary);
  outline-offset: 3px;
}

.vms [hidden] {
  display: none!important;
}

.vms.is-dragging .vms__list {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.vms.is-dragging .vms__card {
  cursor: grabbing;
}

@media(hover:hover) and (prefers-reduced-motion:no-preference) {
  .vms .vms__card:hover {
    transform: translateY(-3px);
    border-color: var(--vms-primary);
  }

  .vms .vms__card:hover .vms__image {
    transform: scale(1.025);
  }

  .vms .vms__card:hover .vms__arrow {
    transform: translateX(3px);
  }

  .vms:dir(rtl) .vms__card:hover .vms__arrow {
    transform: translateX(-3px);
  }

}

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

}

