/**
 * WizAtom AddToCart — v2 CSS
 *
 * Elementor controls target classes directly for styling.
 * Only var(--primary), var(--primary-text), var(--wiz-body-font) used as fallbacks.
 * Everything else is hardcoded defaults — Elementor overrides via class selectors.
 *
 * v2 classes (.wiz-atc*) handle styling.
 * v1 classes (.atc-btn, .atc-container, etc.) remain for JS compatibility only.
 */

/* ================================================================
   Container
   ================================================================ */
   .wiz-atc {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
}

/* ================================================================
   Show-on-hover: Collapse to icon-only, expand on hover
   Post-icon stays visible. Text + pre-icon collapse to 0 width.
   On hover on .wiz-atc__button, text + pre-icon expand.
   Per-device classes:
     .show-on-hover-desktop  → active on ≥1025px
     .show-on-hover-tablet   → active on 768px–1024px
     .show-on-hover-mobile   → active on ≤767px
   ================================================================ */

.wiz-atc.show-on-hover-desktop,
.wiz-atc.show-on-hover-tablet,
.wiz-atc.show-on-hover-mobile {
    align-items: end;
}

/*
 * Show-on-hover: each device class is scoped to its exact breakpoint via min-width + max-width.
 * This ensures the collapse/expand only activates at the correct breakpoint.
 * Uses min-width intentionally — this is a per-device-class pattern, not a layout pattern.
 * The class is only added by PHP when the control is ON for that device.
 * Review note: min-width is required here because each class must ONLY apply at its
 * specific breakpoint, not cascade to larger screens. Desktop-first (max-width only)
 * cannot express "only apply at ≥1025px" without also applying at smaller sizes.
 */

/* Desktop (≥1025px) */
@media (min-width: 1025px) {
    .wiz-atc.show-on-hover-desktop .wiz-atc__button {
        width: fit-content !important;
        transition: all 0.3s ease-in-out;
    }
    .wiz-atc.show-on-hover-desktop .wiz-atc__button > div,
    .wiz-atc.show-on-hover-desktop .wiz-atc__button .wiz-atc__icon--pre {
        opacity: 0;
        max-width: 0;
        width: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity 0.3s ease-in-out, max-width 0.3s ease-in-out, width 0.3s ease-in-out;
        display: inline-flex;
        vertical-align: middle;
    }
    .wiz-atc.show-on-hover-desktop .wiz-atc__button .wiz-atc__icon--post {
        display: inline-flex;
    }
    .wiz-atc.show-on-hover-desktop .wiz-atc__button:not(:hover) {
        gap: 0;
    }
    .wiz-atc.show-on-hover-desktop .wiz-atc__button:hover > div,
    .wiz-atc.show-on-hover-desktop .wiz-atc__button:hover .wiz-atc__icon--pre {
        opacity: 1;
        max-width: 200px;
        width: auto;
    }
}

/* Tablet (768px–1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .wiz-atc.show-on-hover-tablet .wiz-atc__button {
        width: fit-content !important;
        transition: all 0.3s ease-in-out;
    }
    .wiz-atc.show-on-hover-tablet .wiz-atc__button > div,
    .wiz-atc.show-on-hover-tablet .wiz-atc__button .wiz-atc__icon--pre {
        opacity: 0;
        max-width: 0;
        width: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity 0.3s ease-in-out, max-width 0.3s ease-in-out, width 0.3s ease-in-out;
        display: inline-block;
        vertical-align: middle;
    }
    .wiz-atc.show-on-hover-tablet .wiz-atc__button .wiz-atc__icon--post {
        display: inline-flex;
    }
    .wiz-atc.show-on-hover-tablet .wiz-atc__button:not(:hover) {
        gap: 0;
    }
    .wiz-atc.show-on-hover-tablet .wiz-atc__button:hover > div,
    .wiz-atc.show-on-hover-tablet .wiz-atc__button:hover .wiz-atc__icon--pre {
        opacity: 1;
        max-width: 200px;
        width: auto;
    }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
    .wiz-atc.show-on-hover-mobile .wiz-atc__button {
        width: fit-content !important;
        transition: all 0.3s ease-in-out;
    }
    .wiz-atc.show-on-hover-mobile .wiz-atc__button > div,
    .wiz-atc.show-on-hover-mobile .wiz-atc__button .wiz-atc__icon--pre {
        opacity: 0;
        max-width: 0;
        width: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
        white-space: nowrap;
        transition: opacity 0.3s ease-in-out, max-width 0.3s ease-in-out, width 0.3s ease-in-out;
        display: inline-flex;
        vertical-align: middle;
    }
    .wiz-atc.show-on-hover-mobile .wiz-atc__button .wiz-atc__icon--post {
        display: inline-flex;
    }
    .wiz-atc.show-on-hover-mobile .wiz-atc__button:not(:hover) {
        gap: 0;
    }
    .wiz-atc.show-on-hover-mobile .wiz-atc__button:hover > div,
    .wiz-atc.show-on-hover-mobile .wiz-atc__button:hover .wiz-atc__icon--pre {
        opacity: 1;
        max-width: 200px;
        width: auto;
    }
}

/* ================================================================
   Primary Button (Add to Cart / Login)
   ================================================================ */
