/* FUIX Virtual Try-On (DEV). Every rule is scoped to .fuix-vto* / html.fuix-vto-open:
   no theme style is changed. The button is a secondary (outline) action, so it
   cannot be confused with the filled Add to cart button above it. */
.fuix-vto {
  clear: both;
  padding: 10px 5px 0; /* .leo-compare-wishlist-button has a -5px side margin */
}
.fuix-vto[hidden] { display: none !important; }
.fuix-vto__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: normal; /* .product-quantity .add sets nowrap */
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s, color 0.15s;
}
.fuix-vto__btn:hover,
.fuix-vto__btn:focus-visible {
  background: #111;
  color: #fff;
}
.fuix-vto__btn:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.fuix-vto__icon { flex: 0 0 auto; }

/* Everywhere except the theme's mobile layout (max-width:767px): same width
   and left edge as the Add to cart button. "not all and (max-width:767px)" is the
   exact complement of the theme rule, so no fractional viewport width (767.x)
   is left uncovered. The values are measured from that button by
   fuixvirtualtryon.js; without them (no JS) the button stays full width. In the
   theme's mobile layout nothing changes: both buttons are full width. */
@media not all and (max-width: 767px) {
  .fuix-vto__btn {
    width: var(--fuix-vto-w, 100%);
    max-width: 100%;
    margin-left: var(--fuix-vto-ml, 0);
    min-height: 50px; /* same height as Add to cart */
  }
}

/* Try-on dialog: full screen on phones, wide modal on desktop. */
html.fuix-vto-open,
html.fuix-vto-open body { overflow: hidden !important; }
.fuix-vto-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  overscroll-behavior: contain;
  touch-action: none;
}
.fuix-vto-modal[hidden] { display: none !important; }
.fuix-vto-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #000;
  padding: 0; /* UX upgrade 2: the camera goes edge to edge; the try-on page keeps its overlays inside the safe area */
}
/* Close X floats over the camera (no header bar); the title stays for screen readers. */
.fuix-vto-modal__head {
  position: absolute;
  z-index: 2;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: calc(env(safe-area-inset-right, 0px) + 8px);
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}
.fuix-vto-modal__title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.fuix-vto-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fuix-vto-modal__close:hover { background: rgba(0, 0, 0, 0.7); }
.fuix-vto-modal__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fuix-vto-modal__frame {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #000;
}
@media (min-width: 768px) and (min-height: 560px) {
  .fuix-vto-modal { align-items: center; padding: 24px; }
  .fuix-vto-modal__dialog {
    width: min(1100px, 100%);
    height: min(860px, 100%);
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  }
  .fuix-vto-modal__head { top: 12px; right: 12px; }
}
