/* exam.css - Cập nhật để đồng bộ với list_exam_management.css */

/* Kế thừa các style chung từ list_exam_management */
/* .exam-card:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
} */

.view-count {
    min-width: 70px;
}

.filter-card {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.pagination .page-link {
    color: #0d6efd;
}

.toast {
    min-width: 300px;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.toast-header {
    color: white;
    border-bottom: none;
}

.bg-success .toast-header {
    background-color: #198754;
}

.bg-danger .toast-header {
    background-color: #dc3545;
}

.bg-warning .toast-header {
    background-color: #fd7e14;
}

.toast-body {
    padding: 1rem;
    color: white;
}

select:disabled {
    opacity: 0.8;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* Spacing đều nhau */
.container > * {
    margin-bottom: 2rem;
}

.container > *:last-child {
    margin-bottom: 0;
}

.form-label {
    font-weight: 500;
}

.form-control, .form-select {
    /* padding: 0.75rem; */
    border-radius: 0.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.modal-content {
    border-radius: 0.75rem;
}

.modal-header, .modal-footer {
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-mobile-icon {
        padding: 0.375rem;
        width: 40px;
        overflow: hidden;
        white-space: nowrap;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }
    .btn-mobile-icon .btn-text {
        display: none;
    }
    .btn-mobile-icon i {
        margin-right: 0 !important;
    }
    
    .container > * {
        margin-bottom: 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-header, .modal-footer {
        padding: 1rem;
    }
}

/* Đảm bảo khoảng cách đồng đều giữa các phần tử form */
.form-check-inline {
    margin-right: 1.5rem;
}

/* Khoảng cách đồng đều cho các card */
.exam-card {
    margin-bottom: 0;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
}

.exam-card:last-child {
    margin-bottom: 0;
}

/* Các style đặc thù cho trang exam */
#exam-list-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#exam-list-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Cập nhật style cho filter card */
.filter-card {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    /* padding: 1.5rem !important; Đảm bảo padding đồng nhất */
}

.form-label {
    font-weight: 500;
    color: #495057;
}

.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.btn-primary {
    background-color: #0d6efd;
    border: none;
    /* padding: 0.75rem 1.5rem; */
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-1px);
}

.exam-card {
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 0;
    border-radius: 0.375rem;
}

.exam-card:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.view-count {
    min-width: 70px;
    background-color: rgba(13, 110, 253, 0.1) !important;
    border-radius: 50rem !important;
}

/* Skeleton loading */
.skeleton-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.375rem;
    height: 60px;
    margin-bottom: 0.5rem;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.pagination {
    margin-top: 1.5rem;
}

.page-item .page-link {
    border-radius: 0.375rem !important;
    margin: 0 0.25rem;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    min-width: 2.5rem;
    text-align: center;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.page-item.disabled .page-link {
    color: #6c757d;
}

/* Hiệu ứng tổng thể */
#exam-list-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#exam-list-content.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-card .row>div {
        margin-bottom: 0;
    }

    .exam-card {
        flex-direction: column;
    }

    .view-count {
        margin-top: 0.5rem;
        align-self: flex-start;
    }
}

.empty-state {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin: 1rem;
}

.empty-state i {
    opacity: 0.7;
}

/* Thêm vào phần CSS */
.page-item.disabled .page-link {
    pointer-events: none;
    background-color: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    cursor: default;
}

/* Overlay loading */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
}

/* Tooltip cho tên đề */
.exam-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tag độ khó */
.badge-difficulty {
    font-size: 0.75rem;
}

/* Cải thiện giao diện bảng kết quả */
.bg-light {
    background-color: #f8f9fa !important;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
    /* padding: 1.5rem !important; */
}

.list-group-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
}

.list-group-item:last-child {
    border-bottom: none;
}

.text-muted {
    color: #6c757d !important;
}

/* Đảm bảo tính nhất quán với list_exam_management */
.d-flex.justify-content-between.align-items-center {
    padding: 0;
}

.border.rounded-3.shadow-sm.bg-white {
    border-radius: 0.75rem !important;
    overflow: hidden;
}

/* Điều chỉnh khoảng cách và kích thước phù hợp */
h5.mb-0.fw-bold {
    font-size: 1.25rem;
}

h6.fw-bold.mb-1.text-primary {
    font-size: 1.1rem;
    margin-bottom: 16px !important;
}

.small.text-muted.mb-0 {
    font-size: 0.875rem;
}

/* Điều chỉnh badge */
.badge.bg-secondary.bg-opacity-10.text-secondary,
.badge.bg-info.bg-opacity-10.text-info,
.badge.bg-success.bg-opacity-10.text-success {
    padding: 0.35rem 0.65rem;
    font-weight: 500;
}