/**
 * Authors Manager - Frontend Styles
 * Version: 3.5.5
 * تصميم احترافي بصور دائرية للمؤلفين مع خلفية داكنة
 */

/* ===== Container و Grid System ===== */
.authors-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.authors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* الافتراضي للموبايل */
    gap: 25px;
    margin-bottom: 30px;
}

/* ===== بطاقة المؤلف - خلفية داكنة ===== */
.author-card {
    background: #2c2c2c;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    height: 100%;
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(188, 132, 86, 0.25);
}

.author-card-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
}

.author-card-link:hover,
.author-card-link:focus {
    text-decoration: none !important;
    outline: none;
}

/* ===== الصورة الدائرية ===== */
.author-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: visible;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-thumbnail img.author-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #f5f5f5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* أيقونة بدون صورة - دائرية */
.author-no-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%);
    color: #999;
    border-radius: 50%;
    border: 4px solid #3a3a3a;
}

/* ===== المحتوى - خلفية داكنة ===== */
.author-content {
    padding: 15px 15px 20px 15px;
    text-align: center;
    background: #2c2c2c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 90px; /* ارتفاع أدنى لضمان المحاذاة */
}

.author-name {
    margin: 0 0 8px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #f5f5f5 !important;
    transition: color 0.3s ease;
    text-decoration: none !important;
    min-height: 2.6em; /* ارتفاع مرن يعتمد على حجم الخط (سطرين) */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

.author-card:hover .author-name {
    color: #3d7efe !important;
    text-decoration: none !important;
}

.author-card-link:hover .author-name,
.author-card-link:focus .author-name {
    text-decoration: none !important;
}

.author-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    width: 100%;
    flex-shrink: 0; /* منع التقلص */
    margin-top: auto; /* دفع عدد الكتب للأسفل */
}

.author-book-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    color: #E1B160;
    font-size: 13px;
    text-decoration: none !important;
}

.author-book-count svg {
    color: #3d7efe;
    flex-shrink: 0;
}

/* ===== Pagination ===== */
.authors-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 2px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    direction: rtl;
}

.authors-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.authors-pagination .page-numbers:hover {
    background: #3d7efe;
    border-color: #3d7efe;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(61, 126, 254, 0.3);
}

.authors-pagination .page-numbers.current {
    background: #3d7efe;
    border-color: #3d7efe;
    color: #fff;
    box-shadow: 0 2px 6px rgba(61, 126, 254, 0.4);
}

.authors-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    cursor: default;
}

.authors-pagination .page-numbers.dots:hover {
    background: transparent;
    color: #ccc;
    transform: none;
    box-shadow: none;
}

/* ===== رسالة عدم وجود مؤلفين ===== */
.no-authors-found {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: #999;
    background: #f9f9f9;
    border-radius: 12px;
}

/* ===== Responsive Design ===== */

/* أصغر شاشة - 2 مؤلفين */
@media (max-width: 576px) {
    .authors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .author-content {
        padding: 10px 8px 15px 8px;
        min-height: 75px; /* ارتفاع أقل للشاشات الصغيرة */
    }

    .author-name {
        font-size: 12px !important;
        min-height: 2.6em; /* يبقى مرناً مع حجم الخط */
    }

    .author-book-count {
        font-size: 11px;
    }

    /* Pagination Mobile */
    .authors-pagination {
        gap: 6px;
        padding: 12px 8px;
        flex-wrap: wrap;
    }

    .authors-pagination .page-numbers {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* شاشة صغيرة - 3 مؤلفين */
@media (min-width: 577px) and (max-width: 768px) {
    .authors-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .author-name {
        font-size: 14px !important;
    }
}

/* شاشة متوسطة - 4 مؤلفين */
@media (min-width: 769px) and (max-width: 992px) {
    .authors-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 22px;
    }
}

/* شاشة كبيرة - 6 مؤلفين */
@media (min-width: 993px) {
    .authors-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 25px;
    }
}

