/**
 * SSP X Feed Component Styles
 * 
 * Design system styles for X (Twitter) feed components.
 * Used across all sports for displaying X/Twitter feeds in team cards.
 * 
 * Version: 1.0.0
 * Date: 2026-01-30
 */

/* ============================================
   X Feed Container
   ============================================ */

.ssp-x-feed-container {
    padding: 1rem;
    background: var(--ssp-surface, #ffffff);
    border-radius: 8px;
}

.ssp-x-feed-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--ssp-text-secondary, #6c757d);
}

.ssp-x-feed-error {
    padding: 2rem;
    text-align: center;
    color: var(--ssp-error, #dc3545);
    background: var(--ssp-error-bg, #f8d7da);
    border-radius: 8px;
    margin: 1rem 0;
}

.ssp-x-feed-empty {
    padding: 2rem;
    text-align: center;
    color: var(--ssp-text-secondary, #6c757d);
    font-style: italic;
}

/* ============================================
   Tweet Card Styles
   ============================================ */

.ssp-x-tweet-card {
    background: var(--ssp-surface, #ffffff);
    border: 1px solid var(--ssp-border, #e1e8ed);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.ssp-x-tweet-card:hover {
    background: var(--ssp-surface-hover, #f7f9fa);
    border-color: var(--ssp-border-hover, #ccd6dd);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ssp-x-tweet-card:last-child {
    margin-bottom: 0;
}

/* ============================================
   Tweet Header
   ============================================ */

.ssp-x-tweet-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.ssp-x-tweet-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
    background: var(--ssp-border, #e1e8ed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--ssp-text-secondary, #6c757d);
}

.ssp-x-tweet-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.ssp-x-tweet-author {
    flex: 1;
    min-width: 0;
}

.ssp-x-tweet-author-name {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--ssp-text-primary, #14171a);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.125rem;
}

.ssp-x-tweet-verified-badge {
    color: var(--ssp-verified, #1d9bf0);
    font-size: 1rem;
}

.ssp-x-tweet-handle {
    font-size: 0.9375rem;
    color: var(--ssp-text-secondary, #536471);
}

.ssp-x-tweet-timestamp {
    font-size: 0.9375rem;
    color: var(--ssp-text-secondary, #536471);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============================================
   Tweet Content
   ============================================ */

.ssp-x-tweet-content {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--ssp-text-primary, #14171a);
    word-wrap: break-word;
    white-space: pre-wrap;
    margin-bottom: 0.75rem;
}

.ssp-x-tweet-content a {
    color: var(--ssp-link, #1d9bf0);
    text-decoration: none;
}

.ssp-x-tweet-content a:hover {
    text-decoration: underline;
}

/* ============================================
   Tweet Media
   ============================================ */

.ssp-x-tweet-media {
    margin-bottom: 0.75rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--ssp-border, #e1e8ed);
}

.ssp-x-tweet-media img {
    width: 100%;
    height: auto;
    display: block;
}

.ssp-x-tweet-media video {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Tweet Footer / Engagement
   ============================================ */

.ssp-x-tweet-footer {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8125rem;
    color: var(--ssp-text-secondary, #536471);
}

.ssp-x-tweet-stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.ssp-x-tweet-stat i {
    font-size: 1rem;
}

.ssp-x-tweet-link {
    margin-left: auto;
}

.ssp-x-tweet-link a {
    color: var(--ssp-link, #1d9bf0);
    text-decoration: none;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.ssp-x-tweet-link a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .ssp-x-tweet-card {
        padding: 0.875rem;
    }
    
    .ssp-x-tweet-avatar {
        width: 40px;
        height: 40px;
        margin-right: 0.625rem;
    }
    
    .ssp-x-tweet-footer {
        gap: 1rem;
        flex-wrap: wrap;
    }
}

/* ============================================
   Dark Mode Support (optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .ssp-x-feed-container,
    .ssp-x-tweet-card {
        background: var(--ssp-surface-dark, #15202b);
        border-color: var(--ssp-border-dark, #38444d);
        color: var(--ssp-text-primary-dark, #e7e9ea);
    }
    
    .ssp-x-tweet-card:hover {
        background: var(--ssp-surface-hover-dark, #1c2938);
        border-color: var(--ssp-border-hover-dark, #51606f);
    }
    
    .ssp-x-tweet-author-name {
        color: var(--ssp-text-primary-dark, #e7e9ea);
    }
    
    .ssp-x-tweet-content {
        color: var(--ssp-text-primary-dark, #e7e9ea);
    }
    
    .ssp-x-tweet-handle,
    .ssp-x-tweet-timestamp,
    .ssp-x-tweet-footer {
        color: var(--ssp-text-secondary-dark, #8b98a5);
    }
}

/* ============================================
   Loading Spinner
   ============================================ */

.ssp-x-feed-spinner {
    border: 3px solid var(--ssp-border, #e1e8ed);
    border-top: 3px solid var(--ssp-primary, #1d9bf0);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: ssp-x-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes ssp-x-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
