/* Shared keyboard and motion defaults for KALA Shop widgets. */
:is(.wr-sh,.wr-ip,.wr-pc,.wr-af,.wr-pp,.wr-loved,.wr-spg,.wr-checkout,.wr-sqa,.wr-pr,.wr-pdg,.wr-pdi,.wr-pdp,.wr-pdr,.wr-pd-benefits,.wr-pd-category-banner,.kala-account-nav,.kala-account-content)
:is(a,button,input,select,textarea,summary):focus-visible {
    outline: 3px solid var(--wr-shop-focus, #d90862) !important;
    outline-offset: 3px !important;
}

.wr-pdp__scent input:focus-visible + span {
    outline: 3px solid var(--wr-pd-accent, #d90862);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    :is(.wr-sh,.wr-ip,.wr-pc,.wr-af,.wr-pp,.wr-loved,.wr-spg,.wr-checkout,.wr-sqa,.wr-pr,.wr-pdg,.wr-pdi,.wr-pdp,.kala-account-content) *,
    :is(.wr-sh,.wr-ip,.wr-pc,.wr-af,.wr-pp,.wr-loved,.wr-spg,.wr-checkout,.wr-sqa,.wr-pr,.wr-pdg,.wr-pdi,.wr-pdp,.kala-account-content) *::before,
    :is(.wr-sh,.wr-ip,.wr-pc,.wr-af,.wr-pp,.wr-loved,.wr-spg,.wr-checkout,.wr-sqa,.wr-pr,.wr-pdg,.wr-pdi,.wr-pdp,.kala-account-content) *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Responsive foundations are based on the widget's real width, not only on
   the browser viewport. This keeps shop widgets usable inside narrow
   Elementor columns, popups and account/checkout layouts. */
:is(.wr-sh,.wr-ip,.wr-af,.wr-pp,.wr-loved,.wr-spg,.wr-checkout,.wr-sqa,.wr-product-reviews,.wr-pdg,.wr-pdi,.wr-pdp,.wr-pdr,.wr-pdb,.wr-pd-category-banner,.kala-account-nav,.kala-account-content) {
    container-type: inline-size;
    min-width: 0;
}

:is(.wr-spg__grid,.wr-af__grid) > * {
    min-width: 0;
}

/* Loading feedback shared by AJAX widgets and regular form navigation. */
:is(.wr-af,.wr-spg,.wr-checkout,.wr-pdp,.wr-pc,[data-wr-wishlist])[aria-busy="true"] {
    cursor: progress;
}

:is(.wr-pc__cart,.wr-af__page,.wr-spg__apply,.wr-checkout button,.wr-pdp button).is-loading,
:is(.wr-pc__cart,[data-wr-wishlist],.wr-checkout__cart-item).is-loading {
    pointer-events: none;
}

:is(.wr-pc__cart,.wr-spg__apply,.wr-checkout button,.wr-pdp button).is-loading::after {
    width: 1em;
    height: 1em;
    margin-left: .55em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    content: "";
    animation: wr-shop-spin .65s linear infinite;
}

img[loading="lazy"] {
    background-color: #f4f4f4;
}

/* Transparent assets must not inherit the photo loading placeholder. */
img[loading="lazy"][src*=".svg" i],
img[loading="lazy"][src*=".png" i],
img.wr-shop-right-arrow,
img.custom-logo {
    background-color: transparent !important;
}

.wr-spg__grid .wr-pc,
.wr-af__grid .wr-pc {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
}

@keyframes wr-shop-spin { to { transform: rotate(360deg); } }

@container (max-width: 980px) {
    .wr-spg__form { grid-template-columns: 220px minmax(0,1fr) !important; }
    .wr-spg__grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    .wr-checkout form.checkout.woocommerce-checkout { grid-template-columns: minmax(0,1fr) !important; }
    .wr-checkout #customer_details,
    .wr-checkout .woocommerce-checkout-order-review-wrap { grid-column: 1 !important; }
    .wr-pr__overview { grid-template-columns: minmax(0,1fr) !important; row-gap: 28px; }
    .wr-pdp__capacities { grid-template-columns: repeat(auto-fit,minmax(min(110px,100%),1fr)) !important; }
}

@container (max-width: 680px) {
    .wr-spg__form { display: block !important; }
    .wr-pdp__actions,
    .wr-pdp__wholesale-row,
    .wr-pr__form form,
    .kala-account-content :is(.woocommerce-Addresses,.u-columns,.woocommerce-columns--addresses) {
        grid-template-columns: minmax(0,1fr) !important;
    }
    .wr-pdp__tiers { grid-template-columns: repeat(auto-fit,minmax(min(145px,100%),1fr)) !important; }
    .wr-pdb { grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)) !important; }
    .wr-spg__toolbar { flex-wrap: wrap; }
    .wr-product-reviews .comment-form { grid-template-columns: minmax(0,1fr) !important; }
}

@container (max-width: 430px) {
    .wr-spg__grid { grid-template-columns: minmax(0,1fr) !important; }
    .wr-pdp__capacities,
    .wr-pdp__tiers { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
    .wr-pdp__messages,
    .wr-pdp__modal-messages { grid-template-columns: minmax(0,1fr) !important; }
    .wr-checkout :is(.form-row-first,.form-row-last) { width: 100% !important; float: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    :is(.wr-pc__cart,.wr-spg__apply,.wr-checkout button,.wr-pdp button).is-loading::after {
        animation-duration: 1.5s;
    }
}
