/* ─── Coupon Offer Banner ─── */

/* ── Plan Pricing: Old / New Price ── */
.plan .price .amount.has-coupon-discount {
    position: relative;
}

.plan .price .amount .coupon-old-price {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #999;
    text-decoration: line-through;
    line-height: 1.2;
    margin-bottom: 2px;
    animation: oldPriceFadeIn 0.5s ease;
}

.plan .price .amount .coupon-old-price .currency-sm {
    font-size: 12px;
}

.plan .price .amount.has-coupon-discount .num {
    color: #27ae60;
    animation: newPricePop 0.5s ease;
}

.coupon-save-badge {
    display: inline-block;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 12px;
    margin-top: 6px;
    animation: saveBadgeBounce 0.6s ease;
}

@keyframes oldPriceFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes newPricePop {
    0%   { transform: scale(0.8); opacity: 0; }
    60%  { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes saveBadgeBounce {
    0%   { transform: scale(0); opacity: 0; }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

[dir="rtl"] .plan .price .amount .coupon-old-price .currency-sm {
    font-size: 12px;
}

/* ── End Plan Pricing ── */

.coupon-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(270deg, #667eea, #764ba2, #f093fb, #667eea);
    background-size: 600% 600%;
    animation: bannerGradient 8s ease infinite, bannerSlideDown 0.6s ease-out;
    color: #fff;
    padding: 12px 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

@keyframes bannerGradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bannerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.coupon-banner__text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.coupon-banner__code {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px dashed rgba(255,255,255,0.6);
    padding: 4px 14px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.coupon-banner__code:hover {
    background: rgba(255,255,255,0.35);
    transform: scale(1.05);
}

.coupon-banner__code.copied {
    background: rgba(76, 175, 80, 0.4);
    border-color: #4caf50;
}

.coupon-banner__code::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    animation: codePulse 2s infinite;
    pointer-events: none;
}

@keyframes codePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
    50%      { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

.coupon-banner__timer {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    font-variant-numeric: tabular-nums;
}

.coupon-banner__timer-segment {
    background: rgba(0,0,0,0.25);
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.coupon-banner__timer-sep {
    font-weight: 400;
    opacity: 0.7;
}

.coupon-banner__cta {
    display: inline-block;
    background: #fff;
    color: #764ba2;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.coupon-banner__cta:hover {
    background: #f3e8ff;
    transform: scale(1.05);
    color: #764ba2;
    text-decoration: none;
}

.coupon-banner__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

.coupon-banner__close:hover {
    color: #fff;
}

/* RTL */
[dir="rtl"] .coupon-banner__close {
    right: auto;
    left: 12px;
}

[dir="rtl"] .coupon-banner {
    direction: rtl;
}

/* When banner is visible, push content down */
body.has-coupon-banner {
    padding-top: 52px;
}

/* Mobile */
@media (max-width: 768px) {
    .coupon-banner {
        font-size: 13px;
        padding: 10px 36px 10px 12px;
        flex-direction: column;
        gap: 8px;
    }

    .coupon-banner__code {
        font-size: 14px;
    }

    body.has-coupon-banner {
        padding-top: 100px;
    }
}
