/* Flash Sale Banner Styles */

/* Top Banner Styles */
.wc-flash-sale-top-banner {
    position: fixed;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: white;
    padding: 10px 20px;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
    animation: slideDown 0.5s ease-out;
}

.wc-flash-sale-top-banner.position-top {
    top: 0;
}

.wc-flash-sale-top-banner.position-bottom {
    bottom: 0;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    flex-wrap: wrap;
}

.banner-image img {
    max-height: 40px;
    width: auto;
    border-radius: 3px;
}

.banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.banner-text h3,
.banner-text h4 {
    margin: 0 0 5px 0;
    color: white;
}

.banner-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 20px;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.3s ease;
    margin-left: 15px;
}

.banner-close:hover {
    background: rgba(255,255,255,0.3);
}

.banner-button {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
}

.banner-button:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Floating Banner Styles */
.wc-flash-sale-floating-banner {
    position: fixed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9998;
    max-width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    animation: slideInUp 0.5s ease-out;
}

.wc-flash-sale-floating-banner:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.wc-flash-sale-floating-banner.position-left {
    left: 20px;
    bottom: 20px;
}

.wc-flash-sale-floating-banner.position-right {
    right: 20px;
    bottom: 20px;
}

.floating-content {
    position: relative;
}

.floating-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 10px;
}

.floating-text {
    font-size: 14px;
    line-height: 1.4;
}

.floating-text h3,
.floating-text h4 {
    margin: 0 0 8px 0;
    color: white;
}

.floating-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.floating-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.floating-close:hover {
    background: rgba(0,0,0,0.7);
}

/* Timer Styles */
.banner-timer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    flex-wrap: wrap;
}

.countdown-display {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    white-space: nowrap;
}

.countdown-display .countdown-item {
    display: inline-block;
    margin: 0 2px;
}

.timer-text {
    font-size: 12px;
    opacity: 0.9;
}

/* Flash Sale Timer (Product Page) */
.flash-sale-timer-container {
    background: linear-gradient(135deg, #ff6b6b, #ffa726);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    animation: pulse 2s infinite;
}

.flash-sale-timer h4 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.flash-sale-timer-container .countdown-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.flash-sale-timer-container .countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-number {
    font-size: 24px;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 5px;
    min-width: 50px;
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Flash Sale Badge */
.flash-sale-badge {
    background: #ff6b6b;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: blink 2s infinite;
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .wc-flash-sale-top-banner {
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .banner-content {
        gap: 10px;
    }
    
    .banner-image img {
        max-height: 30px;
    }
    
    .banner-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .wc-flash-sale-floating-banner {
        max-width: 250px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .wc-flash-sale-floating-banner.position-left {
        left: 10px;
    }
    
    .wc-flash-sale-floating-banner.position-right {
        right: 10px;
    }
    
    .flash-sale-timer-container .countdown-display {
        gap: 15px;
    }
    
    .countdown-number {
        font-size: 20px;
        padding: 8px;
        min-width: 40px;
    }
    
    .countdown-label {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .wc-flash-sale-top-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .banner-close {
        position: absolute;
        top: 5px;
        right: 5px;
        margin: 0;
    }
    
    .flash-sale-timer-container .countdown-display {
        gap: 10px;
    }
    
    .countdown-number {
        font-size: 18px;
        padding: 6px;
        min-width: 35px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wc-flash-sale-top-banner,
    .wc-flash-sale-floating-banner {
        border: 2px solid white;
    }
    
    .flash-sale-badge {
        border: 1px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wc-flash-sale-top-banner,
    .wc-flash-sale-floating-banner,
    .flash-sale-timer-container {
        animation: none;
    }
    
    .wc-flash-sale-floating-banner:hover {
        transform: none;
    }
    
    .flash-sale-badge {
        animation: none;
    }
}

/* Print styles */
@media print {
    .wc-flash-sale-top-banner,
    .wc-flash-sale-floating-banner {
        display: none !important;
    }
}