/* SentraAI — Motion Layer */

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.55); }
    50%      { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
@keyframes pulse-glow-white {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    50%      { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
}
@keyframes pulse-glow-warn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.55); }
    50%      { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes border-glow {
    0%, 100% { box-shadow: 0 0 0 1px var(--success-500), 0 4px 14px rgba(16,185,129,0.18); }
    50%      { box-shadow: 0 0 0 1px var(--success-500), 0 6px 22px rgba(16,185,129,0.34); }
}

@keyframes spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-6px) rotate(2deg); }
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes flash-bg {
    0%   { background-color: rgba(250,204,21,0.0); }
    30%  { background-color: rgba(250,204,21,0.35); }
    100% { background-color: rgba(250,204,21,0.0); }
}

.animate-slide-in-right { animation: slide-in-right var(--dur-base, 220ms) var(--ease-out, ease) both; }
.animate-fade-up        { animation: fade-up var(--dur-base, 220ms) var(--ease-out, ease) both; }
.animate-flash          { animation: flash-bg 1.2s ease-out; }

/* Counter animation helper (class applied when value should animate in) */
.counter-animated { transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.counter-bump     { transform: scale(1.06); }

/* Hover lift on generic soft cards */
.soft-card:hover:not(.no-hover) { transform: translateY(-1px); }

/* Thunderstorm flash overlay */
.weather-widget[data-condition="thunderstorm"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.0);
    pointer-events: none;
    z-index: 2;
    animation: lightning 7s infinite;
}
@keyframes lightning {
    0%, 92%, 100% { background: rgba(255,255,255,0); }
    93%           { background: rgba(255,255,255,0.45); }
    94%           { background: rgba(255,255,255,0); }
    95%           { background: rgba(255,255,255,0.3); }
    96%           { background: rgba(255,255,255,0); }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .weather-canvas { display: none !important; }
    .weather-widget[data-condition="thunderstorm"]::after { display: none !important; }
    .pulse-dot { animation: none !important; box-shadow: none !important; }
}