@media (min-width: 1400px) {
    .authors-container {
        max-width: 1400px;
    }
}

/* ===== تحسينات الطباعة ===== */
@media print {
    .authors-pagination {
        display: none;
    }

    .author-card {
        break-inside: avoid;
    }
}

/* ===== صفحة إدارة أوصاف المؤلفين (Admin) ===== */
.authors-descriptions-page {
    margin: 20px 0;
    padding: 0 20px;
    direction: rtl;
    text-align: right;
}

/* إحصائيات */
.am-descriptions-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0 30px 0;
    flex-wrap: wrap;
    direction: rtl;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px 20px;
    flex: 1;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2271b1, #135e96);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(34, 113, 177, 0.15);
    border-color: #2271b1;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #2271b1;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    display: block;
    color: #646970;
    font-size: 14px;
    font-weight: 500;
}

/* Stat Card Modifiers */
.stat-card-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}
.stat-card-success::before {
    background: linear-gradient(90deg, #10b981, #059669);
}
.stat-card-success .stat-number {
    color: #059669;
}
.stat-card-success:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
    border-color: #10b981;
}

.stat-card-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}
.stat-card-warning::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}
.stat-card-warning .stat-number {
    color: #d97706;
}
.stat-card-warning:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
}

.stat-card-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
}
.stat-card-danger::before {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
}
.stat-card-danger .stat-number {
    color: #b91c1c;
}
.stat-card-danger:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
}

.stat-card-info {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
}
.stat-card-info::before {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}
.stat-card-info .stat-number {
    color: #1d4ed8;
}
.stat-card-info:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    border-color: #3b82f6;
}

