/**
 * تنسيقات نظام إدارة الأخبار المطور - نادي أدِيب
 */

/* بطاقات الأخبار */
.news-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.news-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.news-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.5;
}

.news-card-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.news-meta-item i {
    color: #9ca3af;
}

/* شارات الحالة */
.news-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

.news-status-badge.draft {
    background: #f3f4f6;
    color: #6b7280;
}

.news-status-badge.assigned {
    background: #dbeafe;
    color: #1e40af;
}

.news-status-badge.in-progress {
    background: #fef3c7;
    color: #92400e;
}

.news-status-badge.ready-for-review {
    background: #d1fae5;
    color: #065f46;
}

.news-status-badge.published {
    background: #d1fae5;
    color: #065f46;
}

.news-status-badge.archived {
    background: #f3f4f6;
    color: #6b7280;
}

/* شريط التقدم */
.news-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.news-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.news-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.news-progress-label span:first-child {
    font-weight: 500;
    color: #374151;
}

.news-progress-label span:last-child {
    color: #6b7280;
}

/* قائمة الكتّاب */
.writers-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.writer-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.writer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.writer-info {
    flex: 1;
}

.writer-name {
    font-weight: 500;
    color: #111827;
    margin: 0;
    font-size: 0.9375rem;
}

.writer-role {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0.125rem 0 0 0;
}

.writer-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.writer-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.writer-status.in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.writer-status.completed {
    background: #d1fae5;
    color: #065f46;
}

/* خيار الكاتب (في نموذج التعيين) */
.writer-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.writer-option:hover {
    border-color: #3b82f6;
    background: #f9fafb;
}

.writer-option.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.writer-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ملاحظات المراجعة */
.review-notes-box {
    padding: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    border-radius: 8px;
    margin-top: 1rem;
}

.review-notes-box .icon {
    color: #f59e0b;
    font-size: 1.25rem;
    margin-left: 0.5rem;
}

.review-notes-box .title {
    color: #92400e;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.review-notes-box .content {
    color: #92400e;
    margin: 0;
    line-height: 1.6;
}

/* تعليمات للكتّاب */
.assignment-instructions {
    padding: 1rem;
    background: #eff6ff;
    border-right: 4px solid #3b82f6;
    border-radius: 8px;
    margin-top: 1rem;
}

.assignment-instructions .icon {
    color: #3b82f6;
    margin-left: 0.5rem;
}

.assignment-instructions p {
    margin: 0;
    color: #1e40af;
    line-height: 1.6;
}

/* حالة فارغة */
.empty-news-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.empty-news-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: #9ca3af;
}

.empty-news-state h3 {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0 0 0.5rem 0;
    color: #374151;
}

.empty-news-state p {
    font-size: 0.9375rem;
    margin: 0;
    color: #6b7280;
}

/* أزرار الإجراءات */
.news-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.news-actions .btn {
    flex: 1;
}

/* معاينة الخبر */
.news-preview-modal {
    max-width: 900px;
}

.news-preview-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.news-preview-content {
    text-align: right;
    line-height: 1.8;
    color: #374151;
}

.news-preview-summary {
    font-weight: 600;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* تفاصيل الخبر */
.news-details-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.news-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
}

.news-detail-label {
    font-weight: 500;
    color: #6b7280;
}

.news-detail-value {
    color: #111827;
}

/* أنيميشن التحميل */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.news-loading {
    animation: pulse 2s ease-in-out infinite;
}

/* تنسيقات متجاوبة */
@media (max-width: 768px) {
    .news-card {
        padding: 1rem;
    }
    
    .news-card-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .news-actions {
        flex-direction: column;
    }
    
    .news-actions .btn {
        width: 100%;
    }
    
    .writer-item {
        flex-direction: column;
        align-items: start;
    }
}

/* تحسينات إضافية */
.news-tag {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 4px;
    font-size: 0.8125rem;
    margin-left: 0.375rem;
    margin-bottom: 0.375rem;
}

.news-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #eff6ff;
    color: #1e40af;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* إحصائيات سريعة */
.news-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.news-stat-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.news-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.news-stat-label {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* تنبيهات */
.news-alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.news-alert.info {
    background: #eff6ff;
    border: 1px solid #3b82f6;
    color: #1e40af;
}

.news-alert.warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
}

.news-alert.success {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.news-alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.news-alert-content {
    flex: 1;
}

.news-alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.news-alert-message {
    margin: 0;
    line-height: 1.5;
}
