/* Original non-car colour preview and ProductViewer presentation. */

.colors-gallery {
  padding-bottom: 20px;
  text-align: center;
  margin: 0 20px 40px 20px;
  margin-top: -120px;
}

.colors-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.colors-gallery h2 {
  color: #000;
  line-height: 28px;
  font-size: 28px;
  margin: 12px 0;
}

body[data-design-system="marine"] .colors-gallery {
  margin-top: 0;
}

.colors-gallery img {
  border-radius: 12px;
  height: 60px;
  border: 1px solid #d8d8d8;
}

.colors-gallery button {
  position: relative;
  border: 1px solid #666;
  padding: 2px;
  border-radius: 14px;
  background: rgb(255 255 255 / 30%);
  transition: none;
}

.colors-gallery button:hover {
  border-color: #000;
}

.colors-gallery button.active {
  border: 2px solid #000;
}

.color_name {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  bottom: -36px;
  left: 0;
  z-index: 10;
  transition: all 0.1s ease-in-out;
}

.color_name_inner {
  display: flex;
  justify-content: center;
  width: 100px;
}

.color_name_inner span {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  color: #555;
  background: #f4f3f8;
  z-index: 11;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.colors-gallery button:hover .color_name {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

[data-product-color-preview] img {
  width: 100%;
}

.product_viewer_container {
  position: relative;
  pointer-events: none;
}

.product_viewer_container:not(:has(.product-viewer__image)) {
  display: none;
  min-height: 0;
}

.product-viewer {
  overflow: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  cursor: -webkit-grab;
  cursor: grab;
  pointer-events: auto;
}

.product-viewer__image {
  max-width: 100%;
  height: auto;
  transition: opacity 0.5s ease-in-out;
}

.product-viewer--js-press-active {
  cursor: -webkit-grabbing;
  cursor: grabbing;
}

.product_viewer_container .info-sign {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  height: 28px;
  opacity: 0.3;
  pointer-events: none;
}

.product_viewer_container:has(.pv-loader--js-visible) {
  min-height: 360px;
}

.drag-notice {
  display: none;
  position: absolute;
  left: calc(50% - 60px);
  top: calc(50% - 60px);
  z-index: 1;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  text-decoration: none;
  pointer-events: none;
}

.drag-notice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.drag-notice img {
  width: 60px;
  height: 60px;
  animation: product-viewer-bob 3s infinite ease-in-out;
  filter: invert(1);
}

@keyframes product-viewer-bob {
  0%,
  50%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(20px);
  }

  75% {
    transform: translateX(-20px);
  }
}

.pv-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  visibility: hidden;
  opacity: 0;
  transition: 0.5s ease-in-out all;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pv-loader--js-visible {
  visibility: visible;
  opacity: 1;
}

@keyframes product-viewer-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.pv-loader-inner div {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 3px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%) rotate(0deg);
  will-change: transform;
}

.pv-loader-inner div {
  animation: product-viewer-spin 1s linear infinite;
  top: 50%;
  left: 50%;
}

.pv-loader-inner {
  position: absolute;
  width: 120px;
  height: 120px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
}

/* Controls for non-drag operation of every ProductViewer instance. */

.product-viewer-frame-controls {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transform: translateX(-50%);
  pointer-events: auto;
}

.product-viewer-frame-controls[hidden] {
  display: none;
}

.product-viewer-frame-control {
  min-width: var(--wcag-target-preferred);
  min-height: var(--wcag-target-preferred);
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primaryBtn, #111);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.product-viewer-frame-control:hover {
  background: #fff;
}

.product-viewer-frame-control__icon {
  font-size: 28px;
  line-height: 0.7;
  margin-bottom: 2px;
}

@media (max-width: 480px) {
  .product-viewer-frame-controls {
    width: calc(100% - 32px);
    gap: 8px;
  }

  .product-viewer-frame-control {
    flex: 1 1 0;
    padding-inline: 10px;
    font-size: 14px;
  }
}

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

.colors-gallery button {
  font: inherit;
  cursor: pointer;
}

.colors-gallery h2 {
  font-family: ProximaNovaExCn, Tahoma, Arial;
  font-weight: 300;
}

[data-product-color-preview] img,
.product-viewer__image {
  display: inline;
  vertical-align: baseline;
}

[data-product-color-preview] .product_viewer_container img {
  width: 100%;
}

.colors-gallery img {
  display: inline;
  width: auto;
  vertical-align: baseline;
}

@media (max-width: 1025px) {
  .colors-gallery {
    margin-top: 0;
  }
}

@media (max-width: 680px) {
  .colors-gallery img {
    height: 48px;
  }
}

@media (min-width: 680px) {
  .colors-gallery img {
    height: 54px;
  }
}

/* Retained Honda mobile controls from the release's shared base styles. */
@media (max-width: 768px) {
  body:is([data-design-system="honda"], [data-design-system="bikes"], [data-design-system="power"], [data-design-system="marine"]) .product-viewer-frame-controls {
    justify-content: space-between;
    bottom: 8px;
    gap: 8px;
  }
  body:is([data-design-system="honda"], [data-design-system="bikes"], [data-design-system="power"], [data-design-system="marine"]) .product-viewer-frame-control {
    box-sizing: border-box;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    padding: 0;
    border-color: rgba(0, 0, 0, .14);
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
    box-shadow: none;
    gap: 0;
  }
  body:is([data-design-system="honda"], [data-design-system="bikes"], [data-design-system="power"], [data-design-system="marine"]) .product-viewer-frame-control__label { display: none; }
  body:is([data-design-system="honda"], [data-design-system="bikes"], [data-design-system="power"], [data-design-system="marine"]) .product-viewer-frame-control__icon { font-size: 24px; }
}
