/* 
 * Activity Feed Scoped Styles
 * Used in the Live Scam Activity section
 */

.live-activity-section {
    background-color: #f8f9fa; /* neutral background */
}

.feed-stats-bar {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.feed-stat-item {
    text-align: center;
    flex: 1;
}

.feed-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0052cc;
    line-height: 1.2;
}

.feed-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feed-stat-divider {
    width: 1px;
    background-color: #e9ecef;
    margin: 0 16px;
}

/* Feed Wrapper & Overlay */
.feed-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.feed-wrapper::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 40px;
    width: 100%;
    background: linear-gradient(transparent, #f8f9fa);
    pointer-events: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.activity-feed-container {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 30px;
    padding-right: 12px; /* scrollbar margin */
}

/* Custom Scrollbar for the feed */
.activity-feed-container::-webkit-scrollbar {
    width: 6px;
}
.activity-feed-container::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}
.activity-feed-container::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 4px;
}
.activity-feed-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Group Headers */
.feed-group-header {
    font-size: 0.95rem;
    color: #6c757d;
    font-weight: 600;
    margin: 24px 0 12px;
    display: flex;
    align-items: center;
}
.feed-group-header::before,
.feed-group-header::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e9ecef;
}
.feed-group-header::before {
    margin-right: 16px;
}
.feed-group-header::after {
    margin-left: 16px;
}

.critical-header {
    background: rgba(239, 68, 68, 0.04);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 16px 0;
    color: #b91c1c;
}
.critical-header::before, .critical-header::after {
    display: none;
}
.critical-pulse-icon {
    animation: pulse-icon 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

/* Scam Card */
.scam-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #f1f3f5;
}

.scam-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

/* Vertical Risk Indicator Bar */
.scam-card-risk-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background-color: #dee2e6;
}
.scam-card-risk-bar.severe { background-color: #e11d48; }
.scam-card-risk-bar.high { background-color: #f97316; }
.scam-card-risk-bar.medium { background-color: #eab308; }
.scam-card-risk-bar.low { background-color: #22c55e; }

/* Left Body: Icon & Info */
.scam-card-left {
    display: flex;
    align-items: center;
    flex: 1;
    padding-left: 10px;
}

.scam-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background-color: #e0e7ff;
    color: #4f46e5;
    margin-right: 16px;
    flex-shrink: 0;
}

.scam-card-icon.paybill { background-color: #e0f2fe; color: #0284c7; }
.scam-card-icon.phone { background-color: #ede9fe; color: #7c3aed; }
.scam-card-icon.website { background-color: #ffedd5; color: #ea580c; }
.scam-card-icon.social { background-color: #f3f4f6; color: #4b5563; }

.scam-card-info {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent long domains from bleeding */
}

.scam-card-identifier {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    line-height: 1.1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s;
    cursor: copy;
}
.scam-card-identifier:hover {
    color: #0284c7;
}

/* Optional hover detail expansion */
.scam-card-hover-details {
    display: none;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px dashed #cbd5e1;
}
.scam-card:hover .scam-card-hover-details {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

/* Badges area below identifier */
.scam-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.scam-card-type {
    background-color: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.scam-card-risk-badge {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.scam-card-risk-badge i { margin-right: 4px; font-size: 0.75rem; }
.scam-card-risk-badge.severe { color: #e11d48; border-color: #ffe4e6; background-color: #fff1f2; }
.scam-card-risk-badge.high { color: #ea580c; border-color: #ffedd5; background-color: #fff7ed; }
.scam-card-risk-badge.medium { color: #ca8a04; border-color: #fef08a; background-color: #fefce8; }

.scam-card-trend {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
}
.scam-card-trend i.trend-up { color: #10b981; }
.scam-card-trend i.trend-down { color: #ef4444; }
.scam-card-trend i.trend-stable { color: #94a3b8; }

/* Right Body: Timestamp, Reports, Actions */
.scam-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.scam-card-time {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.scam-card-actions {
    display: flex;
    gap: 8px;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.scam-card:hover .scam-card-actions {
    opacity: 1;
}

.btn-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #ced4da;
    background-color: #fff;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-card-action:hover {
    background-color: #f8f9fa;
    color: #111827;
}

.btn-card-action.primary {
    color: #0284c7;
    border-color: #e0f2fe;
    background-color: #f0f9ff;
}
.btn-card-action.primary:hover {
    background-color: #e0f2fe;
}

.btn-card-action.danger {
    color: #e11d48;
    border-color: #ffe4e6;
    background-color: #fff1f2;
}
.btn-card-action.danger:hover {
    background-color: #ffe4e6;
}

/* Trend Strip */
.trending-strip-wrap {
    background-color: #1e293b;
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: stretch;
    height: 40px;
    overflow: hidden;
    margin-bottom: 24px;
}

.trending-strip-label {
    background-color: #ea580c;
    color: #fff;
    font-weight: 700;
    padding: 0 16px;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.trending-strip-label i {
    margin-right: 6px;
}

.trending-strip-marquee {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.trending-strip-track {
    display: flex;
    white-space: nowrap;
    animation: scroll-left-strip 30s linear infinite;
    gap: 32px;
    align-items: center;
}

.trending-strip-track:hover {
    animation-play-state: paused;
}

.strip-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    gap: 6px;
    color: #cbd5e1;
}

.strip-item strong {
    color: #e2e8f0;
    font-weight: 600;
}

.strip-item .strip-count {
    background-color: #334155;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
}

.strip-sep {
    color: #475569;
}

@keyframes scroll-left-strip {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Empty State */
.feed-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    border: 1px dashed #ced4da;
    color: #6c757d;
}

.feed-empty-state i {
    font-size: 2.5rem;
    color: #adb5bd;
    margin-bottom: 12px;
}

.feed-empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
}

/* Animations */
.scam-card.item-enter {
    animation: slideInDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
               highlightFade 2.5s ease-out forwards;
}

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

@keyframes highlightFade {
    0% { background-color: rgba(255, 230, 150, 0.6); }
    100% { background-color: #fff; } /* returns to normal card background */
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Mobile Breakpoints */
@media (max-width: 768px) {
    .scam-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .scam-card-right {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #f1f3f5;
        padding-top: 12px;
    }
    
    .feed-stats-bar {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .feed-stat-divider {
        display: none;
    }
    
    .scam-card-actions {
        opacity: 1; /* Always visible on mobile */
        margin-top: 8px;
    }
    .scam-card-hover-details {
        display: block; /* Always visible on mobile instead of requiring hover */
        background: transparent;
        padding: 0;
        border: none;
        margin-top: 4px;
    }
    .scam-card-identifier {
        white-space: normal;
        word-break: break-all;
    }
    .feed-stat-item {
        flex: 1 1 45%;
    }
}
