/* Christmas Lights 2025 - Custom Styles */
/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.3;
        transform: scale(0.8);
    }
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes star-twinkle-delayed {
    0%, 100% {
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
                     0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                     0 0 30px rgba(255, 215, 0, 0.5),
                     0 0 40px rgba(255, 215, 0, 0.3);
    }
}

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

/* Apply Animations */
.animate-fade-in {
    animation: fade-in 0.8s ease-out;
}

.animate-slide-up {
    animation: slide-up 0.6s ease-out;
    animation-fill-mode: both;
}

.text-shadow-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Star Background */
.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(to bottom, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
}

.star-small {
    width: 2px;
    height: 2px;
    animation: star-twinkle 3s ease-in-out infinite;
}

.star-medium {
    width: 3px;
    height: 3px;
    animation: star-twinkle 4s ease-in-out infinite;
}

.star-large {
    width: 4px;
    height: 4px;
    animation: star-twinkle 5s ease-in-out infinite;
}

.star-bright {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
    animation: star-twinkle-delayed 2.5s ease-in-out infinite;
}

/* Card Styles */
.card {
    backdrop-filter: blur(10px);
    /* Removed pulse animation for cleaner look */
}

.cta-card {
    cursor: pointer;
}

/* Spinner for Loading */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#spinner {
    margin-left: 10px;
}

/* Payment Message Styles */
#payment-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

#payment-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Input Focus Styles */
input[type="number"]:focus {
    outline: none;
}

/* Quantity Button Hover Effects */
.btn-quantity {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 48px;
    min-height: 48px;
}

.btn-quantity:active {
    transform: scale(0.95);
}

/* Stripe Payment Element Container */
#payment-element {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 2px solid #e5e7eb;
}

/* Donation Options Styling */
.donation-option-btn {
    background-color: white;
    border-color: #e5e7eb;
    color: #374151;
}

.donation-option-btn:hover {
    background-color: #f3f4f6;
    border-color: #9333ea;
    transform: translateY(-2px);
}

.donation-option-btn.selected {
    background: linear-gradient(135deg, #e87c46 0%, #f2cb61 100%);
    border-color: #e87c46;
    color: white;
}

/* Custom gradient button colors */
.btn-gradient-orange {
    background: linear-gradient(to right, #e87c46, #f2cb61);
}

.btn-gradient-orange:hover {
    background: linear-gradient(to right, #d06c3a, #dbb856);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .donation-option-btn {
        font-size: 0.875rem;
        padding: 0.75rem 0.5rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Accessibility - Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hide number input spinners for cleaner look */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
}

/* Collapsible Section Styles */
#glasses-section-content {
    transition: all 0.3s ease-in-out;
}

#toggle-icon {
    transition: transform 0.3s ease-in-out;
}

/* Button Bounce Animation */
@keyframes button-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.btn-quantity.bouncing {
    animation: button-bounce 0.4s ease-out;
}

/* Star Spark Animation */
.star-spark {
    position: fixed;
    width: 12px;
    height: 12px;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #ffbb00 100%);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    opacity: 1;
    transform: translate(0, 0) scale(1);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}


