/**
 * Lottie Animation Styles - Alpine Depth
 * davidmerki.ch
 */

/* ==========================================================================
   Base Container
   ========================================================================== */

.lottie-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Loading state */
.lottie-container:not(.lottie-loaded) {
    background: linear-gradient(
        135deg,
        var(--bg-soft, #f6f8fb) 0%,
        var(--border, #e2e8f0) 100%
    );
    border-radius: 12px;
}

/* Loaded state */
.lottie-container.lottie-loaded {
    background: transparent;
}

/* Error state - fallback to static icon */
.lottie-container.lottie-error {
    opacity: 0.5;
}

/* SVG inside container */
.lottie-container svg {
    width: 100% !important;
    height: 100% !important;
}

/* ==========================================================================
   Service Cards Icons
   ========================================================================== */

/* Icon container in service cards */
.card .ico.lottie-container,
.service-card .ico.lottie-container {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-4, 1rem);
    border-radius: 16px;
    transition: transform 0.3s ease;
}

/* Hover effect on service cards */
.card:hover .ico.lottie-container,
.service-card:hover .ico.lottie-container {
    transform: scale(1.05);
}

/* Featured card larger icon */
.card.featured .ico.lottie-container {
    width: 100px;
    height: 100px;
}

/* ==========================================================================
   Section Title Icons
   ========================================================================== */

.section-lottie {
    width: 48px;
    height: 48px;
    display: inline-flex;
    vertical-align: middle;
    margin-right: var(--space-2, 0.5rem);
}

/* Smaller variant */
.section-lottie-sm {
    width: 32px;
    height: 32px;
}

/* Larger variant */
.section-lottie-lg {
    width: 64px;
    height: 64px;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-lottie {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* FAQ title icon */
.faq-section .section-title .lottie-container {
    width: 40px;
    height: 40px;
}

/* ==========================================================================
   Booking Section
   ========================================================================== */

.booking-lottie {
    width: 56px;
    height: 56px;
}

/* Calendar icon in booking header */
#booking .lottie-container {
    margin-right: var(--space-3, 0.75rem);
}

/* ==========================================================================
   Dark Mode Adjustments
   ========================================================================== */

[data-theme="dark"] .lottie-container:not(.lottie-loaded) {
    background: linear-gradient(
        135deg,
        var(--bg-soft, #1a1a2e) 0%,
        var(--border, #334155) 100%
    );
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .lottie-container svg {
        animation: none !important;
        transition: none !important;
    }

    .lottie-container svg * {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .card .ico.lottie-container,
    .service-card .ico.lottie-container {
        width: 64px;
        height: 64px;
    }

    .card.featured .ico.lottie-container {
        width: 80px;
        height: 80px;
    }

    .section-lottie {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Force animation play */
.lottie-play svg {
    animation-play-state: running !important;
}

/* Force animation pause */
.lottie-pause svg {
    animation-play-state: paused !important;
}
