/**
 * ICS Calendar Subscription - Complete Styles
 * Nintendo-style cute bouncy squish animation
 */

/* ============================================================================
   BASE BUTTON STYLING
   ============================================================================ */

.calendar-subscription-container {
    text-align: center;
    padding: 40px 20px;
    margin: 40px auto;
    max-width: 600px;
}

.btn-subscribe-calendar {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #007CFF, #0056b3);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-subscribe-calendar:hover {
    color: #ffffff;
    text-decoration: none;
}

.btn-subscribe-calendar .calendar-icon {
    font-size: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.subscription-help-text {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================================================
   BIG SCROLL-IN ANIMATION - NINTENDO-STYLE CUTE BOUNCE
   ============================================================================ */

@keyframes scrollInWiggle {
    0% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
    8% {
        transform: translateY(-8px) rotate(-3deg) scale(1.02, 0.98);
    }
    12% {
        transform: translateY(-16px) rotate(-5deg) scale(1, 1);
    }
    16% {
        transform: translateY(-20px) rotate(4deg) scale(1, 1);
    }
    20% {
        transform: translateY(-6px) rotate(-2deg) scale(1, 1);
    }
    /* CUTE LANDING SQUISH #1 */
    22% {
        transform: translateY(0) rotate(0deg) scale(0.92, 1.08);
    }
    24% {
        transform: translateY(0) rotate(0deg) scale(1.05, 0.95);
    }
    26% {
        transform: translateY(0) rotate(0deg) scale(0.98, 1.02);
    }
    28% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
    32% {
        transform: translateY(-14px) rotate(4deg) scale(1, 1);
    }
    36% {
        transform: translateY(-4px) rotate(-2deg) scale(1, 1);
    }
    40% {
        transform: translateY(-10px) rotate(3deg) scale(1, 1);
    }
    /* CUTE LANDING SQUISH #2 */
    44% {
        transform: translateY(0) rotate(0deg) scale(0.94, 1.06);
    }
    46% {
        transform: translateY(0) rotate(0deg) scale(1.04, 0.96);
    }
    48% {
        transform: translateY(0) rotate(0deg) scale(0.99, 1.01);
    }
    50% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
    100% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
}

@keyframes shadowBounce {
    0%, 50%, 100% {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
    12% {
        box-shadow: 0 22px 36px rgba(0, 0, 0, 0.28);
    }
    16% {
        box-shadow: 0 26px 44px rgba(0, 0, 0, 0.32);
    }
    20% {
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
    }
    22%, 24%, 26% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    }
    32% {
        box-shadow: 0 20px 32px rgba(0, 0, 0, 0.26);
    }
    40% {
        box-shadow: 0 16px 26px rgba(0, 0, 0, 0.24);
    }
    44%, 46%, 48% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    }
}

.calendar-subscription-container.just-scrolled-in {
    animation: scrollInWiggle 2.5s ease-in-out;
}

.calendar-subscription-container.just-scrolled-in .btn-subscribe-calendar {
    animation: shadowBounce 2.5s ease-in-out;
}

/* ============================================================================
   CONTINUOUS SUBTLE ANIMATION - GENTLE FLOAT
   ============================================================================ */

.calendar-subscription-container {
    animation: subtleFloat 4s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes subtleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
    10% {
        transform: translateY(-5px) rotate(-2deg) scale(1, 1);
    }
    15% {
        transform: translateY(-9px) rotate(2deg) scale(1, 1);
    }
    /* Gentle landing squish */
    18% {
        transform: translateY(0) rotate(0deg) scale(0.96, 1.04);
    }
    20% {
        transform: translateY(0) rotate(0deg) scale(1.02, 0.98);
    }
    22% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
    25% {
        transform: translateY(-4px) rotate(-1deg) scale(1, 1);
    }
    /* Tiny landing squish */
    28% {
        transform: translateY(0) rotate(0deg) scale(0.98, 1.02);
    }
    30% {
        transform: translateY(0) rotate(0deg) scale(1, 1);
    }
}

@keyframes subtleShadow {
    0%, 100% {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
    10% {
        box-shadow: 0 11px 20px rgba(0, 0, 0, 0.19);
    }
    15% {
        box-shadow: 0 15px 26px rgba(0, 0, 0, 0.23);
    }
    18%, 20% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    }
    25% {
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
    }
    28%, 30% {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    }
}

.btn-subscribe-calendar {
    animation: subtleShadow 4s ease-in-out infinite;
}

/* ============================================================================
   CALENDAR ICON EXCITEMENT - MORE BOUNCY
   ============================================================================ */

.btn-subscribe-calendar .calendar-icon {
    display: inline-block;
    animation: iconExcited 4s ease-in-out infinite;
}

@keyframes iconExcited {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    12% {
        transform: scale(1.25) rotate(-6deg);
    }
    16% {
        transform: scale(1.18) rotate(6deg);
    }
    20% {
        transform: scale(1.1) rotate(-3deg);
    }
    24% {
        transform: scale(1) rotate(0deg);
    }
}

/* ============================================================================
   HOVER INTERACTIONS - CUTE BOUNCE
   ============================================================================ */

.btn-subscribe-calendar:hover {
    animation: hoverBounce 0.8s ease-in-out, subtleShadow 4s ease-in-out infinite;
    transform: translateY(-2px);
}

@keyframes hoverBounce {
    0% {
        transform: translateY(-2px) scale(1, 1);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
    20% {
        transform: translateY(-12px) scale(1.02, 0.98);
        box-shadow: 0 22px 38px rgba(0, 0, 0, 0.26);
    }
    40% {
        transform: translateY(-6px) scale(1, 1);
        box-shadow: 0 12px 20px rgba(0, 0, 0, 0.22);
    }
    60% {
        transform: translateY(-10px) scale(1, 1);
        box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
    }
    /* Cute landing squish */
    80% {
        transform: translateY(-2px) scale(0.95, 1.05);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
    }
    90% {
        transform: translateY(-2px) scale(1.03, 0.97);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
    100% {
        transform: translateY(-2px) scale(1, 1);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
}

/* ============================================================================
   ACCESSIBILITY & PERFORMANCE
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    .calendar-subscription-container,
    .calendar-subscription-container.just-scrolled-in,
    .btn-subscribe-calendar,
    .btn-subscribe-calendar .calendar-icon,
    .btn-subscribe-calendar:hover {
        animation: none !important;
    }
    
    .btn-subscribe-calendar {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    }
    
    .btn-subscribe-calendar:hover {
        transform: none;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }
}

/* GPU acceleration for smoother animations */
.calendar-subscription-container,
.btn-subscribe-calendar,
.btn-subscribe-calendar .calendar-icon {
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
}