/* RSS News Fetcher Styles */

.rss-news-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.rss-news-widget .widget-title {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.rss-news-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.rss-news-item:last-child {
    border-bottom: none;
}

.rss-news-item:hover {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin: 0 -15px;
}

.rss-news-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 6px;
}

.rss-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.rss-news-content {
    flex: 1;
    min-width: 0;
}

.rss-news-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.rss-news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.rss-news-title a:hover {
    color: #00a32a;
}

.rss-news-excerpt {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-bottom: 8px;
}

.rss-news-source {
    font-size: 11px;
    color: #999;
    font-style: italic;
    margin-bottom: 5px;
}

.rss-news-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rss-news-date {
    color: #666;
}

.rss-news-original {
    color: #00a32a;
    text-decoration: none;
    font-weight: 500;
}

.rss-news-original:hover {
    text-decoration: underline;
}

/* Admin Styles */
.rss-news-fetcher-admin .postbox {
    margin-bottom: 20px;
}

.rss-news-post-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #ddd;
    margin: 8px 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rss-news-post-item.rss-news-post {
    border-left: 4px solid #00a32a;
}

.rss-news-post-actions {
    display: flex;
    gap: 8px;
}

.rss-source {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.rss-source-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.rss-source-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.rss-source-item.working {
    border-left: 4px solid #00a32a;
}

.rss-source-item.error {
    border-left: 4px solid #d63638;
}

.rss-source-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* RSS Source Badges */
.rss-source-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #00a32a;
    color: white;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Statistics Cards */
.rss-news-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rss-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-left: 4px solid #00a32a;
}

.rss-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #00a32a;
    margin-bottom: 5px;
}

.rss-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* RSS Feed Status Indicators */
.rss-status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.rss-status-indicator.working {
    background: #00a32a;
}

.rss-status-indicator.error {
    background: #d63638;
}

.rss-status-indicator.pending {
    background: #ffb900;
}

/* Loading States */
.rss-news-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.rss-news-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #00a32a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Success/Error Messages */
.rss-news-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.rss-news-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rss-news-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* RSS News Post Meta Box */
.rss-news-source-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #00a32a;
}

.rss-news-source-meta label {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 5px;
}

.rss-news-source-meta input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.rss-news-source-meta input:read-only {
    background: #f8f9fa;
    color: #666;
}

/* RSS News Post Badge */
.rss-news-post-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #00a32a;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    margin-left: 10px;
}

/* Hover Effects */
.rss-news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rss-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Animation for new posts */
@keyframes slideInFromTop {
    0% {
        transform: translateY(-20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.rss-news-item.new-post {
    animation: slideInFromTop 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rss-news-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .rss-news-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .rss-news-stats {
        grid-template-columns: 1fr;
    }
    
    .rss-source-status {
        grid-template-columns: 1fr;
    }
    
    .rss-news-post-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .rss-news-post-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .rss-news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* RSS Feed Categories */
.rss-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.rss-category-tag {
    padding: 6px 12px;
    background: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    font-size: 12px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
}

.rss-category-tag:hover,
.rss-category-tag.active {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

/* RSS Source Management */
.rss-source-management {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.rss-source-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.rss-source-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background: #fff;
    transition: all 0.3s ease;
}

.rss-source-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rss-source-card.enabled {
    border-left: 4px solid #00a32a;
}

.rss-source-card.disabled {
    border-left: 4px solid #d63638;
    opacity: 0.6;
}

.rss-source-card h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.rss-source-card .source-url {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    margin-bottom: 10px;
}

.rss-source-card .source-category {
    font-size: 11px;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
    margin-bottom: 10px;
}

.rss-source-card .source-status {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.rss-source-card .source-status.enabled {
    color: #00a32a;
}

.rss-source-card .source-status.disabled {
    color: #d63638;
}
