/**
 * Advanced Promo Popup Pro - Styles
 * Version: 2.0.0
 * Multiple templates with modern designs
 */

/* ============================================
   POPUP OVERLAY
   ============================================ */

.advanced-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.4s ease;
}

.advanced-popup-overlay.active {
    display: flex !important;
}

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

/* ============================================
   BASE POPUP CONTAINER
   ============================================ */

.advanced-popup-container {
    position: relative;
    padding: 50px 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 20px;
}

@keyframes slideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ============================================
   CLOSE BUTTON
   ============================================ */

.advanced-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    z-index: 10;
}

.advanced-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ============================================
   POPUP CONTENT ELEMENTS
   ============================================ */

.popup-logo {
    margin-bottom: 25px;
}

.popup-logo img {
    max-width: 280px;
    max-height: 100px;
    height: auto;
    width: auto;
}

.popup-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-discount {
    font-size: 64px;
    font-weight: 900;
    margin: 25px 0;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
    line-height: 1;
}

.popup-description {
    font-size: 18px;
    margin: 20px 0 30px 0;
    line-height: 1.6;
    opacity: 0.95;
}

/* ============================================
   COUNTDOWN TIMER
   ============================================ */

.popup-countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.countdown-box {
    background: white;
    border-radius: 12px;
    padding: 20px 15px;
    min-width: 95px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.countdown-box:hover {
    transform: translateY(-5px);
}

.countdown-number {
    font-size: 48px;
    font-weight: 900;
    color: #e74c3c;
    line-height: 1;
    display: block;
}

.countdown-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    margin-top: 10px;
    letter-spacing: 1px;
    display: block;
}

/* ============================================
   CTA BUTTON
   ============================================ */

.popup-cta {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 20px 50px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
    letter-spacing: 2px;
    margin-top: 20px;
}

.popup-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(231, 76, 60, 0.5);
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.popup-cta:active {
    transform: translateY(-1px);
}

/* ============================================
   TEMPLATE: MODERN (Default - Dark)
   ============================================ */

.template-modern {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    background-image: 
        linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.1) 10px,
            rgba(0, 0, 0, 0.1) 20px
        );
    color: white;
}

.template-modern .popup-title,
.template-modern .popup-discount,
.template-modern .popup-description {
    color: white;
}

.template-modern .advanced-popup-close {
    color: white;
}

/* ============================================
   TEMPLATE: ELEGANT (White with Blue)
   ============================================ */

.template-elegant {
    background: white;
    color: #333;
    border: 3px solid #0066cc;
}

.template-elegant .popup-title {
    color: #0066cc;
}

.template-elegant .popup-discount {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.template-elegant .popup-description {
    color: #555;
}

.template-elegant .advanced-popup-close {
    background: rgba(0, 102, 204, 0.1);
    color: #0066cc;
}

.template-elegant .advanced-popup-close:hover {
    background: rgba(0, 102, 204, 0.2);
}

.template-elegant .popup-cta {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.template-elegant .popup-cta:hover {
    box-shadow: 0 12px 35px rgba(0, 102, 204, 0.4);
}

.template-elegant .countdown-box {
    border: 2px solid #0066cc;
}

.template-elegant .countdown-number {
    color: #0066cc;
}

/* ============================================
   TEMPLATE: MINIMAL (Clean White)
   ============================================ */

.template-minimal {
    background: white;
    color: #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.template-minimal .popup-title {
    color: #1a1a1a;
    font-size: 32px;
}

.template-minimal .popup-discount {
    color: #e74c3c;
    font-size: 72px;
}

.template-minimal .popup-description {
    color: #666;
}

.template-minimal .advanced-popup-close {
    background: #f5f5f5;
    color: #333;
}

.template-minimal .advanced-popup-close:hover {
    background: #e5e5e5;
}

.template-minimal .countdown-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
}

.template-minimal .popup-cta {
    background: #1a1a1a;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.template-minimal .popup-cta:hover {
    background: #333;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* ============================================
   TEMPLATE: BOLD (High Contrast)
   ============================================ */

.template-bold {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border: 5px solid white;
}

.template-bold .popup-title {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.template-bold .popup-discount {
    color: white;
    font-size: 80px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.template-bold .popup-description {
    color: white;
}

.template-bold .advanced-popup-close {
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b35;
}

.template-bold .advanced-popup-close:hover {
    background: white;
}

.template-bold .countdown-box {
    background: white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.template-bold .countdown-number {
    color: #ff6b35;
}

.template-bold .popup-cta {
    background: white;
    color: #ff6b35;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.template-bold .popup-cta:hover {
    background: #f9f9f9;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    color: #ff5722;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .advanced-popup-container {
        padding: 40px 25px;
        width: 95%;
        max-width: 100%;
    }

    .popup-title {
        font-size: 22px;
    }

    .popup-discount {
        font-size: 48px;
    }

    .popup-description {
        font-size: 16px;
    }

    .popup-countdown {
        gap: 10px;
    }

    .countdown-box {
        min-width: 75px;
        padding: 15px 10px;
    }

    .countdown-number {
        font-size: 36px;
    }

    .countdown-label {
        font-size: 10px;
    }

    .popup-cta {
        font-size: 16px;
        padding: 15px 35px;
    }

    .popup-logo img {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .advanced-popup-container {
        padding: 30px 20px;
    }

    .popup-title {
        font-size: 20px;
    }

    .popup-discount {
        font-size: 40px;
    }

    .popup-description {
        font-size: 15px;
    }

    .countdown-box {
        min-width: 65px;
        padding: 12px 8px;
    }

    .countdown-number {
        font-size: 28px;
    }

    .popup-cta {
        font-size: 14px;
        padding: 12px 25px;
    }
}

/* ============================================
   ANIMATIONS & EFFECTS
   ============================================ */

.pulse {
    animation: pulse 2s infinite;
}

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

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.advanced-popup-container:focus {
    outline: none;
}

.popup-cta:focus,
.advanced-popup-close:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .advanced-popup-overlay {
        display: none !important;
    }
}
