/**
 * Promotions CSS - Aligned with Product Page Theme
 * Mobile First + Glassmorphism Light
 *
 * @package SP_Mon_Compte_IPTV
 */

/* Import Oswald Font (same as product page) */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap');

/* ========================================
   CSS Variables (matching product page)
   ======================================== */
:root {
    --spmci-promo-primary: #ff6b6b;
    --spmci-promo-primary-dark: #ee5a5a;
    --spmci-promo-accent: #15bc84;
    --spmci-promo-accent-light: #3cd0a1;
    --spmci-promo-dark: #1a1a1a;
    --spmci-promo-text: #2d2d2d;
    --spmci-promo-gray: #666;
    --spmci-promo-light-gray: #999;
}

/* ========================================
   PRICE GLOW ANIMATION (Product Page)
   ======================================== */
@keyframes spmciPriceGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(21, 188, 132, 0.3), 0 0 40px rgba(21, 188, 132, 0.1);
    }
    50% {
        box-shadow: 0 0 30px rgba(21, 188, 132, 0.5), 0 0 60px rgba(21, 188, 132, 0.2);
    }
}

@keyframes spmciPulseBadge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

/* ========================================
   POPUP MODAL - MOBILE FIRST
   ======================================== */
.spmci-promo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.spmci-promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.spmci-promo-modal {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    border-radius: 20px;
    padding: 24px 18px 22px;
    max-width: 320px;
    width: 100%;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    text-align: center;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    animation: spmciModalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes spmciModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close Button */
.spmci-promo-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.spmci-promo-close:hover {
    background: #e0e0e0;
    color: #333;
    transform: scale(1.1);
}

/* Badge */
.spmci-promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--spmci-promo-primary), var(--spmci-promo-primary-dark));
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 7px 16px;
    border-radius: 30px;
    margin-bottom: 14px;
    animation: spmciPulseBadge 2s ease-in-out infinite;
}

/* Title */
.spmci-promo-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--spmci-promo-dark);
    margin: 0 0 6px 0;
    line-height: 1.3;
    letter-spacing: 0.3px;
}

/* Duration label */
.spmci-promo-duration {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    color: var(--spmci-promo-gray);
    margin: 0 0 14px 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Prices Display */
.spmci-promo-prices {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 12px 0 14px;
}

.spmci-promo-original {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    color: var(--spmci-promo-light-gray);
    text-decoration: line-through;
    font-weight: 400;
}

.spmci-promo-new {
    font-family: 'Oswald', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--spmci-promo-accent);
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.spmci-promo-new .currency {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Countdown */
.spmci-promo-countdown {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 14px 0;
}

.spmci-countdown-item {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 8px 6px;
    min-width: 44px;
}

.spmci-countdown-value {
    display: block;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--spmci-promo-dark);
    line-height: 1;
    margin-bottom: 3px;
}

.spmci-countdown-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.55rem;
    color: var(--spmci-promo-gray);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 500;
}

/* CTA Button */
.spmci-promo-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--spmci-promo-accent), var(--spmci-promo-accent-light)) !important;
    color: white !important;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none !important;
    padding: 12px 24px;
    border-radius: 50px;
    margin-top: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(21, 188, 132, 0.4);
    border: none;
    cursor: pointer;
    width: 100%;
}

.spmci-promo-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(21, 188, 132, 0.5);
}

.spmci-promo-cta i {
    font-size: 1rem;
}

/* ========================================
   TABLET & DESKTOP STYLES
   ======================================== */
@media (min-width: 480px) {
    .spmci-promo-modal {
        padding: 32px 28px 30px;
        max-width: 380px;
        border-radius: 24px;
    }

    .spmci-promo-badge {
        font-size: 0.75rem;
        padding: 9px 22px;
    }

    .spmci-promo-title {
        font-size: 1.3rem;
    }

    .spmci-promo-duration {
        font-size: 0.95rem;
    }

    .spmci-promo-original {
        font-size: 1.1rem;
    }

    .spmci-promo-new {
        font-size: 3rem;
    }

    .spmci-promo-new .currency {
        font-size: 1.5rem;
    }

    .spmci-countdown-item {
        padding: 10px 10px;
        min-width: 52px;
    }

    .spmci-countdown-value {
        font-size: 1.5rem;
    }

    .spmci-promo-cta {
        font-size: 1rem;
        padding: 14px 28px;
    }
}

@media (min-width: 768px) {
    .spmci-promo-popup {
        padding: 40px;
    }

    .spmci-promo-modal {
        padding: 48px 40px 44px;
        max-width: 440px;
        border-radius: 28px;
    }

    .spmci-promo-close {
        top: 18px;
        right: 18px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .spmci-promo-title {
        font-size: 1.6rem;
    }

    .spmci-promo-duration {
        font-size: 1.1rem;
    }

    .spmci-promo-original {
        font-size: 1.3rem;
    }

    .spmci-promo-new {
        font-size: 4rem;
    }

    .spmci-promo-new .currency {
        font-size: 2rem;
    }

    .spmci-promo-countdown {
        gap: 10px;
    }

    .spmci-countdown-item {
        padding: 16px 14px;
        min-width: 68px;
        border-radius: 14px;
    }

    .spmci-countdown-value {
        font-size: 2rem;
    }

    .spmci-countdown-label {
        font-size: 0.7rem;
    }

    .spmci-promo-cta {
        font-size: 1.15rem;
        padding: 18px 40px;
    }
}

/* ========================================
   CART PROMO DISPLAY
   ======================================== */
.spmci-cart-promo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.spmci-cart-promo-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--spmci-promo-primary), var(--spmci-promo-primary-dark));
    color: white;
    font-family: 'Oswald', sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 4px;
}

.spmci-cart-original-price {
    color: #aaa;
    text-decoration: line-through;
    font-size: 0.85rem;
}

.spmci-cart-promo-price {
    color: var(--spmci-promo-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Cart Countdown */
.spmci-cart-countdown-wrapper {
    background: linear-gradient(135deg, rgba(21, 188, 132, 0.08) 0%, rgba(21, 188, 132, 0.02) 100%);
    border: 1px solid rgba(21, 188, 132, 0.15);
    border-radius: 12px;
    padding: 14px;
    margin-top: 16px;
}

.spmci-cart-countdown-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--spmci-promo-accent);
    margin-bottom: 12px;
}

.spmci-cart-countdown {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.spmci-cart-countdown .spmci-countdown-item {
    background: white;
    padding: 8px 10px;
    min-width: 50px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.spmci-cart-countdown .spmci-countdown-value {
    font-size: 1.2rem;
}

.spmci-cart-countdown .spmci-countdown-label {
    font-size: 0.55rem;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.spmci-promo-popup.spmci-closing .spmci-promo-modal {
    animation: spmciModalSlideOut 0.3s ease-out forwards;
}

.spmci-promo-popup.spmci-closing .spmci-promo-overlay {
    animation: spmciFadeOut 0.3s ease-out forwards;
}

@keyframes spmciModalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
}

@keyframes spmciFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
