/* Xingxy VIP Promo Buttons (V6 Layout - Unified Split + V8 Mobile Colors + V9 Mobile Custom Icon - Safe Class + V11 Heartbeat Animation) */

/* Flex Container Constraint */
.shop-paybtn-group {
    display: flex;
    white-space: nowrap;
    align-items: center;
    /* Ensure vertical alignment */
}

/* Common Styles */
.shop-paybtn-group .but {
    padding: 6px 8px !important;
    font-size: 13px !important;
    letter-spacing: -0.2px;
    transition: all 0.3s ease;
    height: 38px !important;
    /* Force same height */
    line-height: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Tactile Feedback - Scale on click/touch */
.shop-paybtn-group .but:active {
    transform: scale(0.96) !important;
    opacity: 0.9;
}

/* Cart Button (Independent Capsule) - DESKTOP ONLY styles for .shop-add-cart-btn */
.shop-paybtn-group .shop-add-cart-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 90px;
    border-radius: 50px !important;
    margin-right: 12px !important;
    box-shadow: 0 2px 5px rgba(255, 166, 0, 0.2);
}

/* VIP Button (Left Half of Unified Pill) */
.xingxy-vip-group-btn {
    /* Premium Gradient - Static Base */
    background: linear-gradient(120deg, #f6d365 0%, #fda085 100%) !important;

    /* V11 Heartbeat Animation */
    animation: vipHeartbeat 4s ease-in-out infinite;
    transform-origin: center center;

    color: #5d3500 !important;
    font-weight: 500 !important;
    /* Reduced from 600 to 500 */
    border: none !important;
    flex: 1.6 !important;
    /* Take more space */
    border-radius: 50px 0 0 50px !important;
    /* Left rounded, right flat */
    margin-right: 0 !important;
    /* Touch the next button */
    padding-right: 4px !important;
    /* Visual balance */
    position: relative;
    z-index: 2;
    /* Sit above secondary to avoid border glitches */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* V11 Animation Keyframes: Heartbeat (Subtle but Visible) */
@keyframes vipHeartbeat {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    5% {
        transform: scale(1.02);
        filter: brightness(1.05);
    }

    /* Beat 1 */
    10% {
        transform: scale(1);
        filter: brightness(1);
    }

    15% {
        transform: scale(1.02);
        filter: brightness(1.05);
    }

    /* Beat 2 */
    20% {
        transform: scale(1);
        filter: brightness(1);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    /* Rest */
}

/* Secondary Button (Right Half of Unified Pill) */
.xingxy-vip-secondary-btn {
    background: #f8f9fa !important;
    color: #888 !important;
    border: 1px solid #eee !important;
    border-left: none !important;
    font-size: 12px !important;
    flex: 0.9 !important;
    border-radius: 0 50px 50px 0 !important;
    /* Left flat, right rounded */
    margin-left: 0 !important;
    /* Touch the previous button */
    position: relative;
    left: -1px;
    /* Overlap border slighty */
}

.xingxy-vip-secondary-btn:hover {
    color: #555 !important;
    background: #f0f0f0 !important;
}

/* Dark Mode Support */
body.dark-theme .xingxy-vip-secondary-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #aaa !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .xingxy-vip-group-btn {
    color: #3e2400 !important;
}

/* Mobile Optimizations (V9: Custom SVG Icon Cart) */
@media (max-width: 768px) {
    .shop-paybtn-group {
        flex-wrap: nowrap !important;
        /* Force single line */
        padding: 0 2px;
    }

    /* Cart Button: Pure Icon Mode */
    .shop-paybtn-group .xingxy-mobile-cart-btn {
        padding: 0 !important;
        margin-right: 4px !important;
        /* Closer to pill */
        min-width: auto !important;
        width: 40px !important;
        /* Fixed icon touch area */
        height: 40px !important;
        flex: 0 0 auto !important;
        font-size: 0 !important;
        /* Hide text fallback */
        background: transparent !important;
        /* Remove yellow/white bg */
        border: none !important;
        box-shadow: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        visibility: visible !important;
        /* Force visible */
        opacity: 1 !important;
        z-index: 10 !important;
        transition: transform 0.1s !important;
    }

    .shop-paybtn-group .xingxy-mobile-cart-btn:active {
        transform: scale(0.85) !important;
        /* More pronounced shrink for icon */
        opacity: 0.8 !important;
    }

    /* Ensure SVG is visible and sized */
    .shop-paybtn-group .xingxy-mobile-cart-btn svg {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        display: block !important;
        opacity: 1 !important;
    }

    .shop-paybtn-group .xingxy-mobile-cart-btn::before {
        content: none !important;
        display: none !important;
    }

    /* VIP Button: Keep Gold */
    .xingxy-vip-group-btn {
        flex: 1.4 !important;
        /* Adjust flex slightly */
        font-size: 12px !important;
        padding-left: 10px !important;
        padding-right: 2px !important;
    }

    .xingxy-vip-group-btn i {
        display: none !important;
    }

    /* Buy Button: Pale Red (Active but Secondary) */
    .xingxy-vip-secondary-btn {
        flex: 0.8 !important;
        /* Adjust flex */
        font-size: 12px !important;
        padding: 0 4px !important;
        background: #fff5f5 !important;
        /* Pale Red */
        color: #ff4d4f !important;
        /* Red Text */
        border: 1px solid #ffccc7 !important;
        /* Light Red Border */
        border-left: none !important;
        z-index: 1;
    }

    /* Dark Mode Adjustments */
    body.dark-theme .xingxy-vip-secondary-btn {
        background: rgba(255, 77, 79, 0.1) !important;
        color: #ff7875 !important;
        border-color: rgba(255, 77, 79, 0.2) !important;
    }
}