.pros-vto-entry {
  clear: both;
  display: block;
  flex: 0 0 100%;
  margin: 0.75rem 0 1rem;
  min-width: 0;
  width: 100%;
}

/* Keep the initial hook HTML on its own row until the module positions it below the cart block. */
.product-quantity:has(> .pros-vto-entry) {
  flex-wrap: wrap;
}

.pros-vto-open {
  align-items: center;
  display: inline-flex;
  gap: 0.55rem;
  justify-content: center;
  min-height: 44px;
  width: 100%;
}

.pros-vto-entry .pros-vto-open {
  box-sizing: border-box;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.pros-vto-open__icon {
  flex-shrink: 0;
  font-size: 1.15em;
}

.pros-vto-modal[hidden],
.pros-vto-modal [hidden] {
  display: none !important;
}

.pros-vto-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 10050;
}

.pros-vto-modal__backdrop {
  background: rgba(14, 23, 38, 0.68);
  inset: 0;
  position: absolute;
}

.pros-vto-modal__dialog {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  color: #232323;
  max-height: calc(100vh - 2rem);
  max-width: 620px;
  overflow: auto;
  position: relative;
  width: 100%;
  z-index: 1;
}

.pros-vto-modal__content {
  padding: 2rem;
}

.pros-vto-modal__close {
  align-items: center;
  background: #f2f4f7;
  border: 0;
  border-radius: 50%;
  color: #1d2733;
  cursor: pointer;
  display: flex;
  font-size: 1.5rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 38px;
  z-index: 2;
}

.pros-vto-modal__header {
  padding-right: 2.5rem;
}

.pros-vto-modal__header h2 {
  font-size: clamp(1.45rem, 4vw, 2rem);
  margin: 0 0 0.75rem;
}

.pros-vto-modal__header p {
  color: #5d6672;
  margin: 0;
}

.pros-vto-eyebrow {
  color: #2b5fb5 !important;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem !important;
  text-transform: uppercase;
}

.pros-vto-form {
  margin-top: 1.5rem;
}

.pros-vto-photo-guide {
  background: #f2f6fc;
  border-radius: 10px;
  color: #34465d;
  margin-bottom: 1rem;
  padding: 1rem;
}

.pros-vto-photo-guide h3 {
  color: #213752;
  font-size: 0.95rem;
  margin: 0 0 0.65rem;
}

