/**
 * Animations CSS
 * 
 * Contains:
 * - Fade animations
 * - Slide animations
 * - Cookies popup styles
 * - Price alert styles
 * - Header scroll styles
 * 
 * @package Aktualny_Sendvic
 * @version 1.0.0
 */

/* ============================================================================
   KEYFRAME ANIMATIONS
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

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

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

/* ============================================================================
   ANIMATION CLASSES
   ============================================================================ */

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

.animate-slide-down {
    animation: slideDown 0.4s ease-out forwards;
}

/* ============================================================================
   COOKIES POPUP STYLES
   ============================================================================ */

.cookies-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: white;
    border-top: 2px solid hsl(var(--border));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    display: none;
}

.cookies-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookies-icon {
    flex-shrink: 0;
    color: hsl(var(--primary));
}

.cookies-text {
    flex: 1;
    min-width: 250px;
}

.cookies-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: hsl(var(--foreground));
}

.cookies-text p {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 0;
}

.cookies-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookies-actions button {
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cookies-actions .btn-primary {
    background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--primary-glow)));
    color: white;
}

.cookies-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookies-actions .btn-secondary {
    background: transparent;
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
}

.cookies-actions .btn-secondary:hover {
    background: hsl(var(--muted) / 0.5);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookies-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .cookies-actions {
        width: 100%;
    }
    
    .cookies-actions button {
        flex: 1;
    }
}

/* ============================================================================
   PRICE ALERT STYLES
   ============================================================================ */

.price-alert {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    max-width: 400px;
    background: white;
    border: 2px solid hsl(var(--primary) / 0.2);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 1.25rem;
    display: none;
}

.price-alert-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

.price-alert-icon {
    flex-shrink: 0;
    color: hsl(var(--primary));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.price-alert-text {
    flex: 1;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

.price-alert-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: hsl(var(--primary));
}

.price-alert-close {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: white;
    border: 1px solid hsl(var(--border));
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: hsl(var(--muted-foreground));
}

.price-alert-close:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
    transform: scale(1.1);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .price-alert {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

/* ============================================================================
   HEADER SCROLL STYLES
   ============================================================================ */

.site-header {
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ============================================================================
   MOBILE MENU STYLES
   ============================================================================ */

.mobile-navigation {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-navigation.active {
    max-height: 500px;
}

.mobile-menu-toggle {
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .menu-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .menu-icon:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .menu-icon:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

