/* =========================================
   Social Media Feed Panel
   ========================================= */

.feed-panel {
    width: 0;
    overflow: hidden;
    background-color: #f8fafc;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 15;
}

.feed-panel.open {
    width: 420px;
}

.feed-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.feed-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feed-panel-title h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.close-feed-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
    border-radius: 6px;
    transition: background 0.2s;
}

.close-feed-btn:hover {
    background: var(--hover-bg);
}

.close-feed-btn i {
    width: 18px;
    height: 18px;
}

.feed-district-label {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.feed-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.feed-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border-color);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: feedSpin 0.8s linear infinite;
}

@keyframes feedSpin {
    to { transform: rotate(360deg); }
}

/* Feed Card */
.feed-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 14px;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: default;
}

.feed-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.feed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.feed-card-source {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.feed-card-source-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.feed-card-time {
    font-size: 11px;
    color: #94a3b8;
}

.feed-card-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.feed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.feed-badge.positive { background: #ecfdf5; color: #059669; }
.feed-badge.negative { background: #fef2f2; color: #dc2626; }
.feed-badge.neutral  { background: #f0f9ff; color: #0369a1; }

.feed-checkbox {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--blue-accent);
    cursor: pointer;
}

.feed-bulk-action {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}

#feedSelectedCount {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.feed-analyze-bulk-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3b82f6, #4f46e5);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.feed-analyze-bulk-btn:hover {
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.feed-analyze-bulk-btn i {
    width: 16px;
    height: 16px;
}

.feed-card-link {
    margin-left: auto;
    font-size: 11px;
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 500;
}

.feed-card-link:hover {
    text-decoration: underline;
}

.feed-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}
