﻿.activity-stream-container {
    position: relative;
    max-width: 100%;
    padding: 1.5rem 0;
}

    .activity-stream-container .activity-stream-header {
        margin-bottom: 1rem;
    }

    .activity-stream-container .header-title h2 {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }

    .activity-stream-container .header-title p {
        font-size: 0.875rem;
    }

    .activity-stream-container .activity-controls {
        background: #f8f9fa;
        border-radius: 0.5rem !important;
    }

        .activity-stream-container .activity-controls .form-label {
            font-size: 0.75rem;
            color: #6c757d;
            margin-bottom: 0.25rem;
        }

        .activity-stream-container .activity-controls .form-control {
            font-size: 0.875rem;
            border-radius: 0.375rem;
            transition: all 0.2s ease;
        }

            .activity-stream-container .activity-controls .form-control:focus {
                box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.15);
                border-color: #80bdff;
            }

    .activity-stream-container .activity-timeline {
        position: relative;
        padding: 0;
    }

    .activity-stream-container .activity-item {
        position: relative;
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #ffffff;
        border: 1px solid #e9ecef;
        border-radius: 0.5rem;
        transition: all 0.2s ease;
    }

        .activity-stream-container .activity-item:hover {
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
            border-color: #dee2e6;
            transform: translateY(-1px);
        }

        .activity-stream-container .activity-item.activity-failure {
            border-left: 3px solid #dc3545;
            background-color: #fff5f5;
        }

        .activity-stream-container .activity-item.activity-project {
            border-left: 3px solid #28a745;
        }

        .activity-stream-container .activity-item.activity-customer {
            border-left: 3px solid #007bff;
        }

        .activity-stream-container .activity-item.activity-workorder {
            border-left: 3px solid #ffc107;
        }

        .activity-stream-container .activity-item.activity-design {
            border-left: 3px solid #6f42c1;
        }

    .activity-stream-container .activity-avatar-container {
        position: relative;
        margin-right: 0.75rem;
    }

    .activity-stream-container .activity-avatar,
    .activity-stream-container .activity-avatar-placeholder {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        border: 2px solid #ffffff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }

    .activity-stream-container .activity-avatar {
        object-fit: cover;
    }

    .activity-stream-container .activity-avatar-placeholder {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        font-weight: 600;
    }

    .activity-stream-container .activity-type-badge {
        position: absolute;
        bottom: -2px;
        right: -2px;
        width: 1.25rem;
        height: 1.25rem;
        background: #007bff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 0.6rem;
        border: 2px solid #ffffff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .activity-stream-container .activity-card {
        padding: 0;
    }

    .activity-stream-container .activity-user {
        font-weight: 600;
        font-size: 0.9rem;
    }

    .activity-stream-container .activity-summary {
        margin-left: 0.5rem;
        font-size: 0.85rem;
    }

    .activity-stream-container .activity-time {
        white-space: nowrap;
        font-size: 0.75rem;
    }

    .activity-stream-container .activity-description {
        font-size: 0.85rem;
        line-height: 1.4;
        padding: 0.5rem;
        background: #f8f9fa;
        border-radius: 0.375rem;
        border-left: 2px solid #dee2e6;
        margin-top: 0.5rem;
    }

    .activity-stream-container .activity-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-top: 0.5rem;
    }

    .activity-stream-container .badge-entity {
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        border-radius: 0.75rem;
    }

    .activity-stream-container .badge-area {
        background: linear-gradient(135deg, #6c757d, #495057);
        color: white;
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        border-radius: 0.75rem;
    }

    .activity-stream-container .activity-actions {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        margin-top: 0.5rem;
    }

    .activity-stream-container .activity-attachment,
    .activity-stream-container .activity-link {
        text-decoration: none;
        padding: 0.2rem;
        border-radius: 0.2rem;
        transition: all 0.2s ease;
        font-size: 0.8rem;
    }

        .activity-stream-container .activity-attachment:hover,
        .activity-stream-container .activity-link:hover {
            color: #007bff;
            background: #f8f9fa;
        }

    /* Entity-specific styling */
    .activity-stream-container .activity-item.activity-project .activity-type-badge {
        background: linear-gradient(135deg, #28a745, #1e7e34);
    }

    .activity-stream-container .activity-item.activity-customer .activity-type-badge {
        background: linear-gradient(135deg, #007bff, #0056b3);
    }

    .activity-stream-container .activity-item.activity-workorder .activity-type-badge {
        background: linear-gradient(135deg, #ffc107, #e0a800);
    }

    .activity-stream-container .activity-item.activity-design .activity-type-badge {
        background: linear-gradient(135deg, #6f42c1, #5a2d91);
    }

    .activity-stream-container .activity-item.activity-proposal .activity-type-badge {
        background: linear-gradient(135deg, #dc3545, #bd2130);
    }

    .activity-stream-container .activity-item.activity-invoice .activity-type-badge {
        background: linear-gradient(135deg, #fd7e14, #e55a00);
    }

    /* Empty State */
    .activity-stream-container .activity-empty-state {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 200px;
        padding: 2rem;
    }

    .activity-stream-container .empty-state-content {
        text-align: center;
        max-width: 300px;
    }

    .activity-stream-container .empty-state-icon {
        font-size: 3rem;
        color: #dee2e6;
        margin-bottom: 1rem;
    }

    .activity-stream-container .empty-state-title {
        margin-bottom: 0.5rem;
        font-size: 1.1rem;
    }

    .activity-stream-container .empty-state-description {
        color: #6c757d;
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }

    /* Loading Overlay */
    .activity-stream-container .activity-loading-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.9);
        z-index: 10;
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Dark mode specific fixes - only override problematic hardcoded colors */
.mod-skin-dark .activity-stream-container .activity-controls {
    background: transparent; /* Let the theme handle it */
}

.mod-skin-dark .activity-stream-container .activity-item {
    background: transparent; /* Let the theme handle it */
    border-color: transparent; /* Let the theme handle it */
}

    .mod-skin-dark .activity-stream-container .activity-item.activity-failure {
        background-color: rgba(220, 53, 69, 0.1);
    }

.mod-skin-dark .activity-stream-container .activity-description {
    background: transparent; /* Let the theme handle it */
}

.mod-skin-dark .activity-stream-container .activity-avatar-placeholder {
    background: linear-gradient(135deg, #374151, #4a5568);
}

.mod-skin-dark .activity-stream-container .activity-loading-overlay {
    background: rgba(45, 55, 72, 0.9);
}

.mod-skin-dark .activity-stream-container .activity-attachment:hover,
.mod-skin-dark .activity-stream-container .activity-link:hover {
    background: rgba(99, 179, 237, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .activity-stream-container {
        padding: 0.5rem;
    }

        .activity-stream-container .header-title h2 {
            font-size: 1.1rem;
        }

        .activity-stream-container .activity-avatar,
        .activity-stream-container .activity-avatar-placeholder {
            width: 2rem;
            height: 2rem;
        }

        .activity-stream-container .activity-type-badge {
            width: 1rem;
            height: 1rem;
            font-size: 0.5rem;
        }

        .activity-stream-container .activity-item {
            padding: 0.5rem;
            margin-bottom: 0.75rem;
        }

        .activity-stream-container .activity-controls .card-body {
            padding: 0.75rem;
        }

        .activity-stream-container .activity-controls .row {
            --bs-gutter-x: 0.5rem;
        }

        .activity-stream-container .activity-controls .col-lg-2 {
            text-align: left !important;
            margin-top: 0.5rem;
        }

        .activity-stream-container .d-flex.justify-content-between {
            flex-direction: column;
            align-items: flex-start !important;
            gap: 0.5rem;
        }
}

@media (max-width: 576px) {
    .activity-stream-container .header-title h2 {
        font-size: 1rem;
    }

    .activity-stream-container .activity-controls {
        margin: 0 -0.25rem;
    }

        .activity-stream-container .activity-controls .card-body {
            padding: 0.5rem;
        }
}
