/**
 * Social Media Feed Styles
 */

.mk-social-feed {
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.social-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e5e9;
}

.refresh-feed-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
}

.refresh-feed-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.refresh-feed-btn:active {
    transform: translateY(1px);
}

.refresh-feed-btn.loading .refresh-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.social-posts-container {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.social-post {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-icon {
    font-size: 18px;
    line-height: 1;
}

.platform-name {
    font-weight: 600;
    font-size: 14px;
    color: #343a40;
    text-transform: capitalize;
}

.post-time {
    font-size: 12px;
    color: #6c757d;
}

.post-content {
    margin-bottom: 12px;
}

.post-image {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.post-text {
    line-height: 1.5;
    color: #495057;
}

.post-text p {
    margin: 0;
    font-size: 14px;
}

.post-engagement {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

.engagement-metric {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
}

.metric-icon {
    font-size: 14px;
}

.metric-value {
    font-weight: 500;
}

.post-actions {
    padding-top: 12px;
    border-top: 1px solid #f1f3f4;
}

.view-original-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.view-original-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
}

.external-icon {
    font-size: 10px;
}

.social-feed-loading {
    text-align: center;
    padding: 24px;
    color: #6c757d;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

/* Platform-specific styling */
.social-post[data-platform="facebook"] {
    border-left: 4px solid #1877f2;
}

.social-post[data-platform="instagram"] {
    border-left: 4px solid #E4405F;
}

.social-post[data-platform="twitter"] {
    border-left: 4px solid #1DA1F2;
}

.social-post[data-platform="youtube"] {
    border-left: 4px solid #FF0000;
}

.social-post[data-platform="linkedin"] {
    border-left: 4px solid #0A66C2;
}

.social-post[data-platform="tiktok"] {
    border-left: 4px solid #000000;
}

.social-post[data-platform="yelp"] {
    border-left: 4px solid #FF1744;
}

/* Responsive design */
@media (max-width: 768px) {
    .social-posts-container {
        grid-template-columns: 1fr;
    }
    
    .social-post {
        padding: 12px;
    }
    
    .post-engagement {
        gap: 8px;
    }
    
    .engagement-metric {
        font-size: 11px;
    }
}

/* Widget-specific styles */
.widget .mk-social-feed {
    margin: 0;
}

.widget .social-posts-container {
    grid-template-columns: 1fr;
    gap: 12px;
}

.widget .social-post {
    padding: 12px;
}

/* Shortcode title */
.social-feed-title {
    margin: 0 0 16px 0;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    color: #343a40;
}