/* public/front/assets/css/critics.css */

/* ============ عام ============ */
.critics-table-container {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #374868;
    border-bottom: 1px solid #e9ecef;
}

.table-header h3 {
    margin: 0;
    color: #fff;
    font-weight: 600;
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    border-color: #374868;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 247, 0.25);
    outline: none;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

/* ============ الجدول ============ */
.critics-table-container table {
    margin-bottom: 0;
}

.critics-table-container thead th {
    background: #f8f9fa;
    border-top: 0;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    vertical-align: middle;
    padding: 15px;
}

.critics-table-container tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #eee;
}

.critics-table-container tbody tr:hover {
    background-color: #f8fafc;
}

.sortable {
    cursor: pointer;
    transition: color 0.3s;
}

.sortable:hover {
    color: #374868 !important;
}

.sort-icon {
    margin-left: 5px;
    display: inline-block;
    width: 20px;
}

/* ============ معلومات الناقد ============ */
.critic-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.critic-dates {
    font-size: 13px;
    color: #6c757d;
}

/* ============ تصنيفات الطبقات ============ */
.critic-class {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 80px;
}

.class-early {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.class-middle {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.class-late {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.class-unknown {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* ============ قائمة الكتب ============ */
.books-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 100px;
    overflow-y: auto;
}

.books-list li {
    padding: 3px 0;
    font-size: 13px;
    color: #495057;
    position: relative;
    padding-right: 15px;
}

.books-list li:before {
    content: "•";
    position: absolute;
    right: 0;
    color: #374868;
}

.books-list li.text-muted:before {
    content: "+";
    color: #6c757d;
}

/* ============ عدد الأقوال ============ */
.quotes-count {
    font-weight: 600;
    color: #374868;
    font-size: 16px;
    text-align: center;
}

/* ============ أزرار الإجراءات ============ */
.actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 70px;
}

.action-view {
    background-color: #374868;
    color: white;
    border: 1px solid #374868;
}

.action-view:hover {
    background-color: #374868;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 108, 247, 0.3);
}

.action-view i {
    margin-left: 5px;
    font-size: 11px;
}

/* ============ الترقيم ============ */
.pagination-area {
    padding: 20px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.pagination {
    margin: 0;
}

.page-link {
    border: 1px solid #dee2e6;
    color: #374868;
    margin: 0 3px;
    border-radius: 4px !important;
    min-width: 40px;
    text-align: center;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #374868;
}

.page-item.active .page-link {
    background-color: #374868;
    border-color: #374868;
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* ============ صفحة تفاصيل الناقد ============ */
.critic-details-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.critic-main-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 2rem;
}

.critic-category {
    margin-bottom: 20px;
}

.critic-category .badge {
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 20px;
}

.critic-stats {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 100px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #374868;
    line-height: 1;
}

.stat-label {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
}

.critic-dates h4,
.critic-layer-info h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.critic-dates p,
.critic-layer-info p {
    color: #495057;
    line-height: 1.6;
}

.critic-sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #374868;
    padding-bottom: 8px;
}

.critic-rating {
    color: #495057;
}

.rating-stars {
    margin-right: 10px;
}

.scholar-opinions {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.opinion-item {
    background: white;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #374868;
}

.opinion-author {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 5px;
}

.opinion-text {
    color: #495057;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.opinion-source {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    font-style: italic;
}

/* ============ التبويبات ============ */
#criticTabs {
    border-bottom: 2px solid #dee2e6;
}

#criticTabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
}

#criticTabs .nav-link:hover {
    color: #374868;
    background: #f8f9fa;
}

#criticTabs .nav-link.active {
    color: #374868;
    background: #f8f9fa;
    border-bottom: 3px solid #374868;
}

#criticTabs .nav-link .badge {
    font-size: 11px;
    padding: 4px 8px;
    margin-right: 5px;
}

/* ============ بطاقات الكتب ============ */
.book-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #374868;
}

.book-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.book-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

.book-type {
    background: #374868;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.book-body {
    padding: 15px;
}

.book-body p {
    margin-bottom: 8px;
    font-size: 13px;
    color: #495057;
}

.book-body strong {
    color: #2c3e50;
}

