/* ===================================
   Activity Log - Animations & Styles
   =================================== */

/* Keyframe animations for activity entrance */
@keyframes activitySlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes activityFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Activity log container improvements */
.activity-log {
    max-height: 30vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    border-radius: 12px;
    scroll-behavior: smooth;
}

/* Sticky header for activity log */
.activity-log h2 {
    position: sticky;
    top: 0;
    background-color: #e6eff8;
    z-index: 2;
    padding: 15px 20px;
    margin: 0;
    border-radius: 12px 12px 0 0;
}

.theme-dark .activity-log h2 {
    background-color: #1a2236;
}

/* Enhanced scrollbar styling */
.activity-log::-webkit-scrollbar {
    width: 6px;
    background-color: transparent;
}

.activity-log::-webkit-scrollbar-track {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 10px 0;
}

.activity-log::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a8c0ff 0%, #3f2b96 100%);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.activity-log::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    width: 8px;
}

.theme-dark .activity-log::-webkit-scrollbar-track {
    background-color: rgba(255, 255, 255, 0.05);
}

.theme-dark .activity-log::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

/* Activity item animations and transitions */
.activity-log #activity-log li {
    animation: activitySlideIn 0.4s ease-out;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px;
    will-change: transform, opacity;
}

/* Stagger animation for multiple items */
.activity-log #activity-log li:nth-child(1) { animation-delay: 0s; }
.activity-log #activity-log li:nth-child(2) { animation-delay: 0.05s; }
.activity-log #activity-log li:nth-child(3) { animation-delay: 0.1s; }
.activity-log #activity-log li:nth-child(4) { animation-delay: 0.15s; }
.activity-log #activity-log li:nth-child(5) { animation-delay: 0.2s; }
.activity-log #activity-log li:nth-child(6) { animation-delay: 0.25s; }
.activity-log #activity-log li:nth-child(7) { animation-delay: 0.3s; }
.activity-log #activity-log li:nth-child(8) { animation-delay: 0.35s; }
.activity-log #activity-log li:nth-child(9) { animation-delay: 0.4s; }
.activity-log #activity-log li:nth-child(10) { animation-delay: 0.45s; }

/* Hover effects for activity items */
.activity-log #activity-log li:hover {
    transform: translateX(4px);
}

.activity-log #activity-log li a {
    transition: all 0.25s ease;
    border-radius: 10px;
    padding: 12px !important;
    display: block;
}

.activity-log #activity-log li a:hover {
    background-color: rgba(25, 118, 210, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-dark .activity-log #activity-log li a:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Profile image enhancement */
.activity-log #activity-log li a img {
    transition: transform 0.3s ease;
    border: 2px solid transparent;
}

.activity-log #activity-log li a:hover img {
    transform: scale(1.05);
    border-color: rgba(25, 118, 210, 0.3);
}
/* Force proper text layout - defensive CSS */
.activity-log #activity-log li a > div {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.activity-log #activity-log li a h6 {
    display: block !important;
    width: 100%;
    margin-bottom: 4px;
}

.activity-log #activity-log li a span {
    display: block !important;
    width: 100%;
    line-height: 1.4;
}



/* Loading animation refinement */
.activity-log .dot-typing {
    position: relative;
    left: -9999px;
    width: 8px;
    height: 8px;
    border-radius: 5px;
    background-color: #9880ff;
    color: #9880ff;
    box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    animation: dotTyping 1.5s infinite linear;
}

@keyframes dotTyping {
    0% {
        box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    }
    16.667% {
        box-shadow: 9984px -10px 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    }
    33.333% {
        box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    }
    50% {
        box-shadow: 9984px 0 0 0 #9880ff, 9999px -10px 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    }
    66.667% {
        box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    }
    83.333% {
        box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px -10px 0 0 #9880ff;
    }
    100% {
        box-shadow: 9984px 0 0 0 #9880ff, 9999px 0 0 0 #9880ff, 10014px 0 0 0 #9880ff;
    }
}

.activity-log .stage {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0 0 0 25px;
    overflow: hidden;
    height: 20px;
}