.pros-vto-photo-guide ul {
  display: grid;
  gap: 0.5rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.pros-vto-photo-guide li {
  font-size: 0.8rem;
  line-height: 1.45;
  padding-left: 1rem;
  position: relative;
}

.pros-vto-photo-guide li::before {
  background: #2b5fb5;
  border-radius: 50%;
  content: '';
  height: 5px;
  left: 0;
  position: absolute;
  top: 0.5em;
  width: 5px;
}

.pros-vto-product {
  align-items: center;
  background: #f7f9fc;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0.75rem;
}

.pros-vto-product img {
  flex: 0 0 72px;
  object-fit: contain;
}

.pros-vto-product p {
  color: #5d6672;
  font-size: 0.85rem;
  margin: 0.25rem 0 0;
}

.pros-vto-dropzone {
  align-items: center;
  background: #f7f9fc;
  border: 2px dashed #b7c2d0;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 190px;
  padding: 1.5rem;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pros-vto-dropzone:hover,
.pros-vto-dropzone.is-dragging {
  background: #edf4ff;
  border-color: #2b5fb5;
}

.pros-vto-file {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.pros-vto-dropzone__icon {
  align-items: center;
  background: #e6efff;
  border-radius: 50%;
  color: #2b5fb5;
  display: flex;
  font-size: 1.35rem;
  height: 48px;
  justify-content: center;
  margin-bottom: 0.75rem;
  width: 48px;
}

.pros-vto-dropzone__title {
  color: #213752;
  font-size: 1rem;
  font-weight: 700;
}

.pros-vto-dropzone__hint {
  color: #6b7480;
  font-size: 0.82rem;
  margin-top: 0.35rem;
}

.pros-vto-preview {
  background: #f7f9fc;
  border: 1px solid #dce2ea;
  border-radius: 12px;
  overflow: hidden;
}

.pros-vto-preview img,
.pros-vto-result img {
  display: block;
  max-height: 430px;
  object-fit: contain;
  width: 100%;
}

.pros-vto-preview__meta {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 0.8rem 1rem;
}

.pros-vto-preview__meta span {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pros-vto-link {
  background: transparent;
  border: 0;
  color: #2b5fb5;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
}

.pros-vto-consent {
  align-items: flex-start;
  cursor: pointer;
  display: flex;
  font-size: 0.87rem;
  gap: 0.65rem;
  line-height: 1.45;
  margin: 1.15rem 0;
}

.pros-vto-consent input {
  flex: 0 0 auto;
  height: 18px;
  margin-top: 0.1rem;
  width: 18px;
}

.pros-vto-submit,
.pros-vto-retry,
.pros-vto-add-to-cart {
  min-height: 46px;
  width: 100%;
}

.pros-vto-submit {
  align-items: center;
  display: flex;
  gap: 0.65rem;
  justify-content: center;
}

.pros-vto-spinner {
  animation: pros-vto-spin 0.8s linear infinite;
  border: 3px solid #d7e2f3;
  border-radius: 50%;
  border-top-color: #2b5fb5;
  height: 34px;
  width: 34px;
}

.pros-vto-error {
  background: #fff0f0;
  border-radius: 8px;
  color: #a22626;
  font-size: 0.88rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
}

.pros-vto-result {
  margin-top: 1.5rem;
}

.pros-vto-loading {
  align-items: center;
  color: #213752;
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  font-weight: 600;
  gap: 1rem;
  justify-content: center;
  min-height: 280px;
  text-align: center;
}

.pros-vto-loading p {
  margin: 0;
}

.pros-vto-result__status {
  background: #edf6ee;
  border-radius: 8px;
  color: #246b2c;
  font-weight: 600;
  padding: 0.75rem 0.9rem;
}

.pros-vto-result__visual {
  background: #f7f9fc;
  border: 1px solid #dce2ea;
  border-radius: 12px;
  min-height: 280px;
  overflow: hidden;
}

.pros-vto-comparison-toggle {
  background: #f2f6fc;
  border: 1px solid #c2d3eb;
  border-radius: 8px;
  color: #244d88;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  min-height: 46px;
  padding: 0.65rem 1rem;
  width: 100%;
}

.pros-vto-comparison-toggle[aria-expanded="true"] {
  background: #e0ecfc;
  border-color: #2b5fb5;
}

.pros-vto-modal__dialog.is-comparing {
  max-width: 940px;
}

.pros-vto-comparison {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pros-vto-comparison figure {
  background: #f7f9fc;
  border: 1px solid #dce2ea;
  border-radius: 10px;
  margin: 0;
  min-width: 0;
  overflow: hidden;
}

.pros-vto-comparison figcaption {
  color: #34465d;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 3rem;
  padding: 0.75rem;
  text-align: center;
}

.pros-vto-comparison button {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: block;
  padding: 0;
  width: 100%;
}

.pros-vto-comparison img {
  height: 430px;
  max-height: 55vh;
  object-fit: contain;
  width: 100%;
}

.pros-vto-comparison__zoom-hint {
  color: #244d88;
  display: block;
  font-size: 0.8rem;
  padding: 0.65rem;
  text-align: center;
}

.pros-vto-comparison-toggle:focus-visible,
.pros-vto-comparison button:focus-visible {
  outline: 3px solid #2b5fb5;
  outline-offset: -3px;
}

.pros-vto-result__zoom-trigger {
  background: transparent;
  border: 0;
  cursor: zoom-in;
  display: block;
  padding: 0;
  position: relative;
  width: 100%;
}

.pros-vto-result__zoom-trigger:focus-visible {
  box-shadow: inset 0 0 0 3px #2b5fb5;
  outline: 0;
}

.pros-vto-result__zoom-label {
  align-items: center;
  background: rgba(20, 31, 45, 0.88);
  border-radius: 999px;
  bottom: 0.75rem;
  color: #fff;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 600;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  pointer-events: none;
  position: absolute;
  right: 0.75rem;
}

.pros-vto-result__zoom-label svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  width: 20px;
}

.pros-vto-download-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.pros-vto-download {
  align-items: center;
  background: #eef4fc;
  border: 1px solid #c2d3eb;
  border-radius: 8px;
  color: #244d88;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 600;
  gap: 0.5rem;
  justify-content: center;
  line-height: 1.4;
  min-height: 46px;
  padding: 0.65rem 1rem;
  text-align: center;
  text-decoration: none;
}

.pros-vto-download:hover,
.pros-vto-download:focus {
  background: #e0ecfc;
  border-color: #2b5fb5;
  color: #173d74;
  text-decoration: none;
}

.pros-vto-download:focus-visible {
  outline: 3px solid #2b5fb5;
  outline-offset: 3px;
}

.pros-vto-download[aria-disabled="true"] {
  cursor: default;
  opacity: 0.5;
  pointer-events: none;
}

.pros-vto-download svg {
  fill: none;
  flex: 0 0 20px;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 20px;
}

.pros-vto-download-hint,
.pros-vto-download-status {
  color: #56616f;
  font-size: 0.78rem;
  line-height: 1.5;
}

.pros-vto-download-status {
  background: #f5f7fb;
  border-radius: 8px;
  margin: 0.75rem 0 0;
  padding: 0.75rem;
}

.pros-vto-download--zoom {
  background: #fff;
  border-color: transparent;
  left: max(1rem, env(safe-area-inset-left));
  max-width: calc(100vw - 6rem);
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  z-index: 3;
}

.pros-vto-download-status--zoom {
  background: rgba(20, 31, 45, 0.95);
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  color: #fff;
  left: max(0.75rem, env(safe-area-inset-left));
  margin: 0 auto;
  max-width: 620px;
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  z-index: 3;
}

.pros-vto-zoom {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1.5rem;
  position: fixed;
  z-index: 5;
}

.pros-vto-zoom__backdrop {
  background: rgba(5, 10, 18, 0.94);
  inset: 0;
  position: absolute;
}

.pros-vto-zoom__stage {
  align-items: center;
  display: flex;
  height: calc(100vh - 8rem);
  height: calc(100dvh - 8rem);
  justify-content: center;
  max-width: 1200px;
  position: relative;
  width: calc(100vw - 3rem);
  z-index: 1;
}

.pros-vto-zoom__stage img {
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  touch-action: pinch-zoom;
  width: auto;
}

.pros-vto-zoom__close {
  align-items: center;
  background: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  color: #152235;
  cursor: pointer;
  display: flex;
  font-size: 1.75rem;
  height: 44px;
  justify-content: center;
  line-height: 1;
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  top: max(1rem, env(safe-area-inset-top));
  width: 44px;
  z-index: 2;
}

.pros-vto-zoom__close:focus-visible {
  outline: 3px solid #8eb8ff;
  outline-offset: 3px;
}

.pros-vto-result__actions {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pros-vto-retry-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.pros-vto-retry-hint {
  color: #56616f;
  flex: 1 1 260px;
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0;
}

.pros-vto-retry-options .pros-vto-link {
  min-height: 44px;
  padding: 0.4rem 0;
}

.pros-vto-retry-options .pros-vto-link:focus-visible {
  outline: 3px solid #2b5fb5;
  outline-offset: 3px;
}

.pros-vto-retry-options .pros-vto-link:disabled {
  cursor: wait;
  opacity: 0.6;
}

.pros-vto-disclaimer {
  color: #68717d;
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 1rem 0;
}

.pros-vto-plain-text {
  white-space: pre-line;
}

.pros-vto-history {
  border-top: 1px solid #dce2ea;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  min-width: 0;
}

.pros-vto-history__header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

.pros-vto-history__header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.pros-vto-history-notice,
.pros-vto-history-status {
  color: #56616f;
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0.75rem 0;
  overflow-wrap: anywhere;
}

.pros-vto-history-status {
  background: #f5f7fb;
  border-radius: 8px;
  padding: 0.75rem;
}

.pros-vto-history__list {
  display: flex;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0.25rem 0.25rem 0.75rem;
  scroll-snap-type: x proximity;
}

.pros-vto-history__list li {
  display: flex;
  flex: 0 0 144px;
  flex-direction: column;
  min-width: 0;
  scroll-snap-align: start;
}

.pros-vto-history__select {
  background: #fff;
  border: 2px solid #dce2ea;
  border-radius: 10px;
  color: #232323;
  cursor: pointer;
  flex: 1;
  font: inherit;
  padding: 6px;
  text-align: left;
  width: 100%;
}

.pros-vto-history__select[aria-pressed="true"] {
  background: #edf4ff;
  border-color: #2b5fb5;
  box-shadow: 0 0 0 1px #2b5fb5;
}

.pros-vto-history__select img {
  background: #f7f9fc;
  border-radius: 6px;
  display: block;
  height: 152px;
  object-fit: contain;
  width: 100%;
}

.pros-vto-history__select strong,
.pros-vto-history__select span,
.pros-vto-history__select time {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.pros-vto-history__select time {
  color: #56616f;
  font-size: 0.72rem;
}

.pros-vto-history button:focus-visible {
  outline: 3px solid #2b5fb5;
  outline-offset: 2px;
}

.pros-vto-history button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.pros-vto-history .pros-vto-link {
  min-height: 44px;
  padding: 0.35rem;
}

.pros-vto-product > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.pros-vto-retry {
  white-space: normal;
}

body.pros-vto-modal-open {
  overflow: hidden;
}

@keyframes pros-vto-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 575px) {
  .pros-vto-comparison {
    gap: 0.5rem;
  }

  .pros-vto-comparison img {
    height: 60vw;
    max-height: 45vh;
  }

  .pros-vto-comparison figcaption {
    font-size: 0.75rem;
    min-height: 3.5rem;
    padding: 0.65rem 0.35rem;
  }

  .pros-vto-photo-guide ul {
    grid-template-columns: 1fr;
  }

  .pros-vto-modal {
    align-items: flex-end;
    padding: 0;
  }

  .pros-vto-modal__dialog {
    border-radius: 16px 16px 0 0;
    max-height: 94vh;
  }

  .pros-vto-modal__content {
    padding: 1.5rem 1rem 1.25rem;
  }

  .pros-vto-modal__close {
    right: 0.75rem;
    top: 0.75rem;
  }

  .pros-vto-result__actions {
    grid-template-columns: 1fr;
  }

  .pros-vto-download-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 0.35rem;
  }

  .pros-vto-download-hint {
    text-align: center;
  }

  .pros-vto-result__zoom-label {
    bottom: 0.6rem;
    right: 0.6rem;
  }

  .pros-vto-zoom {
    padding: 0.5rem;
  }

  .pros-vto-zoom__stage {
    height: calc(100vh - 8rem);
    height: calc(100dvh - 8rem);
    width: calc(100vw - 1rem);
  }

  .pros-vto-zoom__close {
    right: max(0.75rem, env(safe-area-inset-right));
    top: max(0.75rem, env(safe-area-inset-top));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pros-vto-dropzone {
    transition: none;
  }

  .pros-vto-spinner {
    animation-duration: 1.5s;
  }
}
