/* =========================================================
User Area: Animations, Responsive Rules and Performance Mode
========================================================= */

@keyframes userDashboardCardEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 900px) {
    .dashboard-top,
    .snapshot-grid {
        grid-template-columns: 1fr;
    }

    .personal-dashboard,
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-identity-card {
        position: static;
    }

    .su-calendar-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Responsive Overrides --- */

@media (max-width: 640px) {
    .user-dashboard-band {
        padding-top: 28px;
    }

    .profile-identity-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-detail-grid p {
        flex-direction: column;
        gap: 4px;
    }

    .profile-detail-grid span {
        max-width: none;
        text-align: left;
    }

    .next-event-highlight {
        min-height: 0;
    }

    .dashboard-welcome-card {
        grid-template-columns: 1fr;
    }

    .personal-dashboard .stat-grid {
        grid-template-columns: 1fr;
    }

    .registered-event-meta p {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .timeline-item {
        grid-template-columns: 56px 1fr;
        gap: 12px;
    }

    .timeline-date {
        width: 56px;
        height: 56px;
        border-radius: 18px;
    }

    .timeline-month-events::before {
        left: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .user-area-entrance .small-title,
    .user-area-entrance h1,
    .user-area-entrance > p:not(.small-title),
    .dashboard-card-entrance {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .registered-event-card:hover {
        transform: none !important;
        box-shadow: var(--soft-shadow);
    }

    .dashboard-summary .profile-summary-card:hover,
    .dashboard-summary .stat-card:hover,
    .dashboard-summary .profile-edit-card:hover,
    .personal-dashboard .dashboard-card-entrance:hover,
    .profile-identity-panel:hover,
    .next-event-highlight:hover,
    .snapshot-card:hover,
    .next-event-highlight:hover::after,
    .timeline-item:hover,
    .timeline-item:focus-visible,
    .timeline-item:hover .timeline-date,
    .timeline-item:focus-visible .timeline-date {
        transform: none !important;
    }
}

/* --- Reduced Motion and Performance Mode --- */

.performance-mode .next-event-highlight:hover,
.performance-mode .next-event-highlight:hover::after {
    transform: none !important;
}