/* AFSX Feed Styles - X Timeline Styling */

.afsx-timeline {
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}

.afsx-tweet {
    border-bottom: 1px solid #e1e8ed;
    padding: 12px 16px;
    transition: background-color 0.2s ease;
}

.afsx-tweet:last-child {
    border-bottom: none;
}

.afsx-tweet:hover {
    background-color: #f8f9fa;
}

.afsx-tweet-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.afsx-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: #e1e8ed;
}

.afsx-user-info {
    flex: 1;
    min-width: 0;
}

.afsx-display-name {
    font-weight: 700;
    color: #14171a;
    font-size: 15px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.afsx-username {
    color: #657786;
    font-size: 15px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.afsx-date {
    color: #657786;
    font-size: 13px;
    line-height: 16px;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.afsx-tweet-content {
    margin-left: 60px;
}

.afsx-tweet-text {
    font-size: 15px;
    line-height: 20px;
    color: #14171a;
    word-wrap: break-word;
    margin-bottom: 12px;
}

.afsx-tweet-text a {
    color: #1da1f2;
    text-decoration: none;
}

.afsx-tweet-text a:hover {
    text-decoration: underline;
}

.afsx-tweet-metrics {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    color: #657786;
    font-size: 13px;
}

.afsx-metric {
    display: flex;
    align-items: center;
    gap: 4px;
}

.afsx-metric-count {
    font-weight: 700;
    color: #14171a;
}

.afsx-error {
    color: #e0245e;
    background-color: #ffeef0;
    border: 1px solid #ffb3ba;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 640px) {
    .afsx-timeline {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .afsx-tweet {
        padding: 10px 12px;
    }
    
    .afsx-tweet-header {
        gap: 10px;
    }
    
    .afsx-avatar {
        width: 40px;
        height: 40px;
    }
    
    .afsx-tweet-content {
        margin-left: 50px;
    }
    
    .afsx-display-name,
    .afsx-username,
    .afsx-tweet-text {
        font-size: 14px;
    }
    
    .afsx-date,
    .afsx-tweet-metrics {
        font-size: 12px;
    }
    
    .afsx-tweet-metrics {
        gap: 15px;
    }
}

/* Dark mode support - only enabled with .afsx-dark-theme class on parent container */
.afsx-dark-theme .afsx-timeline {
    background: #15202b;
    border-color: #38444d;
}

.afsx-dark-theme .afsx-tweet {
    border-color: #38444d;
}

.afsx-dark-theme .afsx-tweet:hover {
    background-color: #1e2732;
}

.afsx-dark-theme .afsx-display-name,
.afsx-dark-theme .afsx-tweet-text,
.afsx-dark-theme .afsx-metric-count {
    color: #ffffff;
}

.afsx-dark-theme .afsx-username,
.afsx-dark-theme .afsx-date,
.afsx-dark-theme .afsx-tweet-metrics {
    color: #8899a6;
}

.afsx-dark-theme .afsx-avatar {
    background: #38444d;
}

.afsx-dark-theme .afsx-error {
    background-color: #2d1b20;
    border-color: #8b3a3a;
    color: #ff6b9d;
}

/* Loading and empty states */
.afsx-loading {
    text-align: center;
    padding: 40px 20px;
    color: #657786;
    font-size: 14px;
}

.afsx-empty {
    text-align: center;
    padding: 40px 20px;
    color: #657786;
    font-size: 14px;
}

/* Animation for new content */
@keyframes afsx-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.afsx-tweet {
    animation: afsx-fade-in 0.3s ease-out;
}