/* VRL motion layer. Load after reference CSS and native product controls.
 * Appearance, selection rings, focus, geometry and hidden/open states belong
 * to their existing rules. Never promote whole grids to permanent layers.
 * Reference tokens: fast 180ms, base 260ms, ease-out (.16, 1, .3, 1).
 */
.btn,
.price-strip__track,
.tape__track {
  will-change: auto;
}

/* Put transitions on the resting selector so pointer exit also animates.
 * Do not replace transforms: PDP images have a deliberate scale(1.35),
 * hero artwork is rotated, and menu arrows have positioning transforms.
 */
.product-card:not(.is-picking),
.trust-card,
.community__card,
.reason,
.pdp-card,
.related-card,
.citation-card,
.price-strip__item {
  transition: transform var(--vrl-dur-base, 260ms) var(--vrl-ease-out, ease-out),
    box-shadow var(--vrl-dur-base, 260ms) var(--vrl-ease-out, ease-out),
    border-color var(--vrl-dur-fast, 180ms) ease-out;
}
.product-card__media .vial-photo,
.vial {
  transition: transform 600ms var(--vrl-ease-out, ease-out);
}

.btn,
.vrl-native .woocommerce button.button,
.vrl-native .woocommerce a.button,
.vrl-native .woocommerce input.button,
.vrl-native button.vrl-primary,
.vrl-sticky-add__button,
.vrl-store-help,
#vrlNativeDrawer .button {
  transition: background-color var(--vrl-dur-fast, 180ms) ease-out,
    border-color var(--vrl-dur-fast, 180ms) ease-out,
    color var(--vrl-dur-fast, 180ms) ease-out,
    box-shadow var(--vrl-dur-base, 260ms) var(--vrl-ease-out, ease-out),
    transform var(--vrl-dur-base, 260ms) var(--vrl-ease-out, ease-out);
}

/* Only paint properties: preserve active, unavailable, focus and forced-color
 * rings. In particular, never animate border width or control dimensions.
 */
.variant-option,
.vrl-catalog-option,
.bundle-tier,
.buy-box__form .vrl-bundle,
.buy-box__form .vrl-bulk,
.pdp-gallery__thumb,
.sticky-atc__pick {
  transition: background-color var(--vrl-dur-fast, 180ms) ease-out,
    border-color var(--vrl-dur-fast, 180ms) ease-out,
    color var(--vrl-dur-fast, 180ms) ease-out,
    box-shadow var(--vrl-dur-fast, 180ms) ease-out;
}

.header__nav-link,
.header__icon-btn,
.footer a,
.legal-sidebar a,
.mobile-nav__panel a,
.site-search__result,
.site-search__browse-item,
.cart-line__qty button,
.cart-line__remove,
#vrlNativeDrawer [data-close] {
  transition: background-color var(--vrl-dur-fast, 180ms) ease-out,
    border-color var(--vrl-dur-fast, 180ms) ease-out,
    color var(--vrl-dur-fast, 180ms) ease-out;
}
.header__dropdown {
  transition: opacity var(--vrl-dur-fast, 180ms) ease-out,
    transform var(--vrl-dur-fast, 180ms) var(--vrl-ease-out, ease-out),
    visibility var(--vrl-dur-fast, 180ms) ease-out;
}
/* Open-state transition:none in the reference caused an asymmetric snap. */
.drawer,
.drawer.is-open {
  transition: transform 300ms var(--vrl-ease-out, ease-out);
}
.sticky-atc .btn svg {
  transition: transform var(--vrl-dur-fast, 180ms) ease-out;
}

/* The native dialog owns modality, Escape, focus and immediate dismissal.
 * Animate entry only; no display/visibility override or delayed close.
 */
