/**
 * Flash Sale Countdown Timer Styles
 * Urgent, eye-catching design to boost conversions
 */

/* Timer Container */
.flash-sale-timer-wrapper {
    background: linear-gradient(135deg, #FF3838 0%, #FF6B6B 100%);
    border: 3px solid #FF1744;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(255, 56, 56, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(255, 56, 56, 0.4),
                    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 56, 56, 0.6),
                    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    }
}

/* Animated background shimmer */
.flash-sale-timer-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer-flash 3s infinite;
}

@keyframes shimmer-flash {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Header Section */
.flash-sale-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.flash-sale-icon {
    font-size: 28px;
    animation: flash-icon 1.5s infinite;
}

@keyframes flash-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.flash-sale-message {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Timer Display */
.flash-sale-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.timer-segment {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 8px;
    min-width: 70px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.timer-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    font-family: 'Courier New', monospace;
}

.timer-label {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    margin-top: 5px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timer-separator {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    opacity: 0.8;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Urgency Message */
.flash-sale-urgency {
    text-align: center;
    color: #FFE17B;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
    animation: urgency-pulse 2s infinite;
}

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

/* Urgency Levels */
.flash-sale-timer-wrapper.urgency-high {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8E53 100%);
    border-color: #FF5722;
    animation: pulse-glow-high 1.5s ease-in-out infinite;
}

@keyframes pulse-glow-high {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5),
                    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 107, 53, 0.7),
                    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    }
}

.flash-sale-timer-wrapper.urgency-critical {
    background: linear-gradient(135deg, #D32F2F 0%, #F44336 100%);
    border-color: #C62828;
    animation: pulse-glow-critical 1s ease-in-out infinite;
}

@keyframes pulse-glow-critical {
    0%, 100% {
        box-shadow: 0 8px 30px rgba(211, 47, 47, 0.7),
                    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 10px 40px rgba(211, 47, 47, 0.9),
                    0 0 0 1px rgba(255, 255, 255, 0.3) inset;
        transform: scale(1.02);
    }
}

.urgency-critical .flash-sale-urgency {
    animation: shake 0.5s infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .flash-sale-timer-wrapper {
        padding: 15px;
        margin: 15px 0;
    }
    
    .flash-sale-message {
        font-size: 14px;
    }
    
    .flash-sale-timer {
        gap: 4px;
    }
    
    .timer-segment {
        min-width: 55px;
        padding: 8px 4px;
    }
    
    .timer-number {
        font-size: 24px;
    }
    
    .timer-label {
        font-size: 9px;
    }
    
    .timer-separator {
        font-size: 20px;
    }
    
    .flash-sale-urgency {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .timer-segment {
        min-width: 50px;
        padding: 6px 3px;
    }
    
    .timer-number {
        font-size: 20px;
    }
    
    .timer-label {
        font-size: 8px;
    }
    
    .flash-sale-icon {
        font-size: 22px;
    }
}

/* Print styles */
@media print {
    .flash-sale-timer-wrapper {
        display: none;
    }
}
