/*
 * ExamStyle.css
 * Shared styles for all Course Tasks and Course Tests pages.
 * Extracted from inline <style> blocks in:
 *   - CourseTasksList.html
 *   - CourseTasksEmpty.html
 *   - CourseTasksSubmissions.html
 *   - createTasks.html
 *   - CourseTestsCreateQuestion.html
 *   - CourseTestsCreateQuestionEmpty.html
 *   - CourseTestsCreateSetting.html
 *   - CourseTestsList.html
 *   - CourseTestsSubmissions.html
 */

/* ──────────────────────────────────────
   BUTTONS
────────────────────────────────────── */
.btn-amber {
  background-color: #F59E0B;
  color: white;
  border-radius: 50px;
  padding: 8px 24px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  transition: 0.2s;
}
.btn-amber:hover {
  background-color: #D97706;
  color: white;
}

.btn-purple {
  background-color: #7C3AED;
  color: white;
  border-radius: 50px;
  padding: 10px 40px;
  font-weight: 500;
  font-size: 14px;
  border: none;
  transition: 0.2s;
}
.btn-purple:hover {
  background-color: #6D28D9;
  color: white;
}

.btn-outline-custom {
  border: 1px solid #D1D5DB;
  color: #374151;
  font-weight: 500;
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 14px;
  background: white;
  transition: 0.2s;
}
.btn-outline-custom:hover {
  background: #F9FAFB;
}

/* Pill-style buttons (createTasks) */
.rounded-pill-btn {
  border-radius: 50px !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
  font-weight: 500;
}

/* ──────────────────────────────────────
   TABLE
────────────────────────────────────── */
.table-custom {
  border-collapse: separate;
  border-spacing: 0 8px;
  margin-bottom: 0;
}
.table-custom thead th {
  background: #F3E8FF;
  color: #7C3AED;
  font-weight: 600;
  border: none;
  padding: 14px 16px;
  font-size: 14px;
}
.table-custom thead th:first-child { border-radius: 12px 0 0 12px; }
.table-custom thead th:last-child  { border-radius: 0 12px 12px 0; text-align: center; }

