/* Hover/focus preview lives outside clipped thumbnail and rail containers. */
.moon-swatch-preview {
  position: fixed; z-index: 1060; display: flex; flex-direction: column; box-sizing: border-box; width: 568px; max-width: calc(100vw - 24px);
  padding: 22px; border: 1px solid #ece9e3; border-radius: 20px; background: #fff; color: var(--moon-ink, #24211e);
  font-family: var(--moon-font, Montserrat, Arial, sans-serif); font-size: 14px; line-height: 1.45;
  box-shadow: 0 16px 50px rgba(30, 27, 23, .17);
}
.moon-swatch-preview[hidden], .moon-swatch-preview [hidden] { display: none !important; }
.moon-swatch-preview::after { content: ''; position: absolute; left: var(--moon-swatch-arrow-x, 50%); width: 14px; height: 14px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.moon-swatch-preview[data-placement="above"]::after { bottom: -8px; border-right: 1px solid #ece9e3; border-bottom: 1px solid #ece9e3; }
.moon-swatch-preview[data-placement="below"]::after { top: -8px; border-left: 1px solid #ece9e3; border-top: 1px solid #ece9e3; }
.moon-swatch-preview[data-placement="inside"]::after { display: none; }
.moon-swatch-preview__content { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 20px; align-items: center; min-height: 0; flex: 1 1 auto; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
.moon-swatch-preview__content--text { grid-template-columns: minmax(0, 1fr); }
.moon-swatch-preview__image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; object-position: center; border-radius: 10px; background: #f7f6f3; }
.moon-swatch-preview__copy { min-width: 0; }
.moon-swatch-preview__title { display: block; padding-right: 18px; margin-bottom: 7px; font-size: 18px; font-weight: 750; }
.moon-swatch-preview__name { margin-bottom: 12px; font-size: 13px; line-height: 1.4; color: #625e59; }
.moon-swatch-preview__facts { margin: 0; padding: 0; }
.moon-swatch-preview__fact { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; padding-bottom: 5px; border-bottom: 1px dotted #e6e2dc; font-size: 14px; }
.moon-swatch-preview__fact dt { margin: 0; color: #67625b; font-weight: 400; }
.moon-swatch-preview__fact dd { margin: 0; max-width: 68%; color: #302d28; font-weight: 550; text-align: right; overflow-wrap: anywhere; }
.moon-swatch-preview__price { margin-top: 13px; color: #b95300; font-size: 23px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.moon-swatch-preview__price--unknown { color: #78736c; font-size: 14px; font-weight: 400; }
.moon-swatch-preview .moon-swatch-preview__open { display: flex; align-items: center; min-height: 40px; margin-top: 5px; color: #854000; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.moon-swatch-preview .moon-swatch-preview__close { position: absolute; top: 6px; right: 6px; display: flex !important; align-items: center; justify-content: center; width: 32px !important; min-width: 32px !important; height: 32px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: #fff !important; color: #625e59 !important; font-size: 24px !important; line-height: 1 !important; cursor: pointer; }
.moon-swatch-preview__open:focus-visible, .moon-swatch-preview__close:focus-visible, .moon-preview-shell .moon-swatch:focus-visible { outline: 3px solid #a94d00; outline-offset: 3px; }
@media (max-width: 520px) {
  /* The call button is a body child at 9999. Only the open preview sits above it. */
  .moon-swatch-preview:not([hidden]) { z-index: 10010; }
  .moon-swatch-preview { padding: 10px 12px 6px; border-radius: 16px; }
  .moon-swatch-preview__content { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .moon-swatch-preview__image { height: auto; max-height: min(29vh, 250px); }
  .moon-swatch-preview__copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 6px; align-items: center; }
  .moon-swatch-preview__title { display: none; }
  .moon-swatch-preview__content--text .moon-swatch-preview__title { display: block; grid-column: 1 / -1; padding-right: 34px; }
  .moon-swatch-preview__name, .moon-swatch-preview__facts { grid-column: 1 / -1; }
  .moon-swatch-preview__facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .moon-swatch-preview__fact { display: block; margin: 0; padding: 0 0 5px; }
  .moon-swatch-preview__fact:only-child { grid-column: 1 / -1; }
  .moon-swatch-preview__fact dt { font-size: 12px; line-height: 1.35; }
  .moon-swatch-preview__fact dd { margin-top: 2px; max-width: none; text-align: left; line-height: 1.3; }
  .moon-swatch-preview__price { margin-top: 0; font-size: 21px; }
  .moon-swatch-preview .moon-swatch-preview__open { justify-self: end; min-height: 44px; margin: 0; white-space: nowrap; }
  .moon-swatch-preview .moon-swatch-preview__close { width: 44px !important; height: 44px !important; top: 3px; right: 3px; z-index: 1; }
}

/* Native fallback uses the same focus and text treatment as the photo chips. */
.mnd-color-btn[data-mnd-sku-ready].active { pointer-events: auto !important; }
.mnd-color-btn[data-mnd-sku-ready]:hover::after { display: none !important; }
.mnd-color-btn[data-mnd-sku-ready]:focus-visible { outline: 3px solid #a94d00; outline-offset: 3px; }
.moon-swatch__text, .mnd-color-btn__text { display: grid; align-content: center; width: 100%; height: 100%; padding: 2px; box-sizing: border-box; text-align: center; font-size: 10px; line-height: 1.15; overflow-wrap: anywhere; overflow: hidden; color: #514b44; background: #f6f3ee; }