/* Storage Widget */
.am-storage-widget {
    background: linear-gradient(145deg, #ffffff, #f9f9f9);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    max-width: 600px;
    margin-top: 10px;
}

.storage-icon {
    width: 60px;
    height: 60px;
    background: #e0e7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #4f46e5;
    flex-shrink: 0;
}

.storage-info {
    flex: 1;
}

.storage-size {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    display: block;
    line-height: 1.2;
}

.storage-label {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

.storage-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* الفلاتر */
.am-descriptions-filters {
    margin: 20px 0;
    display: flex;
    gap: 12px;
    direction: rtl;
}

.am-descriptions-filters .button {
    margin-left: 0;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.am-descriptions-filters .button-primary {
    background: linear-gradient(135deg, #2271b1, #135e96);
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.am-descriptions-filters .button-primary:hover {
    background: linear-gradient(135deg, #135e96, #0a4a7a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

/* اسم المؤلف */
.author-name-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-name-text {
    color: #1d2327;
    font-size: 15px;
    font-weight: 600;
}

.view-author-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #2271b1, #135e96);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

.view-author-link:hover {
    background: linear-gradient(135deg, #135e96, #0a4a7a);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
    color: #fff;
}

.view-author-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* عدد الكتب */
.book-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #1e40af;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.1);
}

/* حالة الوصف */
.description-preview {
    max-width: 100%;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.status-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.has-description .description-text {
    color: #065f46;
    font-size: 13px;
    line-height: 1.6;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    border-right: 3px solid #10b981;
}

.no-description-wrapper {
    display: flex;
    flex-direction: column;
}

.preview-description {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 12px;
    border-right: 3px solid #3b82f6;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.1);
}

.preview-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #1e40af;
    font-size: 13px;
    font-weight: 600;
}

.preview-icon {
    font-size: 16px;
}

.preview-text {
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.6;
    font-style: italic;
}

/* البيانات الناقصة */
.missing-data-info {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    padding: 12px;
    border-right: 3px solid #f59e0b;
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
}

.missing-data-info strong {
    display: block;
    color: #92400e;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.missing-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.missing-list li {
    font-size: 12px;
    line-height: 1.8;
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

/* العنصر الناقص (❌) */
.missing-list li:first-line {
    color: #92400e;
}

/* علامات مختلفة للحالات */
.missing-list li {
    color: #92400e;
    font-weight: 500;
}

/* التحسين البصري للرسائل الطويلة */
.missing-list li {
    word-break: break-word;
}

/* أزرار الإجراءات */
.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.action-buttons .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.action-buttons .button-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.action-buttons .button-primary:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* الإجراءات الجماعية */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-right: 4px solid #3b82f6;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.bulk-actions .button-primary {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.bulk-actions .button-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.bulk-count {
    margin-right: 15px;
    color: #1e3a8a;
    font-size: 14px;
    font-weight: 500;
}

#selected-count {
    font-weight: 700;
    color: #3b82f6;
    font-size: 18px;
}

/* تحسين الجدول */
.authors-descriptions-page table.widefat {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.authors-descriptions-page table.widefat thead {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
}

.authors-descriptions-page table.widefat thead th {
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    padding: 15px 12px;
    vertical-align: middle;
}

.authors-descriptions-page table.widefat thead th.check-column {
    padding: 15px 12px;
    vertical-align: middle;
    text-align: center;
}

.authors-descriptions-page table.widefat thead th.check-column input[type="checkbox"],
.authors-descriptions-page table.widefat tbody th.check-column input[type="checkbox"] {
    margin: 0;
    vertical-align: middle;
}

.authors-descriptions-page table.widefat tbody tr {
    transition: background-color 0.2s ease;
}

.authors-descriptions-page table.widefat tbody tr:hover {
    background-color: #f9fafb;
}

.authors-descriptions-page table.widefat tbody th,
.authors-descriptions-page table.widefat tbody td {
    padding: 15px 12px;
    vertical-align: middle;
}

.authors-descriptions-page table.widefat tbody th.check-column {
    padding: 15px 12px;
    vertical-align: middle;
    text-align: center;
}

/* رسالة الحالة الفارغة */
.am-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.1);
    margin: 40px auto;
    border: 2px solid #86efac;
    direction: rtl;
    text-align: center;
    max-width: 100%;
}

.empty-state-content {
    text-align: center;
    max-width: 500px;
}

.empty-state-icon-wrapper {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    margin: 0 auto;
}

.empty-state-title {
    color: #065f46;
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
}

.empty-state-message {
    color: #047857;
    font-size: 17px;
    line-height: 1.6;
    margin: 0;
    font-weight: 500;
}

/* تحسين عرض البيانات الناقصة */
.missing-list li {
    font-size: 12px;
    line-height: 1.8;
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    word-break: break-word;
}

/* ترقيم الصفحات */
.am-pagination-wrapper {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.am-pagination-wrapper .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.am-pagination-wrapper .page-numbers li {
    display: inline-block;
}

.am-pagination-wrapper .page-numbers a,
.am-pagination-wrapper .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid #e5e7eb;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.am-pagination-wrapper .page-numbers a:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.am-pagination-wrapper .page-numbers .current {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.am-pagination-wrapper .page-numbers .dots {
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: default;
    color: #9ca3af;
}

.am-pagination-wrapper .page-numbers .dots:hover {
    background: transparent;
    transform: none;
}

/* Responsive */
@media (max-width: 782px) {
    .am-descriptions-stats {
        flex-direction: column;
    }
    
    .stat-card {
        min-width: 100%;
    }
    
    .author-name-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .action-buttons .button {
        width: 100%;
        justify-content: center;
    }
    
    .am-pagination-wrapper .page-numbers a,
    .am-pagination-wrapper .page-numbers span {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 13px;
    }
}

/* ===== أدوات البحث والفلترة ===== */
.authors-filters {
    background: #2c2c2c !important;
    border-radius: 12px;
    padding: 20px;
    margin-top: 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: none;
}

.authors-filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    align-items: stretch;
}

.filter-group {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
}

.filter-group:first-child {
    flex: 2 1 auto;
}

.filter-group:last-child {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.filter-group label {
    display: none;
}

.filter-input,
.filter-select {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 1px solid #444;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #3a3a3a !important;
    color: #ffffff !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.5;
    box-sizing: border-box;
    font-family: inherit;
    vertical-align: middle;
}

.filter-input::placeholder {
    color: #999 !important;
    font-size: 14px;
    opacity: 1;
}

.filter-input:hover,
.filter-select:hover {
    border-color: #3d7efe;
    background: #454545 !important;
    color: #ffffff !important;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3d7efe;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(188, 132, 86, 0.2);
    background: #454545 !important;
    color: #ffffff !important;
}

.filter-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #3a3a3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat left 14px center !important;
    background-size: 14px !important;
    padding-right: 16px;
    padding-left: 38px;
    direction: rtl;
}

.filter-select:hover {
    background: #454545 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat left 14px center !important;
    background-size: 14px !important;
}

.filter-select:focus {
    background: #454545 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M8 11L3 6h10z'/%3E%3C/svg%3E") no-repeat left 14px center !important;
    background-size: 14px !important;
}

.filter-select option {
    background: #3a3a3a;
    color: #ffffff;
    padding: 10px;
    font-weight: 500;
}

.filter-submit,
.filter-reset {
    height: 48px;
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 110px;
    box-sizing: border-box;
    font-family: inherit;
    flex-shrink: 0;
    line-height: 48px;
}

.filter-submit {
    background: #3d7efe !important;
    color: #ffffff;
}

.filter-submit:hover {
    background: #E1B160 !important;
    transform: translateY(-1px);
}

.filter-submit:active {
    transform: translateY(0);
}

.filter-reset {
    background: #444 !important;
    color: #ffffff;
    border: 1px solid #555;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
}

.filter-reset::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 6px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 4v6h-6'/%3E%3Cpath d='M1 20v-6h6'/%3E%3Cpath d='M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.4s ease;
    vertical-align: middle;
}

.filter-reset:hover::before {
    transform: rotate(-180deg);
}

.filter-reset:hover {
    background: #555 !important;
    border-color: #888;
    color: #ffffff;
}

.filter-reset:active {
    transform: scale(0.98);
}

.filter-reset:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.filter-reset:disabled:hover {
    background: #444 !important;
    border-color: #555;
    transform: none;
}

/* تحسينات الوصولية */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* تحسينات تأثيرات الانتقال للبطاقات */

.author-card-link {
    position: relative;
    overflow: hidden;
}

.author-card-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(188, 132, 86, 0.1), rgba(188, 132, 86, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.author-card-link:hover::before,
.author-card-link:focus::before {
    opacity: 1;
}

.author-card-link:focus {
    outline: 3px solid #3d7efe;
    outline-offset: 2px;
}

.author-thumbnail img.author-image {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.author-card:hover .author-thumbnail img.author-image {
    transform: translate(-50%, -50%) scale(1.05);
}

/* تجاوب الفلاتر */
@media (max-width: 992px) {
    .filter-row {
        flex-wrap: wrap;
    }
    
    .filter-group:first-child {
        flex: 1 1 100%;
        margin-bottom: 0;
    }
    
    .filter-group:not(:first-child):not(:last-child) {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .authors-filters {
        padding: 15px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .filter-group,
    .filter-group:first-child {
        flex: 1 1 auto;
        width: 100%;
    }
    
    .filter-group:last-child {
        flex-direction: row;
        width: 100%;
        gap: 8px;
    }
    
    .filter-input,
    .filter-select,
    .filter-submit,
    .filter-reset {
        height: 44px;
        font-size: 14px;
    }
    
    .filter-submit,
    .filter-reset {
        flex: 1 1 50%;
        min-width: 0;
    }
}

/* إزالة دعم الوضع الداكن - الموقع لا يدعمه */

/* تحسينات للطباعة */
@media print {
    .authors-filters {
        display: none;
    }
}