/* Localized thumbnails v4 — one locked production image, reprinted in place.
 * Native frames: 400x384 desktop/tablet and 240x240 mobile. */

.hvo-thumbnail-v4 {
  --th4-lime: #d6fd70;
  --th4-ink: #171817;
  --th4-muted: #777873;
  --th4-rail: transparent;
  --th4-rule: rgba(23, 24, 23, 0.11);
  position: relative;
  display: flex;
  width: 25rem;
  max-width: 100%;
  height: 24rem;
  overflow: hidden;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: #fff;
  color: var(--th4-ink);
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  isolation: isolate;
  contain: layout paint;
}

.hvo-th4-frame {
  display: flex;
  width: 24rem;
  height: 23.5rem;
  padding-top: 0.5rem;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  border: 0;
  border-radius: 1.05rem;
  background: transparent;
}

.hvo-th4-print {
  position: relative;
  width: 24rem;
  aspect-ratio: 16 / 9;
  flex: none;
  margin: 0;
  border-radius: 0.875rem;
  transform: translate3d(0, 0, 0);
  transform-origin: center 62%;
}

.hvo-th4-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #6f5a31;
}

.hvo-th4-base {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  transform: translateZ(0);
}

/* The localized artwork differs only inside this physical sign. Keeping the
 * mask here makes the gesture read as print production rather than a slideshow. */
.hvo-th4-ink-window {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}

.hvo-th4-layer {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
}

.hvo-th4-layer img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.hvo-th4-layer[data-th4-layer="es"] img {
  clip-path: polygon(10.25% 0, 15% 0, 44.75% 6.667%, 44.75% 15.333%, 10.25% 9.556%);
}

.hvo-th4-layer[data-th4-layer="ptbr"] img {
  clip-path: polygon(9.875% 0, 20.875% 0, 46.75% 5.778%, 46.75% 14.667%, 9.875% 9.111%);
}

.hvo-th4-layer[data-th4-layer="ar"] img {
  clip-path: polygon(13% 0, 20.875% 0, 44.25% 5.333%, 44.25% 14.222%, 13% 9.556%);
}

.hvo-th4-layer[data-th4-layer="fr"] img {
  clip-path: polygon(13% 0, 19.125% 0, 44.75% 5.778%, 44.75% 14.667%, 13% 10%);
}

.hvo-th4-layer[data-th4-layer="de"] img {
  clip-path: polygon(9.375% 0, 13.75% 0, 44.75% 6.444%, 44.75% 14.889%, 9.375% 9.333%);
}

.hvo-th4-layer[data-th4-layer="hi"] img {
  clip-path: polygon(13% 0, 20.875% 0, 44.25% 5.333%, 44.25% 14.667%, 13% 10.222%);
}

.hvo-th4-layer[data-th4-layer="tr"] img {
  clip-path: polygon(12.25% 0, 20.875% 0, 44.625% 5.333%, 44.625% 14.889%, 12.25% 10%);
}

.hvo-th4-layer[data-th4-layer="ja"] img {
  clip-path: polygon(10.125% 0, 20.875% 0, 46.375% 5.778%, 46.375% 14.667%, 10.125% 9.111%);
}

.hvo-th4-layer[data-th4-layer="ko"] img {
  clip-path: polygon(13% 0, 21.625% 0, 44.25% 5.111%, 44.25% 14.889%, 13% 10.222%);
}

.hvo-th4-seam {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 8%;
  width: 0.9rem;
  height: 16%;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 238, 179, 0),
    rgba(255, 226, 125, 0.2) 28%,
    rgba(255, 253, 231, 0.98) 49%,
    rgba(176, 119, 20, 0.36) 56%,
    rgba(255, 238, 179, 0)
  );
  opacity: 0;
}

.hvo-th4-edge {
  position: absolute;
  z-index: 8;
  inset: 0;
  border: 1px solid rgba(23, 24, 23, 0.1);
  border-radius: inherit;
  box-shadow: none;
  pointer-events: none;
}

.hvo-th4-rail {
  position: relative;
  display: grid;
  width: 23.5rem;
  height: 9rem;
  flex: none;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  align-items: stretch;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--th4-rule);
  border-radius: 1rem;
  background: var(--th4-rail);
}

.hvo-th4-marker {
  position: absolute;
  z-index: 1;
  top: 0.25rem;
  left: 0.25rem;
  width: calc((100% - 1.5rem) / 5);
  height: calc((100% - 0.75rem) / 2);
  border-radius: 999px;
  background: var(--th4-lime);
  opacity: 1;
  transform: translate3d(0, calc(100% + 0.25rem), 0);
}

.hvo-th4-locale {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  border-radius: 999px;
  color: var(--th4-muted);
  font-family: "Geist Mono", "Geistmono", ui-monospace, monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  transition: none;
}

.hvo-th4-locale.is-current {
  color: var(--th4-ink);
  font-weight: 700;
}

.hvo-th4-locale.is-payoff {
  color: #151615;
  font-weight: 700;
}

.hvo-thumbnail-v4.is-running .hvo-th4-print {
  will-change: transform, opacity;
}

.hvo-thumbnail-v4.is-running .hvo-th4-layer {
  will-change: clip-path;
}

.hvo-thumbnail-v4.is-running .hvo-th4-seam {
  will-change: left, opacity;
}

.hvo-thumbnail-v4.is-running .hvo-th4-marker {
  will-change: transform;
}

html[data-theme="dark"] .hvo-thumbnail-v4 img,
[data-preview-dark] .hvo-thumbnail-v4 img {
  filter: none !important;
}

/* Native compact composition, not a scaled desktop surface. */
@media (max-width: 479px) {
  .hvo-thumbnail-v4 {
    width: 15rem;
    height: 15rem;
    border-radius: 0.625rem;
  }

  .hvo-th4-frame {
    width: 14.5rem;
    height: 14.5rem;
    padding-top: 0.375rem;
    border-radius: 0.9rem;
  }

  .hvo-th4-print {
    width: 14rem;
    border-radius: 0.625rem;
  }

  .hvo-th4-rail {
    width: 14rem;
    height: 5.75rem;
    gap: 0.1875rem;
    padding: 0.1875rem;
    border-radius: 0.75rem;
  }

  .hvo-th4-marker {
    top: 0.1875rem;
    left: 0.1875rem;
    width: calc((100% - 1.125rem) / 5);
    height: calc((100% - 0.5625rem) / 2);
    transform: translate3d(0, calc(100% + 0.1875rem), 0);
  }

  .hvo-th4-locale {
    font-size: 0.54rem;
    letter-spacing: 0.045em;
  }

  .hvo-th4-seam {
    width: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hvo-thumbnail-v4,
  .hvo-thumbnail-v4 * {
    animation: none !important;
    transition: none !important;
  }

  .hvo-th4-print,
  .hvo-th4-rail {
    opacity: 1 !important;
    transform: none !important;
  }

  .hvo-th4-layer,
  .hvo-th4-seam {
    display: none !important;
  }
}
