/* Custom CSS tối ưu chuyển đổi FB Ads & Trải nghiệm One-Click (Organic & Kraft Paper) */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.65), 0 4px 14px rgba(21, 128, 61, 0.35);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(22, 163, 74, 0), 0 6px 20px rgba(21, 128, 61, 0.5);
        transform: scale(1.02);
    }
}

@keyframes shake-attention {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px) rotate(-1deg); }
    40% { transform: translateX(4px) rotate(1deg); }
    60% { transform: translateX(-3px) rotate(-0.5deg); }
    80% { transform: translateX(3px) rotate(0.5deg); }
}

.btn-cta-shake {
    animation: pulse-glow 2.2s infinite ease-in-out;
}

.combo-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid #E2CEB5;
    background-color: #FFFFFF;
}

.combo-card:hover {
    border-color: #16A34A;
    transform: translateY(-2px);
}

.combo-card.selected {
    border-color: #15803D !important;
    background: linear-gradient(180deg, #F9F6F0 0%, #FFFFFF 100%) !important;
    box-shadow: 0 4px 15px -1px rgba(21, 128, 61, 0.15), 0 2px 6px -2px rgba(21, 128, 61, 0.08);
}

.combo-card.selected .radio-circle {
    border-color: #15803D;
    background-color: #15803D;
}

.combo-card.selected .radio-dot {
    opacity: 1;
}

/* Toast thông báo đơn hàng ảo thời gian thực */
#live-toast {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(120%);
    opacity: 0;
}

#live-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Thanh Sticky Mobile CTA dưới đáy */
.mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(10px);
}

/* Tối ưu trình phát video */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nút bật tiếng đè lên video cho FB Ads */
.unmute-overlay {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s;
}

.unmute-overlay:hover {
    background: rgba(220, 38, 38, 0.9);
}

/* Loading spinner cho nút đặt hàng */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* TikTok Shop Postal Address Border Stripe */
.tiktok-address-stripes {
    height: 4px;
    width: 100%;
    background: repeating-linear-gradient(45deg, #FE2C55, #FE2C55 12px, #fff 12px, #fff 18px, #25F4EE 18px, #25F4EE 30px, #fff 30px, #fff 36px);
}

/* Nút đặt hàng kiểu TikTok Shop */
.btn-tiktok-submit {
    background: linear-gradient(135deg, #FE2C55 0%, #E01A4F 100%);
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn-tiktok-submit:hover {
    background: linear-gradient(135deg, #E01A4F 0%, #C4123F 100%);
    transform: translateY(-1px);
}
.btn-tiktok-submit:active {
    transform: scale(0.98);
}

/* Thẻ chọn combo kiểu TikTok Shop */
.combo-tier-card {
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    background: #FAFAFA;
    transition: all 0.2s ease;
    position: relative;
}
.combo-tier-card:hover {
    border-color: #FE2C55;
}
.combo-tier-card.selected {
    border-color: #FE2C55 !important;
    background: #FFF5F6 !important;
    box-shadow: 0 2px 8px rgba(254, 44, 85, 0.15);
}
.combo-tier-card .bottom-tab {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    background: #E5E7EB;
    color: #374151;
    border-radius: 4px;
    margin-top: 4px;
}
.combo-tier-card.selected .bottom-tab {
    background: #FE2C55;
    color: #fff;
}

/* ==========================================================================
   STYLE DÀNH RIÊNG CHO ĐỘ TUỔI 50-60 (SENIOR FRIENDLY & ONE-TOUCH)
   - Chữ to, tương phản cao, ô nhập lớn, nút bấm cực đại chống bấm trượt
   ========================================================================== */
.u50-large-input {
    font-size: 17px !important;
    height: 52px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-width: 2px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    color: #0F172A !important;
    background-color: #F8FAFC !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.u50-large-input:focus {
    background-color: #FFFFFF !important;
    border-color: #DC2626 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15) !important;
}

.u50-combo-card {
    border: 2.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 14px;
    cursor: pointer;
    background: #FFFFFF;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}
.u50-combo-card:hover {
    border-color: #DC2626;
    transform: translateY(-2px);
}
.u50-combo-card.selected {
    border-color: #DC2626 !important;
    background: linear-gradient(180deg, #FFF1F2 0%, #FFFFFF 100%) !important;
    box-shadow: 0 6px 20px -2px rgba(220, 38, 38, 0.2) !important;
}

.u50-submit-btn {
    height: 58px;
    font-size: 19px;
    font-weight: 800;
    border-radius: 14px;
    letter-spacing: 0.3px;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
    transition: all 0.2s ease;
}
.u50-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(220, 38, 38, 0.45);
}
.u50-submit-btn:active {
    transform: scale(0.98);
}

.u50-phone-call-btn {
    height: 52px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 12px;
    background: #10B981;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}
.u50-phone-call-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}