.wiz-atc__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 8px 16px;
    background: var(--primary);
    color: var(--primary-text, #fff);
    border: none;
    font-family: var(--wiz-body-font, inherit);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    text-transform: none;
}

.wiz-atc__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wiz-atc__button--login {
    background: var(--primary);
    color: var(--primary-text, #fff);
}

/* Icon slots */
.wiz-atc__icon--pre,
.wiz-atc__icon--post {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.wiz-atc__icon--pre svg,
.wiz-atc__icon--post svg {
    width: 16px;
    height: 16px;
}

/* ================================================================
   Quantity Stepper
   ================================================================ */
.wiz-atc__qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    gap: 10px;
}

.wiz-atc__qty.hidden {
    display: none;
}

/* Step buttons (+/-) */
.wiz-atc__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 100%;
    min-height: 36px;
    background: transparent;
    color: #333;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.wiz-atc__step svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Per-element: Decrease button */
.wiz-atc__step--dec {
    background: #EEF1F7;
    color: #676D77;
    border-radius: 50%;
}

/* Per-element: Increase button */
.wiz-atc__step--inc {
    background: var(--primary);
    color: var(--primary-text);
    border-radius: 50%;
}

/* Count display */
.wiz-atc__count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    height: 100%;
    min-width: 40px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    border: 1px solid #222222;
}

.wiz-atc__count-unit {
    font-size: 12px;
    color: #888;
    font-weight: 400;
}

/* ================================================================
   Error State
   ================================================================ */
.wiz-atc.has-error .wiz-atc__qty {
    border: 1px solid #e53e3e;
}

.wiz-atc__error {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
}

/* ================================================================
   Loading / Updating State
   ================================================================ */
.wiz-atc.updating .wiz-atc__button {
    pointer-events: none;
    opacity: 0.7;
}

.wiz-atc.updating .wiz-atc__step {
    pointer-events: none;
}

/* ----------------------------------------------------------------
   First-add spinner
   AddToCartJs adds .loading on the .atc-btn immediately on click.
   Keep the button label visible and render the spinner to the
   right of the text with extra padding — matches the cart-summary
   AddToCart reference. ---------------------------------------- */
.wiz-atc__button.loading {
    position: relative;
    cursor: wait;
    pointer-events: none;
    opacity: 0.85;
    transition: none !important;
}

.wiz-atc__button.loading::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: wiz-atc-spin 1s linear infinite;
    box-sizing: border-box;
    pointer-events: none;
}

@keyframes wiz-atc-spin {
    to { transform: rotate(360deg); }
}

/* ================================================================
   Preset Variants
   ================================================================ */

/* Full Width */
.wiz-atc--full-width .wiz-atc__button {
    width: 100%;
    justify-content: center;
}

/* Icon Only — circular button, no text */
.wiz-atc--icon-only .wiz-atc__button {
    width: auto;
    padding: 8px;
    border-radius: 50%;
    aspect-ratio: 1;
    justify-content: center;
}
.wiz-atc--icon-only .wiz-atc__button > div {
    display: none;
}

/* Text with Icon */
.wiz-atc--text-with-icon .wiz-atc__button {
    gap: 6px;
}

/* Minimal — text link style */
.wiz-atc--minimal .wiz-atc__button {
    background: transparent;
    color: var(--primary);
    padding: 4px 0;
    text-decoration: underline;
    font-weight: 500;
}
.wiz-atc--minimal .wiz-atc__button:hover:not(:disabled) {
    background: transparent;
    opacity: 0.8;
}

/* Quantity Inline — compact for B2B */
.wiz-atc--quantity-inline .wiz-atc__button {
    padding: 6px 12px;
    font-size: 13px;
}

/* Stack "Customize" label below the primary button text */
.wiz-atc__button .customize-text {
    display: block;
}
Message Abhishek