/* ==========================================================================
   HuyMMO Animated Shopping Cart Button Effect (Lottie Carretilla_master)
   Theme: Cyber Obsidian (Nền Đen Cyber / Obsidian)
   - Harmonized with dark theme, high contrast neon shopping cart animation
   - Deep obsidian jet-black base, subtle warm amber + cyan border illumination
   ========================================================================== */

.btn-cart-lottie {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin-right: 2px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    pointer-events: none;
    vertical-align: middle;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
    will-change: transform;
    contain: layout paint;
}

.btn-cart-lottie svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    overflow: visible !important;
    transform-origin: center center;
}

/* ==========================================================================
   Unified Cyber Obsidian Styling for Store Buy Buttons
   (product_detail, service_detail, account_store, vietshare_store)
   ========================================================================== */
.btn-buy-now,
.btn-buy-primary,
.acc-btn-buy,
.vs-btn-buy,
.px-btn-submit {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(145deg, #0d1527 0%, #030712 100%) !important;
    border: 1px solid rgba(249, 115, 22, 0.45) !important;
    color: #ffffff !important;
    box-shadow: 
        0 4px 18px rgba(0, 0, 0, 0.65),
        0 0 14px rgba(249, 115, 22, 0.18),
        inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-buy-now:hover:not(:disabled),
.btn-buy-primary:hover,
.acc-btn-buy:hover:not(:disabled),
.vs-btn-buy:hover:not(:disabled),
.px-btn-submit:hover:not(:disabled) {
    background: linear-gradient(145deg, #15203a 0%, #070c18 100%) !important;
    border-color: #f97316 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 
        0 10px 28px rgba(0, 0, 0, 0.75),
        0 0 24px rgba(249, 115, 22, 0.45),
        0 0 10px rgba(56, 189, 248, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.15) !important;
}

.btn-buy-now:active:not(:disabled),
.btn-buy-primary:active,
.acc-btn-buy:active:not(:disabled),
.vs-btn-buy:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-buy-now .btn-buy-text,
.btn-buy-primary .btn-buy-text,
.acc-btn-buy .btn-buy-text,
.vs-btn-buy .btn-buy-text,
.px-btn-submit .btn-buy-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Sizing variations based on context */
.btn-buy-now .btn-cart-lottie,
.btn-buy-primary .btn-cart-lottie,
.px-btn-submit .btn-cart-lottie {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
}

.acc-btn-buy .btn-cart-lottie,
.vs-btn-buy .btn-cart-lottie {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
}

#btnSubmitOrder .btn-cart-lottie {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
}

/* Hover Interaction: Cart bounds forward with speed */
button:hover:not(:disabled) .btn-cart-lottie,
a:hover .btn-cart-lottie {
    transform: scale(1.15) translateY(-1px);
}

button:active:not(:disabled) .btn-cart-lottie,
a:active .btn-cart-lottie {
    transform: scale(0.96);
}

/* Processing / loading state */
button.processing .btn-cart-lottie,
button:disabled .btn-cart-lottie {
    opacity: 0.5;
    filter: grayscale(0.6);
}

/* Subtle gloss shine sweep effect on button hover */
.btn-buy-now::after,
.btn-buy-primary::after,
.acc-btn-buy::after,
.vs-btn-buy::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 45%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    pointer-events: none;
    transition: none;
    opacity: 0;
}

.btn-buy-now:hover:not(:disabled)::after,
.btn-buy-primary:hover::after,
.acc-btn-buy:hover:not(:disabled)::after,
.vs-btn-buy:hover:not(:disabled)::after {
    left: 130%;
    opacity: 1;
    transition: left 0.75s ease-in-out;
}

/* ==========================================================================
   Voucher Button Lottie Effect (Coupon 3)
   - Bouncy elastic ticket animation (Pink & Warm Amber)
   - Harmonized with dark Cyber Obsidian theme
   ========================================================================== */

.btn-voucher-lottie {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    margin-right: 4px;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
    pointer-events: none;
    vertical-align: middle;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(0);
    will-change: transform;
    contain: layout paint;
}

.btn-voucher-lottie svg {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    overflow: visible !important;
    transform-origin: center center;
}

/* Cyber Obsidian Styling for Voucher Buttons */
.btn-apply-voucher,
.voucher-input-btn-apply,
.voucher-result-popup-btn-use {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(145deg, #0e172a 0%, #060a14 100%) !important;
    border: 1px solid rgba(244, 63, 94, 0.38) !important;
    color: #ffffff !important;
    box-shadow: 
        0 4px 14px rgba(0, 0, 0, 0.6),
        0 0 12px rgba(244, 63, 94, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-apply-voucher:hover,
.voucher-input-btn-apply:hover,
.voucher-result-popup-btn-use:hover {
    background: linear-gradient(145deg, #18223c 0%, #0b1122 100%) !important;
    border-color: #f43f5e !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(244, 63, 94, 0.4),
        0 0 8px rgba(251, 191, 36, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.15) !important;
}

.btn-apply-voucher:active,
.voucher-input-btn-apply:active,
.voucher-result-popup-btn-use:active {
    transform: translateY(0) scale(0.97);
}

.btn-apply-voucher:hover .btn-voucher-lottie,
.voucher-input-btn-apply:hover .btn-voucher-lottie,
.voucher-result-popup-btn-use:hover .btn-voucher-lottie {
    transform: scale(1.15) translateY(-1px);
}

.btn-apply-voucher::after,
.voucher-input-btn-apply::after,
.voucher-result-popup-btn-use::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 45%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(25deg);
    pointer-events: none;
    transition: none;
    opacity: 0;
}

.btn-apply-voucher:hover::after,
.voucher-input-btn-apply:hover::after,
.voucher-result-popup-btn-use:hover::after {
    left: 130%;
    opacity: 1;
    transition: left 0.75s ease-in-out;
}

