Files
KLC-Hr-Dashboard-Frontend/src/components/KPICard.css

85 lines
1.5 KiB
CSS

/* KPICard.css */
.kpi-card {
min-height: 96px;
display: flex;
flex-direction: column;
justify-content: center;
}
/* Responsive adjustments */
@media (max-width: 640px) {
.kpi-card {
min-height: 88px;
}
}
/* Compact mode */
.kpi-card.compact {
min-height: 80px;
}
/* Animation for counting up */
@keyframes countUp {
from {
opacity: 0;
transform: translateY(5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-count-up {
animation: countUp 0.6s ease-out forwards;
}
/* High contrast mode support */
@media (prefers-contrast: high) {
.kpi-card {
border: 1px solid;
}
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
.animate-count-up {
animation: none;
}
.kpi-card {
transition: none;
}
}
/* Dark mode support */
@media (prefers-color-scheme: dark) {
.kpi-card {
background-color: rgba(255, 255, 255, 0.05);
}
}
/* Hover effects for non-touch devices */
@media (hover: hover) and (pointer: fine) {
.kpi-card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
}
/* Touch device adjustments */
@media (pointer: coarse) {
.kpi-card {
min-height: 96px;
/* Larger tap target */
}
}
/* Very small screens (smartwatch size) */
@media (max-width: 320px) {
.kpi-card {
min-height: 76px;
padding: 0.5rem;
}
}