.table-custom tbody tr {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.table-custom tbody td {
  border-top: 1px solid #F3F4F6;
  border-bottom: 1px solid #F3F4F6;
  padding: 14px 16px;
  vertical-align: middle;
  color: #374151;
  font-size: 14px;
}
.table-custom tbody td:first-child {
  border-left: 1px solid #F3F4F6;
  border-radius: 12px 0 0 12px;
  font-weight: 500;
}
.table-custom tbody td:last-child {
  border-right: 1px solid #F3F4F6;
  border-radius: 0 12px 12px 0;
  text-align: center;
}

/* ──────────────────────────────────────
   ACTION BUTTONS
────────────────────────────────────── */
.action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: 0.2s;
  background: transparent;
}
.action-btn.icon-blue   { background: #EFF6FF; color: #3B82F6; }
.action-btn.icon-red    { background: #FEF2F2; color: #EF4444; }
.action-btn.icon-amber  { background: #FFFBEB; color: #F59E0B; }
.action-btn.icon-purple { background: #F3E8FF; color: #7C3AED; }
.action-btn:hover { filter: brightness(0.95); }

/* ──────────────────────────────────────
   SEARCH BOX
────────────────────────────────────── */
.search-box {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 42px;
  width: 320px;
}
.search-box input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  margin-left: 8px;
  font-size: 14px;
}

/* ──────────────────────────────────────
   PAGINATION
────────────────────────────────────── */
.pagination-custom .page-link {
  border: none;
  color: #6B7280;
  font-weight: 500;
  background: transparent;
  padding: 8px 12px;
  border-radius: 8px;
}
.pagination-custom .page-link:hover { background: #F3F4F6; }
.pagination-custom .page-item.active .page-link {
  color: #111827;
  font-weight: 700;
  background: transparent;
}

/* ──────────────────────────────────────
   FILTER PILLS  (CourseTestsList)
────────────────────────────────────── */
.filter-pill {
  border: 1px solid #D1D5DB;
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
  background: #fff;
  transition: 0.2s;
  text-decoration: none;
  display: inline-block;
}
.filter-pill:hover { background: #F3F4F6; color: #111827; }
.filter-pill.active { background: #6B7280; color: #fff; border-color: #6B7280; }

/* ──────────────────────────────────────
   STATUS BADGES
────────────────────────────────────── */
.status-badge {
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.status-submitted { background: #ECFDF5; color: #059669; border: 1px solid #A7F3D0; }
.status-pending   { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }
.status-late      { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }

/* ──────────────────────────────────────
   STATS ITEMS
────────────────────────────────────── */
.stat-item { text-align: center; }
.stat-item .num   { font-size: 24px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-item .label { font-size: 12px; font-weight: 500; color: #6B7280; }

/* ──────────────────────────────────────
   SUBMISSION MODAL
────────────────────────────────────── */
.modal-submission .modal-header {
  background: #7C3AED;
  color: #fff;
  border-bottom: none !important;
}
.modal-submission .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
.modal-submission .modal-title     { color: #fff !important; font-size: 20px !important; }
.modal-submission .modal-title-sub { font-size: 13px; font-weight: 400; opacity: 0.9; }

/* Student row inside modal */
.student-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F9FAFB;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}
.student-row .s-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.student-row .s-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.s-avatar.mariam  { background: #7C3AED; }
.s-avatar.youssef { background: #6366F1; }
.s-avatar.ahmed   { background: #8B5CF6; }
.s-avatar.sara    { background: #6366F1; }

.s-name  { font-weight: 600; color: #111827; margin-bottom: 2px; line-height: 1.2; }
.s-email { font-size: 13px; color: #6B7280; }

.sub-meta { display: flex; gap: 40px; font-size: 13px; color: #374151; }
.sub-meta strong             { color: #111827; }
.sub-meta .status-pending    { color: #D97706; font-weight: 600; }
.sub-meta .status-late       { color: #DC2626; font-weight: 600; }
.sub-meta .status-submitted  { color: #059669; font-weight: 600; }

.answer-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 16px;
  min-height: 120px;
  margin-top: 8px;
  font-size: 14px;
  color: #374151;
}
.char-count { font-size: 12px; color: #9CA3AF; margin-top: 4px; display: block; }

.grade-box { background: #F9FAFB; border: 1px solid #E5E7EB; border-radius: 8px; padding: 16px; margin-top: 24px; }
.grade-box h6 { font-weight: 600; margin-bottom: 16px; }

.alert-late {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.alert-late i { font-size: 18px; color: #DC2626; }

.alert-grade-0 {
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.alert-grade-95 {
  background: #ECFDF5;
  border: 1px solid #6EE7B7;
  color: #065F46;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.grade-score       { font-size: 24px; font-weight: 700; color: #DC2626; line-height: 1; }
.grade-score.green { color: #059669; }

/* ──────────────────────────────────────
   FILE ATTACHMENT
────────────────────────────────────── */
.file-attached {
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.file-attached .f-info { display: flex; align-items: center; gap: 12px; }
.file-icon {
  width: 36px;
  height: 36px;
  background: #EFF6FF;
  color: #3B82F6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.f-name     { font-weight: 600; color: #111827; font-size: 14px; }
.f-size     { font-size: 12px; color: #6B7280; }
.f-download { color: #6B7280; cursor: pointer; }
.f-download:hover { color: #111827; }

/* ──────────────────────────────────────
   EMPTY STATE  (CourseTasksEmpty, CourseTestsCreateQuestionEmpty)
────────────────────────────────────── */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}
.empty-illustration {
  width: 300px;
  height: auto;
  margin-bottom: 24px;
}
.empty-state-container svg { margin-bottom: 24px; }
.empty-state-title { font-size: 18px; font-weight: 600; color: #111827; margin: 0; }

/* ──────────────────────────────────────
   CUSTOM TABS  (CourseTests Question/Setting pages)
────────────────────────────────────── */
.nav-pills.custom-tabs {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  overflow: hidden;
  margin-bottom: 32px;
}
.nav-pills.custom-tabs .nav-item { flex: 1; text-align: center; margin: 0; }
.nav-pills.custom-tabs .nav-link {
  border-radius: 6px;
  color: #6B7280;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  transition: 0.2s;
}
.nav-pills.custom-tabs .nav-link.active {
  background: transparent;
  color: #7C3AED;
  font-weight: 600;
  border: 1px solid #7C3AED;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.1);
}
.nav-pills.custom-tabs .nav-link:not(.active):hover { color: #374151; background: #F9FAFB; }

/* ──────────────────────────────────────
   QUESTION LIST  (CourseTestsCreateQuestion)
────────────────────────────────────── */
.q-list-title { color: #7C3AED; font-weight: 600; font-size: 15px; margin-bottom: 16px; margin-top: 32px; }

.q-item {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: 0.2s;
}
.q-item:hover { border-color: #C4B5FD; box-shadow: 0 2px 4px rgba(124, 58, 237, 0.05); }

.q-drag { color: #9CA3AF; cursor: grab; font-size: 16px; }
.q-num  { font-weight: 600; color: #111827; min-width: 20px; }
.q-text { color: #4B5563; font-size: 14px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 20px; }
.q-type { color: #F59E0B; font-size: 13px; font-weight: 500; min-width: 180px; }
.q-actions { display: flex; gap: 8px; }

/* ──────────────────────────────────────
   FORM INPUTS  (CourseTestsCreateSetting)
────────────────────────────────────── */
.form-control,
.form-select {
  border-radius: 12px;
  height: 48px;
  border-color: #D1D5DB;
  font-size: 14px;
}
.form-control:focus,
.form-select:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.input-group-text { background: transparent; border-color: #D1D5DB; }

/* ──────────────────────────────────────
   RADIO LIST BOX  (CourseTestsCreateSetting)
────────────────────────────────────── */
.radio-list-box { border: 1px solid #D1D5DB; border-radius: 12px; padding: 8px 16px; background: #fff; }
.radio-list-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
  cursor: pointer;
}
.radio-list-item:last-child { border-bottom: none; }
.radio-list-item input[type="radio"] {
  margin-right: 12px;
  width: 18px;
  height: 18px;
  accent-color: #C4B5FD;
  border: 1.5px solid #D1D5DB;
  border-radius: 50%;
}
.radio-list-item input[type="radio"]:checked { accent-color: #7C3AED; }
.radio-list-item label {
  margin-bottom: 0;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  user-select: none;
  flex: 1;
}

/* ──────────────────────────────────────
   STEPPERS  (CourseTestsCreateSetting)
────────────────────────────────────── */
.stepper-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #fff;
}
.stepper-btn {
  background: #6366F1;
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}
.stepper-btn:hover { background: #4F46E5; }
.stepper-value {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
  width: 60px;
  text-align: center;
}
.stepper-group-wrapper { display: flex; gap: 20px; flex-wrap: wrap; }
.stepper-block { flex: 1; min-width: 140px; }

/* ──────────────────────────────────────
   UPLOAD DROP ZONE  (createTasks)
────────────────────────────────────── */
.upload-dropzone {
  border: 1px dashed var(--border-color, #D1D5DB);
  border-radius: 8px;
  padding: 40px 20px;
  text-align: center;
  color: #9CA3AF;
  cursor: pointer;
  background: #fff;
  transition: background 0.2s;
}
.upload-dropzone:hover { background: #F9FAFB; }
.upload-dropzone i {
  font-size: 24px;
  margin-bottom: 8px;
  display: block;
}

/* ──────────────────────────────────────
   TOPBAR / HEADER (shared across all pages)
────────────────────────────────────── */
.logo-img {
  width: 50px;
  height: 50px;
}
.lang-btn {
  text-decoration: none;
}
.lang-chevron {
  font-size: 12px;
  color: #9CA3AF;
}
.flag-icon {
  width: 20px;
  height: 15px;
  margin-right: 8px;
}
.user-dropdown-btn {
  text-decoration: none;
  color: inherit;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
.user-chevron {
  font-size: 11px;
  color: #9CA3AF;
}

/* ──────────────────────────────────────
   BREADCRUMB
────────────────────────────────────── */
.breadcrumb-sep {
  color: #C4B5FD;
  margin: 0 5px;
}
.breadcrumb-current {
  color: #9CA3AF;
}

/* ──────────────────────────────────────
   SIDEBAR
────────────────────────────────────── */
.sidebar-chevron {
  font-size: 11px;
}

/* ──────────────────────────────────────
   QUESTION FORM ELEMENTS
────────────────────────────────────── */
.form-label-sm {
  font-size: 13px;
}
.ql-editor-no-border {
  border: none;
  padding: 0 !important;
}
.hr-light {
  border-color: #E5E7EB;
}
.answer-radio {
  width: 18px;
  height: 18px;
}
.answer-input-clean {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.add-answer-link {
  color: #F59E0B;
  text-decoration: none;
  font-weight: 500;
}
.btn-save {
  background: #F3F4F6;
  border-color: #E5E7EB;
}
.answer-subtitle {
  font-size: 13px;
  margin-bottom: 16px;
}
.date-display {
  font-size: 13px;
}
.text-size-14 {
  font-size: 14px;
}

/* ──────────────────────────────────────
   DRAG & DROP / MATCHING
────────────────────────────────────── */
.question-label {
  color: #7C3AED;
  font-size: 14px;
}
.clear-btn-icon {
  cursor: pointer;
}

/* ──────────────────────────────────────
   CourseTestsCreateSetting SPECIFIC
────────────────────────────────────── */
.input-group-border-left-none {
  border-left: none !important;
}
.input-group-border-right-none {
  border-right: none !important;
}
.conditional-border {
  border: 1px solid #C4B5FD;
  border-radius: 8px;
  overflow: hidden;
}
.conditional-input {
  border: none !important;
  box-shadow: none !important;
  font-size: 13px;
}

/* ──────────────────────────────────────
   SUBMISSIONS PAGE
────────────────────────────────────── */
.sub-page-back-link {
  color: #7C3AED;
  font-size: 14px;
}
.sub-test-title {
  font-size: 20px;
}
.sub-test-id {
  font-size: 13px;
}
.grade-purple {
  color: #7C3AED;
}
.modal-section-title {
  font-size: 15px;
}

/* ──────────────────────────────────────
   QUESTION BANK
────────────────────────────────────── */
.qb-page-title {
  color: #374151;
  font-size: 20px;
}
.qb-link {
  color: #374151;
  text-underline-offset: 4px;
}
.qb-sep {
  color: #9CA3AF;
  margin: 0 4px;
}
.qb-session {
  color: #9CA3AF;
  font-size: 15px;
  margin-left: 4px;
}
.qb-action-icon {
  font-size: 13px;
}

/* ──────────────────────────────────────
   SHARED (multiple pages)
────────────────────────────────────── */
.sidebar-course-name {
  color: #5B21B6;
}
.dropdown-icon {
  margin-right: 8px;
}
.form-control-rounded {
  border-radius: 8px;
}

.sub-grade-fail {
  font-size: 15px;
}
.sub-feedback-text {
  font-size: 13px;
}
.sub-grade-label {
  font-size: 12px;
  color: #991B1B;
}
.sub-grade-label-green {
  font-size: 12px;
  color: #065F46;
}

/* Save button variant */
.btn-save-outline {
  background: #F3F4F6;
  border-color: #E5E7EB;
}

/* Matching table */
.matching-table-wrap {
  overflow: visible;
}
.matching-table {
  min-width: 600px;
  margin-bottom: 0;
}
.matching-cell {
  width: 50%;
}

/* ──────────────────────────────────────
   QUESTION CARD (shared by question-form pages)
   Extracted from: CompleteQuestion.html, ChooseTheCorrectAnswer.html,
   ChooseMultipleChoice.html, TrueOrFalse.html, Matching.html,
   DragandDrop.html, EssayWriting.html
────────────────────────────────────── */
.question-card-bs {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #E5E7EB;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.q-header-bs {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.q-num-badge {
  background: #7C3AED;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.q-title-text {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}
.answer-row {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.answer-row:hover {
  border-color: #D1D5DB;
}
.media-icons {
  display: flex;
  gap: 10px;
  color: #6B7280;
}
.media-icons i {
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
}
.media-icons i:hover {
  color: #7C3AED;
}
.ql-container {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background: #fff;
  min-height: 120px;
}
.ql-toolbar {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background: #F9FAFB;
}
.answer-input-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 8px 16px;
}
.answer-input-box:focus-within {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.answer-input-box input {
  border: none;
  background: transparent;
  box-shadow: none !important;
  padding: 0;
  outline: none !important;
}
.answer-input-box i {
  font-size: 14px;
}

/* Drag & Drop override: narrower gap */
.dragdrop-page .answer-row {
  gap: 10px;
}

/* Essay override: taller editor */
.essay-page .ql-container {
  min-height: 150px;
}

/* ──────────────────────────────────────
   QUESTION BANK (CourseQuestionBank.html)
────────────────────────────────────── */
.search-container {
  position: relative;
  width: 300px;
}
.search-container input {
  padding-right: 40px;
  border-radius: 50rem;
  border: 1px solid #E5E7EB;
  box-shadow: none;
}
.search-container input:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.search-container .bi-search {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
}
.btn-amber-pill {
  background-color: #F59E0B;
  color: #fff;
  border: none;
  border-radius: 50rem;
  padding: 8px 24px;
  font-weight: 500;
}
.btn-amber-pill:hover {
  background-color: #D97706;
  color: #fff;
}
.qb-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.2s;
}
.qb-icon-purple {
  background-color: #F3E8FF;
  color: #7C3AED;
}
.qb-icon-purple:hover {
  background-color: #E9D5FF;
}
.qb-icon-red {
  background-color: #FEE2E2;
  color: #EF4444;
}
.qb-icon-red:hover {
  background-color: #FECACA;
}
.qb-icon-amber {
  background-color: #FEF3C7;
  color: #F59E0B;
}
.qb-icon-amber:hover {
  background-color: #FDE68A;
}

/* Question Bank table overrides (scope with .qb-page on body) */
.qb-page .table-custom thead th {
  background-color: #E9D5FF !important;
  color: #7C3AED !important;
  font-weight: 500;
  border-bottom: none;
  padding: 12px 16px;
}
.qb-page .table-custom thead th:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.qb-page .table-custom thead th:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.qb-page .table-custom tbody td {
  padding: 16px;
  vertical-align: middle;
  color: #4B5563;
  font-size: 14px;
  border-bottom: 1px solid #F3F4F6;
}

/* Drag & Drop text-warning override */
.text-warning {
  color: #F59E0B !important;
}

/* Question Bank table column widths */
.th-id {
  width: 5%;
}
.th-question {
  width: 45%;
}
.th-type {
  width: 20%;
}
.th-difficulty {
  width: 15%;
}
.th-actions {
  width: 15%;
  text-align: center;
}
