/* Social Feed Frontend Styles */

.social-feed-container {
    width: 100%;
    margin: 20px 0;
}

.social-feed-items {
    display: grid;
    gap: 20px;
    margin-top: 15px;
}

/* Grid Layout */
.social-feed-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* List Layout */
.social-feed-list {
    grid-template-columns: 1fr;
}

/* Feed Item Base Styles */
.social-feed-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.social-feed-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Platform-specific colors */
.youtube-item {
    border-top: 3px solid #ff0000;
}

.twitter-item {
    border-top: 3px solid #000;
}

.github-item {
    border-top: 3px solid #333;
}

.facebook-item {
    border-top: 3px solid #1877f2;
}

.instagram-item {
    border-top: 3px solid #e4405f;
}

.linkedin-item {
    border-top: 3px solid #0a66c2;
}

/* Feed Item Header */
.feed-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.feed-item-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    word-break: break-word;
}

.platform-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    white-space: nowrap;
    color: #666;
}

/* Feed Item Content */
.feed-item-content {
    margin: 12px 0;
    color: #555;
    line-height: 1.5;
    font-size: 14px;
}

.feed-item-content p {
    margin: 0 0 8px 0;
}

/* Thumbnail Styles */
.feed-item-thumbnail {
    position: relative;
    width: 100%;
    margin: 12px 0;
    overflow: hidden;
    border-radius: 6px;
    background: #f5f5f5;
}

.feed-item-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.feed-item-thumbnail:hover img {
    transform: scale(1.05);
}

.feed-item-thumbnail a {
    position: relative;
    display: block;
}

/* Play Button for YouTube */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feed-item-thumbnail:hover .play-button {
    opacity: 1;
}

/* Stats for Twitter */
.feed-item-stats {
    display: flex;
    gap: 15px;
    margin: 12px 0;
    color: #666;
    font-size: 13px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Event type for GitHub */
.event-type {
    display: inline-block;
    background: #f1f3f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Feed Item Footer */
.feed-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #999;
}

.feed-date {
    color: #999;
    font-size: 12px;
}

.feed-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.feed-link:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Dashboard Styles */
.social-media-dashboard {
    width: 100%;
    margin: 20px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns), 1fr);
    gap: 20px;
}

.dashboard-item {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    min-height: 400px;
}

.dashboard-item h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.feed-container {
    height: 100%;
    overflow-y: auto;
}

/* Error Message */
.social-feed-error {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #fcc;
    margin: 10px 0;
}

/* Loading State */
.social-feed-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.social-feed-loading::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-feed-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .feed-item-header {
        flex-direction: column;
    }
    
    .feed-item-footer {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .feed-item-stats {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .social-feed-item {
        padding: 12px;
    }
    
    .feed-item-content {
        font-size: 13px;
    }
    
    .play-button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .social-feed-item {
        background: #1e1e1e;
        border-color: #333;
        color: #e0e0e0;
    }
    
    .feed-item-header h3 {
        color: #e0e0e0;
    }
    
    .feed-item-content {
        color: #b0b0b0;
    }
    
    .feed-item-thumbnail {
        background: #2a2a2a;
    }
    
    .event-type {
        background: #2a2a2a;
        color: #b0b0b0;
    }
    
    .feed-link {
        color: #66b3ff;
    }
    
    .platform-badge {
        background: #2a2a2a;
        color: #b0b0b0;
    }
}

/* Accessibility */
.social-feed-item:focus-within {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.feed-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .social-feed-item {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
