/* Neo Woo Variations v6 - Responsive & Animated */

/* Variables are injected via PHP for Colors */
/* --neo-del-bg, --neo-del-text, etc. */

/* Main Wrapper for Chips */
.neo-variations-wrapper {
    margin: 20px 0;
    display: none !important;
    /* JS enables it */
}

.neo-variations-wrapper.visible {
    display: none !important;
}

body.neo-force-native-variations .neo-force-native-hidden {
    display: none !important;
    visibility: hidden !important;
}

body.neo-force-image-variations .neo-force-image-hidden {
    display: none !important;
}

body.neo-force-image-variations .wc-smart-utility-variation-images-container {
    display: block !important;
}

.neo-attribute-row {
    margin-bottom: 15px;
}

.neo-attribute-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
}

.neo-attribute-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Chips */
.neo-variation-chip {
    padding: 8px 16px;
    border: 1px solid var(--neo-chip-border, #ddd);
    border-radius: 4px;
    /* Setting? */
    background: var(--neo-chip-bg, #fff);
    color: var(--neo-chip-text, #333);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    text-align: center;
}

.neo-variation-chip.selected {
    border-color: var(--neo-highlight, #000);
    background: var(--neo-highlight, #000);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.neo-variation-chip.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #eee;
    color: #999;
    text-decoration: line-through;
}

/* Color Swatches (if enacted in future, basic support) */
.neo-variation-chip.is-color {
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* --- STICKY BAR V6 SEAMLESS --- */

.neo-sticky-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    background: transparent;
    transform: translateY(100%);

    /* Butter-smooth entry + Visibility Transition */
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    /* Smooth Quad */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    /* Soft unified shadow */
}

body.neo-force-native-variations .neo-sticky-wrapper {
    display: flex !important;
}

.neo-sticky-wrapper.visible {
    transform: translateY(0);
}

/* Auto-Hide State */
.neo-sticky-wrapper.auto-hidden,
.neo-sticky-wrapper.neo-force-hidden {
    transform: translateY(120%) !important;
    opacity: 0;
    pointer-events: none;
}

/* 1. Delivery Strip (Top) */
.neo-delivery-banner {
    background: var(--neo-del-bg, #f5f9eb);
    color: var(--neo-del-text, #333);
    font-size: clamp(11px, 3vw, 12px);
    /* Fluid */
    padding: 8px 16px;
    text-align: center;
    border-radius: 12px 12px 0 0;
    /* Top rounding */
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 0 !important;
    /* NO GAP */
    line-height: 1.3;
    /* Smooth Transition */
    transition: background-color 0.4s ease, color 0.4s ease;
}

.neo-delivery-banner.visible {
    display: flex;
}

.neo-delivery-banner.success {
    background: var(--neo-del-success-bg, #e6fffa);
    color: var(--neo-del-success-text, #047857);
}

/* Celebration Animations */
@keyframes neo-pop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}


.neo-delivery-icon.celebrate {
    display: inline-block;
    animation: neo-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Lottie Container */
.neo-free-ship-lottie {
    display: none;
    /* JS toggles */
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    /* Size set by JS or inline style, but default safe sizing */
    width: 32px;
    height: 32px;
}

/* 2. Action Row (Bottom) */
.neo-action-row {
    background: var(--neo-sticky-bg, #fff);
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* No top border - seamless */
}

/* Price Column */
.neo-price-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    /* Prevent overflow */
    flex-grow: 1;
    /* Allow taking available space */
}

.neo-sticky-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-bottom: 4px;
    font-weight: 500;
}

/* V6 Stacked Price */
.neo-sticky-price {
    color: var(--neo-sticky-price, #111);
    line-height: 1.1;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

/* Force WC Price HTML to stack */
.neo-sticky-price .price,
.neo-sticky-price .neo-custom-price-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    margin: 0 !important; 
}

/* Sale/Main Price (Top) */
.neo-sticky-price ins,
.neo-sticky-price>.amount,
.neo-sticky-price .price>.amount:last-child {
    order: 1;
    text-decoration: none;
    font-weight: 800 !important; /* Bolder */
    font-size: clamp(18px, 5vw, 21px) !important; /* Larger */
    /* Responsive Typography */
    color: var(--neo-highlight, #e60000) !important; /* Highlighted */
}
.neo-sticky-price ins {
    display: inline !important;
}

/* Regular Price (Bottom) */
.neo-sticky-price .percentage {
    order: 2;
    font-size: 0.75em;
    opacity: 0.6;
    font-weight: 400;
    margin-top: 2px;
    color: inherit;
    display: block !important;
}

.neo-sticky-price del,
.neo-custom-price-wrap del {
    display: inline !important;
    visibility: visible !important;
    opacity: 0.6 !important;
    text-decoration: line-through !important;
    order: 2;
    font-size: 0.75em;
    font-weight: 400;
    margin-top: 2px;
}

/* Hide Regular if toggled in admin */
/* 
.neo-hide-regular .neo-sticky-price del {
    display: none !important;
} 
*/

/* Buttons Col */
.neo-buttons-col {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Buttons */
.neo-sticky-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 24px;
    height: 48px;
    border-radius: 8px;
    /* Slightly softer */
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    transition: transform 0.1s ease, background-color 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.neo-sticky-btn:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.neo-btn-primary {
    background: var(--neo-highlight, #111);
    color: #fff;
}

.neo-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

/* Small Screen Optimization (<360px) */
@media (max-width: 359px) {
    .neo-action-row {
        padding: 8px 12px;
    }

    .neo-sticky-btn {
        padding: 0 16px;
        height: 44px;
        font-size: 13px;
    }

    .neo-buttons-col {
        gap: 6px;
    }

    .neo-sticky-price ins {
        font-size: 16px;
    }

    .neo-delivery-banner {
        font-size: 10px;
    }
}

/* --- V9: Button Sizes --- */
.neo-sticky-wrapper.neo-size-small .neo-sticky-btn {
    height: 40px;
    font-size: 13px;
    padding: 0 16px;
}

.neo-sticky-wrapper.neo-size-medium .neo-sticky-btn {
    height: 48px;
    /* Default */
    font-size: 15px;
    padding: 0 24px;
}

.neo-sticky-wrapper.neo-size-large .neo-sticky-btn {
    height: 56px;
    font-size: 17px;
    padding: 0 32px;
}

/* --- V9: Price Formatting --- */
.neo-price-decimal-small {
    font-size: 0.6em;
    vertical-align: top;
    opacity: 0.85;
    margin-left: 1px;
}

/* Variation Highlight Animation */
@keyframes neo-blink-highlight {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.neo-highlight-pulse {
    animation: neo-blink-highlight 0.5s ease-in-out 4;
    /* Blink 4 times in 2s */
}
