92 lines
3.5 KiB
CSS
92 lines
3.5 KiB
CSS
/* ============================================================
|
|
animations.css — Micro-interactions & transitions
|
|
============================================================ */
|
|
|
|
/* ── Page transition ─────────────────────────────────────── */
|
|
.page-enter {
|
|
animation: fadeIn 0.3s ease both;
|
|
}
|
|
|
|
/* ── Card hover lift ─────────────────────────────────────── */
|
|
.lift {
|
|
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
}
|
|
.lift:hover {
|
|
transform: translateY(-3px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
/* ── Button press feedback ───────────────────────────────── */
|
|
.btn:active { transform: translateY(1px) scale(0.97); }
|
|
|
|
/* ── Pulse (for pending badge) ───────────────────────────── */
|
|
@keyframes pulse-orange {
|
|
0%, 100% { box-shadow: 0 0 0 0 rgba(255,127,17,0.35); }
|
|
50% { box-shadow: 0 0 0 5px rgba(255,127,17,0); }
|
|
}
|
|
.pulse { animation: pulse-orange 2s infinite; }
|
|
|
|
/* ── Skeleton shimmer ────────────────────────────────────── */
|
|
@keyframes shimmer {
|
|
from { background-position: -600px 0; }
|
|
to { background-position: 600px 0; }
|
|
}
|
|
.skeleton {
|
|
background: linear-gradient(90deg, #e8edf2 25%, #f4f6f9 50%, #e8edf2 75%);
|
|
background-size: 600px 100%;
|
|
animation: shimmer 1.4s infinite linear;
|
|
border-radius: var(--radius-sm);
|
|
color: transparent !important;
|
|
}
|
|
|
|
/* ── Slide in from right (toast) ─────────────────────────── */
|
|
@keyframes toast-in {
|
|
from { opacity: 0; transform: translateX(20px); }
|
|
to { opacity: 1; transform: translateX(0); }
|
|
}
|
|
|
|
/* ── Fade up (cards on load) ─────────────────────────────── */
|
|
@keyframes fadeUp {
|
|
from { opacity: 0; transform: translateY(10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
.fade-up { animation: fadeUp 0.3s ease both; }
|
|
|
|
/* ── Staggered children ──────────────────────────────────── */
|
|
.stagger > *:nth-child(1) { animation-delay: 0.00s; }
|
|
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
|
|
.stagger > *:nth-child(3) { animation-delay: 0.10s; }
|
|
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
|
|
.stagger > *:nth-child(5) { animation-delay: 0.20s; }
|
|
.stagger > *:nth-child(6) { animation-delay: 0.25s; }
|
|
|
|
/* ── Checkbox animate ────────────────────────────────────── */
|
|
input[type=checkbox] {
|
|
accent-color: var(--blue);
|
|
width: 16px;
|
|
height: 16px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* ── Focus ring ──────────────────────────────────────────── */
|
|
:focus-visible {
|
|
outline: 2px solid var(--blue);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ── Smooth link underline ───────────────────────────────── */
|
|
.fancy-link {
|
|
position: relative;
|
|
text-decoration: none;
|
|
color: var(--blue);
|
|
}
|
|
.fancy-link::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -1px; left: 0;
|
|
width: 0; height: 1.5px;
|
|
background: var(--blue);
|
|
transition: width 0.2s ease;
|
|
}
|
|
.fancy-link:hover::after { width: 100%; }
|