.book-footer {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

/* ============ بطاقات الرواة ============ */
.narrator-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    padding: 15px;
    height: 100%;
    transition: all 0.3s;
}

.narrator-card:hover {
    border-color: #374868;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.narrator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.narrator-header h5 {
    margin: 0;
    font-size: 1rem;
}

.narrator-header a {
    text-decoration: none;
    color: inherit;
}

.narrator-header a:hover {
    color: #374868;
}

.narrator-header .badge {
    font-size: 11px;
    padding: 4px 10px;
}

.opinion-item {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
}

.opinion-item.positive {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.opinion-item.negative {
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
}

.opinion-item strong {
    display: block;
    margin-bottom: 5px;
    color: #2c3e50;
}

.opinion-item p {
    margin: 0;
    line-height: 1.4;
}

/* ============ المودال ============ */
.critic-modal .modal-content {
    border-radius: 10px;
    border: none;
}

.critic-modal .modal-header {
    background: linear-gradient(135deg, #374868 0%, #374868 100%);
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 20px 30px;
}

.critic-modal .modal-title {
    font-weight: 600;
    font-size: 1.3rem;
}

.critic-modal .modal-body {
    padding: 30px;
    max-height: 70vh;
    overflow-y: auto;
}

.critic-info-card {
    margin-bottom: 30px;
}

.section-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
}

.critic-basic-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-item i {
    color: #374868;
    font-size: 20px;
    margin-top: 3px;
}

.info-content h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.info-content p {
    margin: 0;
    color: #495057;
    font-size: 15px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quotes-section {
    margin: 30px 0;
}

.quotes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quote-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #374868;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.quote-narrator {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.quote-source {
    background: #374868;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.quote-text {
    color: #495057;
    line-height: 1.6;
    font-size: 15px;
    margin: 10px 0;
}

.quote-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.quote-link {
    color: #374868;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.quote-link:hover {
    color: #374868;
    text-decoration: underline;
}

.sources-section {
    margin-top: 30px;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: #495057;
    font-size: 15px;
    border-bottom: 1px solid #eee;
}

.source-item:last-child {
    border-bottom: none;
}

.source-item i {
    color: #28a745;
}

/* ============ التجاوب ============ */
@media (max-width: 992px) {
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .pagination-area {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .critic-stats {
        justify-content: center;
    }
    
    .stat-item {
        min-width: 80px;
    }
}

@media (max-width: 768px) {
    .table-header,
    .critic-details-card,
    .critic-modal .modal-body {
        padding: 20px;
    }
    
    .critics-table-container table {
        font-size: 14px;
    }
    
    .critics-table-container th,
    .critics-table-container td {
        padding: 10px;
    }
    
    .critic-main-title {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    #criticTabs .nav-link {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .actions {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: 60px;
        padding: 5px 10px;
        font-size: 11px;
    }
    
    .critic-stats {
        gap: 10px;
    }
    
    .stat-item {
        min-width: 70px;
        padding: 10px;
    }
    
    .quote-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .quote-actions {
        flex-direction: column;
        gap: 10px;
    }
}
/* إضافة هذه للتبويبات المخصصة */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    font-weight: 500;
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-tabs .nav-link:hover {
    color: #374868;
    background: #f8f9fa;
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #374868;
    background: #f8f9fa;
    border-bottom: 3px solid #374868;
}

.nav-tabs .nav-link .badge {
    font-size: 11px;
    padding: 4px 8px;
    margin-right: 8px;
}

.tab-content {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
    border: 1px solid #dee2e6;
    border-top: none;
}

.tab-pane {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تصميم الجداول داخل التبويبات */
.tab-content .table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tab-content .table thead th {
    background: #374868;
    color: white;
    border: none;
    padding: 15px;
    font-weight: 500;
}

.tab-content .table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-color: #f1f1f1;
}

.tab-content .table tbody tr:hover {
    background-color: #f8fafc;
}

.tab-content .table a {
    color: #374868;
    text-decoration: none;
    transition: color 0.3s;
}

.tab-content .table a:hover {
    color: #374868;
    text-decoration: underline;
}

.tab-content .table .badge {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 12px;
}

/* شريط التقدم */
.progress {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background-color: #374868;
    transition: width 0.6s ease;
}