/* Activity Log Styles */

.activity-log-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
}

.activity-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    user-select: none;
}

.activity-log-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.activity-log-badge {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.activity-log-badge.has-errors {
    background: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.activity-log-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.activity-log-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 18px;
    line-height: 1;
}

.activity-log-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.activity-log-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.activity-log-content.collapsed {
    display: none;
}

.activity-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f9fafb;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.activity-item.success {
    border-left-color: #10b981;
    background: #f0fdf4;
}

.activity-item.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.activity-item.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.activity-item.error {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.activity-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.activity-item-icon {
    font-size: 18px;
    margin-right: 8px;
}

.activity-item-message {
    flex: 1;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.activity-item-time {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    margin-left: 10px;
}

.activity-item-details {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
    padding-left: 26px;
}

.activity-log-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.activity-log-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.activity-log-footer {
    padding: 12px 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.activity-log-footer-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
    white-space: nowrap;
}

.btn-download {
    background: #667eea;
    color: white;
}

.btn-download:hover {
    background: #5568d3;
}

.btn-clear {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-clear:hover {
    background: #e5e7eb;
}

/* Collapsed state */
.activity-log-container.collapsed {
    width: auto;
}

.activity-log-container.collapsed .activity-log-header {
    border-radius: 12px;
}

/* Scrollbar styling */
.activity-log-content::-webkit-scrollbar {
    width: 6px;
}

.activity-log-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.activity-log-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.activity-log-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .activity-log-container {
        width: calc(100vw - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .activity-log-content {
        max-height: 300px;
    }
}