@media (prefers-reduced-motion: no-preference) {
  #vrlNativeDrawer[open] {
    animation: vrl-native-drawer-reveal var(--vrl-dur-fast, 180ms) ease-out;
  }
  #vrlNativeDrawer[open]::backdrop {
    animation: vrl-native-drawer-reveal var(--vrl-dur-fast, 180ms) ease-out;
  }
}
@keyframes vrl-native-drawer-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Suppress sticky emulated hover on touch, and decorative displacement for
 * reduced motion. These exact elements have an untransformed resting state.
 * The PDP image, hero artwork, picker, burger, dropdown and toggle are excluded.
 */
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .product-card:hover,
  .product-card:hover .vial-photo,
  .vial:not(.pdp-gallery__main img):hover,
  .trust-card:hover,
  .community__card:hover,
  .reason:hover,
  .pdp-card:hover,
  .related-card:hover,
  .citation-card:hover,
  .price-strip__item:hover,
  .btn--dark:hover,
  .btn--ghost:hover,
  .vrl-toast__btn:hover,
  .hero__sale:hover,
  .hero__sale:hover .hero__sale-link > span,
  .why-value__benefit:hover,
  .vrl-promo-bar:hover .vrl-promo-bar__arrow,
  .vrl-promo-bar:hover .vrl-promo-bar__shop,
  .pp-hero .btn:hover,
  .pp-cta .btn:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  /* Keep final state transforms (e.g. open burger/toggle and hidden sticky bar)
   * while making the state change immediate. No universal selector/reset.
   */
  .product-card:not(.is-picking),
  .product-card__media .vial-photo,
  .vial,
  .trust-card,
  .community__card,
  .reason,
  .pdp-card,
  .related-card,
  .citation-card,
  .price-strip__item,
  .price-strip__go,
  .btn,
  .vrl-native .woocommerce button.button,
  .vrl-native .woocommerce a.button,
  .vrl-native .woocommerce input.button,
  .vrl-native button.vrl-primary,
  .vrl-sticky-add__button,
  .vrl-store-help,
  #vrlNativeDrawer .button,
  #vrlNativeDrawer [data-close],
  .variant-option,
  .vrl-catalog-option,
  .bundle-tier,
  .buy-box__form .vrl-bundle,
  .buy-box__form .vrl-bulk,
  .pdp-gallery__thumb,
  .sticky-atc__pick,
  .header__nav-link,
  .header__icon-btn,
  .header__dropdown,
  .header__burger span,
  .footer a,
  .legal-sidebar a,
  .mobile-nav__panel,
  .mobile-nav__panel a,
  .mobile-nav__overlay,
  .site-search__modal,
  .site-search__overlay,
  .site-search__result,
  .site-search__browse-item,
  .drawer,
  .drawer.is-open,
  .drawer-overlay,
  .cart-line__qty button,
  .cart-line__remove,
  .drawer-savings-group__arrow,
  .drawer-savings-group > .drawer-savings-group__content,
  .progress__fill,
  .drawer__body .progress__fill,
  .drawer-b2g1__fill,
  .sticky-atc,
  .sticky-atc .btn svg,
  .sticky-atc .btn.is-open svg,
  .refer-sticky,
  .vrl-toast,
  .vrl-toast__btn,
  .toggle,
  .toggle::after,
  .faq-item__icon,
  .pdp-faq__icon::before,
  .pdp-faq__icon::after,
  .hero__sale,
  .hero__sale-link > span,
  .why-value__benefit,
  .trust-card__tip,
  .trust-card__tip::before,
  .trust-card__tip::after,
  .vrl-promo-bar__arrow,
  .vrl-promo-bar__shop {
    transition: none;
  }
  .tape__track,
  .price-strip__track,
  .hero__eyebrow-dot,
  .pulse-badge__dot,
  .tape__live-dot,
  .tape__item--flash,
  .vrl-bogo-pill::after,
  .sticky-atc__picker,
  #vrlDrawer .vrl-ci,
  #vrlNativeDrawer[open],
  #vrlNativeDrawer[open]::backdrop {
    animation: none;
  }
}

/* Imported catalog filter pills used transition:all and moved on touchscreen hover. */
.filter-pill {
  transition: transform var(--vrl-dur-fast,180ms) var(--vrl-ease-out,ease-out),
    background-color var(--vrl-dur-fast,180ms) ease-out,
    color var(--vrl-dur-fast,180ms) ease-out,
    border-color var(--vrl-dur-fast,180ms) ease-out;
}
@media (hover:none), (pointer:coarse), (prefers-reduced-motion:reduce) {
  .filter-pill:hover { transform:none; }
}
@media (prefers-reduced-motion:reduce) {
  .filter-pill { transition:none; }
}

/* The small live indicator used to repaint its shadow on every frame of the
 * catalog. Keep its center fixed and animate a separate, compositor-sized halo. */
.tape__live-dot, .pulse-badge__dot {
  position: relative;
  animation: none;
  box-shadow: none;
}
@media (prefers-reduced-motion: no-preference) {
  .tape__live-dot::before, .pulse-badge__dot::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(22,163,74,.45);
    pointer-events: none;
    will-change: transform, opacity;
    animation: vrl-indicator-halo 1.6s var(--vrl-ease-in-out, ease-in-out) infinite;
  }
  .pulse-badge__dot::before { animation-duration: 2s; }
}
@keyframes vrl-indicator-halo {
  0%, 100% { transform: translateZ(0) scale(1); opacity: .65; }
  60%, 99% { transform: translateZ(0) scale(2.55); opacity: 0; }
}

/* Keep the active outline and original padding while increasing the tap area. */
@media (max-width: 760px) {
  .shop-controls .filter-pill, .filter-pill, #sortSelect { min-height: 44px; }
}

@media (max-width: 780px) {
  .vrl-match-details > summary {display:list-item;min-height:44px;align-content:center;box-sizing:border-box}
  .signin-benefits__item a[href],label.vrl-remember {display:inline-flex;align-items:center;min-width:44px;min-height:44px;box-sizing:border-box}
}
