/**
 * PRICING PAGE DISCOUNT - Premium VIP Styles
 * Hiển thị mã giảm giá từ đổi điểm thưởng
 * Hệ Thống Viết Bài Chuẩn SEO
 */

/* =============================================
   DISCOUNT BANNER - Hiển thị khi có mã giảm giá
   ============================================= */

.discount-banner-container {
    position: relative;
    margin-bottom: 2rem;
}

.discount-banner {
    position: relative;
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 50%, #f59e0b 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite, bannerPulse 3s ease-in-out infinite;
    border-radius: 1.5rem;
    padding: 1.5rem 2rem;
    color: white;
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(124, 58, 237, 0.3),
        0 0 60px rgba(236, 72, 153, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.discount-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transform: rotate(45deg);
    animation: shimmerBanner 3s linear infinite;
}

.discount-banner::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: calc(1.5rem - 2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes bannerPulse {

    0%,
    100% {
        box-shadow: 0 10px 40px rgba(124, 58, 237, 0.3), 0 0 60px rgba(236, 72, 153, 0.2);
    }

    50% {
        box-shadow: 0 15px 50px rgba(124, 58, 237, 0.5), 0 0 80px rgba(236, 72, 153, 0.4);
    }
}

@keyframes shimmerBanner {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.discount-banner-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.discount-banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.discount-banner-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    animation: iconFloat 3s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.discount-banner-text h4 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.discount-banner-text p {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
}

.discount-banner-code {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.discount-banner-code i {
    font-size: 0.75rem;
    opacity: 0.8;
}

.discount-banner-right {
    text-align: right;
}

.discount-banner-percent {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-start;
}

.discount-banner-percent span {
    font-size: 1.5rem;
    margin-left: 0.25rem;
}

.discount-banner-expires {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* =============================================
   PACKAGE CARD - Discount Price Display
   ============================================= */

.package-card.has-discount {
    position: relative;
    border-color: rgba(124, 58, 237, 0.3);
}

.package-card.has-discount::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    animation: borderGlow 2s ease-in-out infinite;
    pointer-events: none;
    /* Allow clicks to pass through to buttons */
}

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

.discount-badge-corner {
    position: absolute;
    top: -8px;
    right: 16px;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
    animation: badgePop 0.5s ease-out;
}

@keyframes badgePop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.price-original {
    font-size: 1.25rem;
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-color: #ef4444;
    text-decoration-thickness: 2px;
    position: relative;
}

.price-discounted {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-discounted .amount {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.price-discounted .currency {
    font-size: 1rem;
    font-weight: 700;
    color: #7c3aed;
}

.discount-savings {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    color: #10b981;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.3);
    animation: savingsPulse 2s ease-in-out infinite;
}

@keyframes savingsPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

.discount-savings i {
    font-size: 0.875rem;
}

/* =============================================
   DISCOUNT SOURCE TAG
   ============================================= */

.discount-source-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.2));
    color: #f59e0b;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 1px solid rgba(251, 191, 36, 0.3);
    margin-top: 0.5rem;
}

.discount-source-tag i {
    font-size: 0.75rem;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
    .discount-banner {
        padding: 1.25rem 1rem;
        border-radius: 1rem;
    }

    .discount-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .discount-banner-left {
        flex-direction: column;
    }

    .discount-banner-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .discount-banner-text h4 {
        font-size: 1.125rem;
    }

    .discount-banner-right {
        text-align: center;
    }

    .discount-banner-percent {
        font-size: 2.5rem;
        justify-content: center;
    }

    .price-discounted .amount {
        font-size: 2rem;
    }

    .discount-badge-corner {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .discount-banner {
        padding: 1rem 0.75rem;
    }

    .discount-banner-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .discount-banner-text h4 {
        font-size: 1rem;
    }

    .discount-banner-text p {
        font-size: 0.75rem;
    }

    .discount-banner-percent {
        font-size: 2rem;
    }

    .discount-banner-percent span {
        font-size: 1rem;
    }

    .price-original {
        font-size: 1rem;
    }

    .price-discounted .amount {
        font-size: 1.75rem;
    }
}

/* =============================================
   DARK MODE ADJUSTMENTS
   ============================================= */

.dark .discount-banner {
    box-shadow:
        0 10px 40px rgba(124, 58, 237, 0.4),
        0 0 80px rgba(236, 72, 153, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.dark .package-card.has-discount {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
}

.dark .discount-savings {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.25));
}

.dark .discount-source-tag {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.25));
}

/* =============================================
   NO DISCOUNT STATE
   ============================================= */

.no-discount-hint {
    text-align: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
    border: 1px dashed rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.no-discount-hint p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

.no-discount-hint a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.no-discount-hint a:hover {
    color: #4f46e5;
    text-decoration: underline;
}