.model-colors > h2 {
  margin: 0 0 20px;
  color: var(--theme-model-heading-copy, var(--primary));
  font-family: var(--home-heading-font, var(--heading-font));
  font-size: var(--theme-model-heading-size, var(--home-heading-size, 32px));
  font-weight: var(--home-heading-weight, 300);
  line-height: var(--theme-model-heading-line, var(--home-heading-line-height, 32px));
}

.model-colors__swatches {
  display: none;
}

.model-colors[data-colors-ready] .model-colors__swatches {
  display: flex;
  float: right;
  width: 80%;
  flex-wrap: wrap;
  margin: -60px 0 0;
}

.model-colors__swatches > button {
  position: relative;
  width: 35px;
  height: 35px;
  margin: 0 0 0 5px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 30%);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease;
}

.model-colors__swatches > button:is(:hover, :focus-visible) {
  border-color: var(--tableHighlight, var(--primary));
}

.model-colors__swatches > button:is(:hover, :focus-visible) {
  transform: scale(1.1);
}

.model-colors__swatches > button > span {
  display: none;
  position: absolute;
  z-index: 1;
  top: -28px;
  right: 0;
  padding: 4px;
  border-radius: 4px;
  background: var(--tableHighlight, var(--surface));
  color: #000;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}

.model-colors__swatches > button:is(:hover, :focus-visible) > span {
  display: block;
}

.model-colors[data-colors-ready] .model-colors__panel {
  clear: both;
  padding: 0;
  border: 0;
}

.model-colors[data-colors-ready] .model-colors__panel > summary {
  display: none;
}

.model-colors__panel[hidden], .model-colors [hidden] {
  display: none;
}

.model-colors__modes {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 20px;
}

.model-colors__mode-buttons {
  display: inline-flex;
  border-radius: 100px;
  padding: 3px;
  background: rgb(121 111 110 / 50%);
}

.model-colors__modes button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 16px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: rgb(0 0 0 / 70%);
  font: 400 14px / 21px var(--text-font-family);
  cursor: pointer;
}

.model-colors__modes [aria-pressed="true"] {
  background: #fff;
  color: #333;
}

.model-colors__modes svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.model-colors__gallery {
  position: relative;
  margin-top: 10px;
}

.model-colors__images {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.model-colors__images::-webkit-scrollbar {
  display: none;
}

.model-colors__images > a {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

.model-colors__images img {
  width: 100%;
  height: auto;
}

.model-colors__gallery > button {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 60px;
  height: 55px;
  transform: translateY(-50%);
  padding: 0;
  border: 0;
  background: var(--primaryBtn, var(--primary));
  color: #fff;
  font-family: Arial, sans-serif;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 17px 21px;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

.model-colors__gallery > [data-model-gallery-step="-1"] {
  left: -10px;
  background-image: var(--theme-model-gallery-previous, url(/assets/16146a0fa4d6f73c5201/modules/models/assets/gallery-previous.png));
}

.model-colors__gallery > [data-model-gallery-step="1"] {
  right: -10px;
  background-image: var(--theme-model-gallery-next, url(/assets/16146a0fa4d6f73c5201/modules/models/assets/gallery-next.png));
}

.model-colors__gallery > button:disabled {
  opacity: .5;
  cursor: default;
}

.model-colors__pager {
  position: absolute;
  z-index: 2;
  bottom: var(--theme-model-gallery-pager-bottom, -10px);
  left: 0;
  box-sizing: content-box;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 5px 0 0;
  list-style: none;
  text-align: center;
}

.model-colors__pager > li {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: var(--theme-model-gallery-page-margin, 5px);
  padding: 0;
  font-size: var(--theme-model-gallery-page-size, var(--home-editorial-list-size, 1.1rem));
  line-height: 21px;
}

.model-colors__pager > li::before,
.model-colors__pager > li::marker {
  content: none;
}

.model-colors__pager button {
  position: var(--theme-model-gallery-page-position, absolute);
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: 85px;
  padding: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
}

.model-colors__pager button::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d6d6d6;
  content: "";
}

.model-colors__pager button:is([aria-current="true"], :hover)::before {
  background: var(--primary);
}

@media (max-width: 1020px) {
  .model-colors__pager {
    bottom: var(--theme-model-gallery-pager-bottom, -8px);
    display: var(--theme-model-gallery-pager-mobile-display, flex);
    align-items: center;
    justify-content: center;
    box-sizing: var(--theme-model-gallery-pager-mobile-sizing, content-box);
    height: var(--theme-model-gallery-pager-mobile-height, 36px);
    padding-top: var(--theme-model-gallery-pager-mobile-padding, 0px);
  }

  .model-colors__pager > li {
    margin: var(--theme-model-gallery-page-mobile-margin, var(--theme-model-gallery-page-margin, 5px));
  }
}

@media (max-width: 1020px) {
  .model-colors > h2 {
    font-size: var(--theme-model-heading-mobile-size, var(--home-heading-mobile-size, 26px));
    line-height: var(--theme-model-heading-mobile-line, var(--home-heading-mobile-line-height, 1));
  }

  .model-colors[data-colors-ready] .model-colors__swatches {
    width: auto;
    margin: -10px 0 20px;
  }

  .model-colors__swatches > button {
    border-radius: 50px;
  }

  .model-colors__panel {
    clear: both;
  }

  .model-colors__gallery {
    margin-top: 40px;
  }

  .model-colors__gallery > button {
    opacity: .6;
  }

  .model-colors__gallery > [data-model-gallery-step="-1"] {
    left: 10px;
  }

  .model-colors__gallery > [data-model-gallery-step="1"] {
    right: 10px;
  }
}

@media (max-width: 680px) {
  .model-colors[data-colors-ready] .model-colors__swatches {
    margin-bottom: 30px;
  }

  .model-colors__swatches > button {
    width: 25px;
    height: 25px;
  }
}

.model-colors:not(:has(> h2)) .model-colors__swatches {
  margin-top: 0;
}

/* legacy-code/css/iframe.css keeps the choices below the section heading. */
.output-mode--iframe .model-colors[data-colors-ready] .model-colors__swatches {
  margin: 30px 0;
}

.model-detail:has(.model-colors) .model-detail__option-note {
  margin-top: var(--model-option-footer-gap, 48px);
  margin-bottom: 0;
}

.model-detail:has(.model-colors):not(:has(.model-detail__option-note)) .model-detail__warranty {
  margin-top: var(--model-option-footer-gap, 48px);
}

.model-detail:has(.model-colors) .model-detail__warranty {
  display: block;
}

@media (max-width: 1020px) {
  .model-detail:has(.model-colors) {
    --model-option-footer-gap: 0px;
  }

  .model-detail:has(.model-colors):not(:has(.model-detail__option-note)) .model-detail__warranty > br {
    display: none;
  }
}
