/**
 * Festival Themes CSS
 * Optimized base styles for festival season looks
 * Performance-optimized with CSS containment and will-change properties
 * 
 * @copyright Copyright © Squadkin. All rights reserved.
 */

/* Performance optimizations */
.festival-theme-active {
    transition: all 0.3s ease-in-out;
    contain: layout style paint;
    will-change: transform, opacity;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .festival-theme-active,
    .festival-effect,
    .festival-animation {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Festival Banner Styles */
.festival-banner {
    position: relative;
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    margin-bottom: 20px;
    text-align: center;
}

.festival-banner img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 300px;
    object-fit: cover;
}

.festival-banner .banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Effects Canvas */
#festival-effects-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* Christmas Theme */
.festival-theme-christmas {
    --festival-primary-color: #c41e3a;
    --festival-secondary-color: #2e7d32;
    --festival-accent-color: #ffd700;
    --festival-text-color: #ffffff;
}

.festival-theme-christmas body {
    background-color: #0d1b2a;
}

/* New Year Theme */
.festival-theme-newyear {
    --festival-primary-color: #ffd700;
    --festival-secondary-color: #000000;
    --festival-accent-color: #ff6b6b;
    --festival-text-color: #000000;
}

.festival-theme-newyear body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Import New Year theme CSS */
@import url('newyear-theme.css');

/* Import Halloween theme CSS */
@import url('halloween-theme.css');

/* Halloween Theme */
.festival-theme-halloween {
    --festival-primary-color: #ff6600;
    --festival-secondary-color: #000000;
    --festival-accent-color: #9932cc;
    --festival-text-color: #ffffff;
}

.festival-theme-halloween body {
    background-color: #1a0d00;
    background-image: 
        radial-gradient(circle at 25% 25%, #ff6600 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, #9932cc 0%, transparent 50%);
}

/* Valentine's Day Theme */
.festival-theme-valentine {
    --festival-primary-color: #ff69b4;
    --festival-secondary-color: #ff1493;
    --festival-accent-color: #ffffff;
    --festival-text-color: #ffffff;
}

/* Diwali Theme */
.festival-theme-diwali {
    --festival-primary-color: #ff8c00;
    --festival-secondary-color: #dc143c;
    --festival-accent-color: #ffd700;
    --festival-text-color: #ffffff;
}

/* Diwali theme - CSS variables only, no body styling */

/* Black Friday Theme */
.festival-theme-blackfriday {
    --festival-primary-color: #000000;
    --festival-secondary-color: #ff0000;
    --festival-accent-color: #ffd700;
    --festival-text-color: #ffffff;
}

/* Black Friday theme - CSS variables only, no body styling */

/* removed mothersday and fathersday theme classes */


/* Festival-specific animations */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-10px); }
    70% { transform: translateY(-5px); }
    90% { transform: translateY(-2px); }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--festival-accent-color); }
    50% { box-shadow: 0 0 20px var(--festival-accent-color), 0 0 30px var(--festival-accent-color); }
}

/* Apply animations to festival elements */
.festival-theme-active .festival-banner {
    animation: pulse 3s ease-in-out infinite;
}

.festival-theme-christmas .festival-banner,
.festival-theme-diwali .festival-banner {
    animation: twinkle 2s ease-in-out infinite;
}

.festival-theme-valentine .festival-banner {
    animation: bounce 2s ease-in-out infinite;
}   

/* Responsive design */
@media (max-width: 768px) {
    .festival-banner {
        max-height: 200px;
        margin-bottom: 15px;
    }
    
    .festival-banner .banner-overlay {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .festival-banner {
        max-height: 150px;
        margin-bottom: 10px;
    }
    
    .festival-banner .banner-overlay {
        font-size: 1.2em;
    }
}

/* ========================================
   DISCOUNT BUTTON STYLES
   ======================================== */

.festival-discount-button {
    position: fixed;
    z-index: 99999;
    background: linear-gradient(45deg, #ff6b6b, #ffd700);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    user-select: none;
    text-align: center;
    min-width: 120px;
    border: 2px solid #fff;
    animation: discountPulse 2s infinite;
    font-family: Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.festival-discount-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    animation-play-state: paused;
}

.festival-discount-button:active {
    transform: scale(0.95);
}

/* Discount button animations */
@keyframes discountPulse {
    0% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
}

/* Discount message styles */
.festival-discount-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    padding: 12px 24px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    font-size: 14px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: discountMessageSlide 0.3s ease;
    font-family: Arial, sans-serif;
}

.festival-discount-message-success {
    background-color: #27ae60;
}

.festival-discount-message-error {
    background-color: #e74c3c;
}

.festival-discount-message-info {
    background-color: #3498db;
}

@keyframes discountMessageSlide {
    from { 
        opacity: 0; 
        transform: translateX(-50%) translateY(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(-50%) translateY(0); 
    }
}

/* Responsive discount button */
@media (max-width: 768px) {
    .festival-discount-button {
        padding: 10px 20px;
        font-size: 12px;
        min-width: 100px;
    }
    
    .festival-discount-message {
        font-size: 12px;
        padding: 10px 20px;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .festival-discount-button {
        padding: 8px 16px;
        font-size: 11px;
        min-width: 80px;
    }
    
    .festival-discount-message {
        font-size: 11px;
        padding: 8px 16px;
        max-width: 250px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .festival-discount-button {
        animation: none;
    }
    
    .festival-discount-button:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .festival-discount-button {
        border: 3px solid #000;
        background: #000;
        color: #fff;
    }
} 