/*
  PROFPORTAL: Tutor-only custom styles.

  This stylesheet is safe to load site-wide because it is scoped under `body.tutor-lms`.
*/

/* --- Tutor LMS: quiz layout + feedback styling (scoped) --- */
/* Tutor pages can be rendered under different wrappers (dashboard vs spotlight/single content). */
.tutor-wrap-parent,
.tutor-course-single-content-wrapper,
.tutor-quiz-wrapper {
  background: #fff;
}

/* Study Mode: reveal correct answers + instant feedback (green/red) */
.tutor-quiz-wrapper.pp-study-mode .pp-answer-hint .tutor-card {
  border-left: 5px solid #006400;
  /* Make correct options visible even before user clicks anything */
  background-color: rgba(149, 245, 176, 0.18);
  font-weight: 600;
}

.tutor-quiz-wrapper.pp-study-mode .pp-answer-correct .tutor-card {
  background-color: #95f5b0;
  border-left: 5px solid #006400;
  font-weight: 700;
}

.tutor-quiz-wrapper.pp-study-mode .pp-answer-incorrect .tutor-card {
  background-color: #ffdddd;
  border-left: 5px solid #f00;
  color: #a00;
}

.tutor-quiz-wrapper.pp-study-mode .pp-answer-incorrect .tutor-card::after {
  content: "Вы ответили неверно";
  display: block;
  color: #c00;
  font-weight: 700;
  margin-top: 6px;
}

/* CSS-only instant feedback (no JS): prep only */
.tutor-quiz-wrapper.pp-study-mode.pp-study-mode--instant .tutor-quiz-answer-single.pp-answer-hint:has(input:checked) .tutor-card {
  background-color: #95f5b0;
}

.tutor-quiz-wrapper.pp-study-mode.pp-study-mode--instant .tutor-quiz-answer-single:not(.pp-answer-hint):has(input:checked) .tutor-card {
  background-color: #ffdddd;
  border-left: 5px solid #f00;
  color: #a00;
}

/* Force quiz answers to a single column (Tutor sometimes uses 2-col grid) */
.tutor-course-single-content-wrapper .quiz-question-ans-choice-area .tutor-row,
.tutor-wrap-parent .quiz-question-ans-choice-area .tutor-row {
  display: block !important;
}

.tutor-course-single-content-wrapper .quiz-question-ans-choice-area .tutor-quiz-answer-single,
.tutor-wrap-parent .quiz-question-ans-choice-area .tutor-quiz-answer-single {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  flex: 0 0 100% !important;
}

/* Clear feedback: correct / incorrect (works when Tutor marks answers) */
/* PROFPORTAL: show correct/incorrect feedback only in study modes (prep + exam_review) */
.tutor-quiz-wrapper.pp-study-mode .tutor-quiz-answer-single-correct .tutor-card {
  background-color: #95f5b0;
  border-left: 5px solid #006400;
  font-weight: 700;
}

.tutor-quiz-wrapper.pp-study-mode .tutor-quiz-answer-single-incorrect .tutor-card {
  background-color: #ffdddd;
  border-left: 5px solid #f00;
  color: #a00;
}

.tutor-quiz-wrapper.pp-study-mode .tutor-quiz-answer-single-incorrect::after {
  content: "Вы ответили неверно";
  display: block;
  color: #c00;
  font-weight: 700;
  margin-top: 6px;
}

/* PROFPORTAL: Exam lock — after feedback is shown, prevent changing answers */
.tutor-quiz-wrapper .pp-locked-question .tutor-quiz-answer-single {
  pointer-events: none !important;
  opacity: 0.9;
}

.tutor-quiz-wrapper .pp-locked-question .tutor-quiz-answer-next-btn {
  pointer-events: auto !important;
}

/* PROFPORTAL: hints visibility by mode
   - prep + exam_review: allow "Подсказка" as Tutor renders it (click to expand)
   - exam: hide hints */
body.tutor-lms .tutor-quiz-wrapper.pp-mode-exam details.pp-quiz-hint {
  display: none !important;
}

/* --- PROFPORTAL: Quiz mode picker (prep/exam) --- */
.pp-quiz-modes {
  display: none; /* show ONLY when moved into Tutor left sidebar */
  /* Tutor-like card look */
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
}

.pp-quiz-modes__title {
  /* Typography is mostly from Tutor utility classes */
  margin-bottom: 10px;
}

.pp-quiz-modes__opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pp-quiz-modes__opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
}

/* Compact mode when moved into course left sidebar */
.pp-quiz-modes.pp-quiz-modes--sidebar {
  display: block;
  margin: 10px 10px 14px;
  padding: 14px 14px;
}

/* Input alignment inside the label */
body.tutor-lms .pp-quiz-modes__opt input[type="radio"] {
  margin-top: 2px;
}

/* --- PROFPORTAL: Attempts summary (mode-aware) --- */
body.tutor-lms .tutor-quiz-result-summary {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.02);
}

body.tutor-lms .tutor-quiz-result-summary .tutor-d-flex {
  gap: 6px;
  align-items: baseline;
}

/* --- PROFPORTAL: Embedded trainer inside quiz page --- */
body.tutor-lms .tutor-quiz-wrapper .pp-quiz-trainer-area {
  display: none;
  margin: 16px 0 0;
}

body.tutor-lms .tutor-quiz-wrapper.pp-trainer-active .pp-quiz-trainer-area {
  display: block;
}

/* Embedded trainer: always-available exit button */
body.tutor-lms .tutor-quiz-wrapper .pp-trainer-exit-fab {
  display: none;
}

body.tutor-lms .tutor-quiz-wrapper.pp-trainer-active .pp-trainer-exit-fab {
  display: inline-flex;
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
}

/* When trainer is active, hide the rest of the quiz UI (keeps "in one window" feeling). */
body.tutor-lms .tutor-quiz-wrapper.pp-trainer-active > :not(.pp-quiz-trainer-area) {
  display: none !important;
}

/* Sidebar local tools */
body.tutor-lms .pp-quiz-local-tools details summary {
  list-style: none;
}

body.tutor-lms .pp-quiz-local-tools details summary::-webkit-details-marker {
  display: none;
}

/* Quiz local tools layout */
body.tutor-lms .pp-quiz-local-tools__toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Quiz local tools: explicit radios for mode selection */
body.tutor-lms .pp-quiz-local-tools__view label {
  cursor: pointer;
}

body.tutor-lms .pp-quiz-local-tools__view .tutor-form-check-input {
  margin: 0;
}

body.tutor-lms .pp-quiz-local-tools__counts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

body.tutor-lms .pp-quiz-local-tools__panel {
  width: 100%;
}

body.tutor-lms .pp-quiz-local-tools__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.tutor-lms .pp-quiz-local-tools .tutor-btn {
  border-radius: 12px;
}

body.tutor-lms .pp-quiz-local-tools__summary {
  cursor: pointer;
}

/* Hide duplicate "Повторение" buttons inside quiz sidebar */
body.tutor-lms .pp-hide-repeat-links a[href*="/pp-favorites"],
body.tutor-lms .pp-hide-repeat-links a[href*="/pp-wrong-answers"] {
  display: none !important;
}

/* Small count badge used in sidebar links/buttons */
body.tutor-lms .pp-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  margin-left: 8px;
}

/* --- PROFPORTAL: Favorites button (☆/★) --- */
.pp-qfav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111 !important;
  background: transparent !important;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  border: 1px solid rgba(17, 24, 39, 0.14) !important;
}

.pp-qfav-btn.pp-qfav-btn--active {
  color: #f5a623 !important;
  border-color: rgba(245, 166, 35, 0.5) !important;
  background: rgba(245, 166, 35, 0.08) !important;
}

.pp-qfav-btn .pp-qfav-btn__star {
  font-size: 18px;
  line-height: 1;
}

.pp-qfav-btn.pp-qfav-btn--compact {
  padding: 4px 8px;
  font-size: 13px;
}

/* Quiz question favorite button: separate bar (no layout breaking) */
body.tutor-lms .pp-qfav-bar {
  display: flex;
  justify-content: flex-end;
  margin: 6px 0 10px;
}

/* --- PROFPORTAL: Trainer UI helpers --- */
.pp-card {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.02);
}

.pp-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pp-opt {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Trainer layout (Tutor-like spacing, minimal custom CSS). */
body.tutor-lms .pp-trainer__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

body.tutor-lms .pp-trainer__answer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pp-trainer-answer {
  /* Hook class: keep minimal to avoid overriding Tutor's quiz styles */
}

/* Optional feedback highlights (only after submit, controlled by JS) */
body.tutor-lms .pp-trainer-answer--selected .tutor-card {
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.05);
}

body.tutor-lms .pp-trainer-answer--correct .tutor-card {
  border-color: rgba(36, 161, 72, 0.45);
  background: rgba(36, 161, 72, 0.08);
}

body.tutor-lms .pp-trainer-answer--wrong .tutor-card {
  border-color: rgba(244, 67, 55, 0.45);
  background: rgba(244, 67, 55, 0.06);
}

/* Trainer page: use Tutor's two-column layout */
body.tutor-lms .pp-trainer-layout {
  gap: 24px;
}

/* --- Tutor LMS: responsive / fluid layout (tables + dashboard) --- */
/* Make Tutor pages more "rubber" (use available width) without affecting non-Tutor pages. */
body.tutor-lms .ast-container {
  max-width: 100% !important;
}

/* PROFPORTAL: reusable help box (Tutor pages). */
body.tutor-lms .pp-help-box {
  border: 1px solid rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.02);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
}

body.tutor-lms .pp-help-box__title {
  font-weight: 700;
  margin-bottom: 8px;
}

body.tutor-lms .pp-help-box__text p {
  margin: 0 0 10px;
}

body.tutor-lms .pp-help-box__text ol {
  margin: 0 0 10px 18px;
}

body.tutor-lms .pp-help-box__note {
  opacity: 0.9;
}

body.tutor-lms .site-content .ast-container,
body.tutor-lms .site-content .ast-container-fluid {
  padding-left: 16px;
  padding-right: 16px;
}

@media (min-width: 1280px) {
  body.tutor-lms .site-content .ast-container,
  body.tutor-lms .site-content .ast-container-fluid {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  body.tutor-lms .site-content .ast-container,
  body.tutor-lms .site-content .ast-container-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* Tables: always allow horizontal scroll instead of clipping. */
body.tutor-lms .tutor-table-responsive,
body.tutor-lms .tutor-dashboard-content-inner .tutor-table-responsive,
body.tutor-lms .tutor-dashboard-content-inner .tutor-table-responsive.tutor-dashboard-list-table {
  /*
    IMPORTANT (desktop issue): some Tutor blocks can become vertically scrollable (wheel scroll gets "trapped")
    when overflow-y is auto/scroll or when a max-height is applied.
    We allow horizontal scroll, but forbid vertical scrolling inside the table wrapper.
  */
  overflow: visible !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  max-height: none !important;
  height: auto !important;
}

/*
  Desktop "scroll trap" (wheel scroll stuck inside a block):
  In some Tutor dashboard views the scrollable container is NOT the .tutor-table-responsive itself,
  but one of the wrappers (dashboard content / list-table wrapper / attempt details wrapper) that applies
  max-height + overflow-y:auto. We disable that (keep page scrolling), while still allowing horizontal
  scroll on the table wrapper.
*/
body.tutor-lms .tutor-dashboard,
body.tutor-lms .tutor-dashboard-content-inner,
body.tutor-lms .tutor-dashboard-content,
body.tutor-lms .tutor-dashboard-list-table,
body.tutor-lms .tutor-quiz-attempt-details-wrapper {
  overflow: visible !important;
  overflow-y: visible !important;
  max-height: none !important;
  height: auto !important;
  min-width: 0;
}

/* Extra safety: if any "attempt details" table wrapper gets capped, uncap it. */
body.tutor-lms .tutor-quiz-attempt-details-wrapper .tutor-table-responsive {
  overflow: visible !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-height: none !important;
  height: auto !important;
}

/* Keep tables readable: let cells wrap instead of forcing cut-off. */
body.tutor-lms table.tutor-table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
}

body.tutor-lms table.tutor-table th,
body.tutor-lms table.tutor-table td {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Attempts table: override global aggressive wrapping */
body.tutor-lms table.tutor-table.tutor-table-quiz-attempts th,
body.tutor-lms table.tutor-table.tutor-table-quiz-attempts td {
  word-break: normal;
  overflow-wrap: normal;
}

/* Attempts tables: ensure header separators even without `.tutor-table-responsive` wrapper */
body.tutor-lms table.tutor-table.tutor-table-quiz-attempts {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(17, 24, 39, 0.14) !important;
  border-radius: 12px !important;
  background: #fff;
}

body.tutor-lms table.tutor-table.tutor-table-quiz-attempts thead th {
  background: rgba(17, 24, 39, 0.04);
  border-bottom: 1px solid rgba(17, 24, 39, 0.14);
  /* Header text may be long — allow wrapping */
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
  line-height: 1.15;
}

body.tutor-lms table.tutor-table.tutor-table-quiz-attempts th,
body.tutor-lms table.tutor-table.tutor-table-quiz-attempts td {
  border-right: 1px solid rgba(17, 24, 39, 0.10);
  border-bottom: 1px solid rgba(17, 24, 39, 0.10);
}

body.tutor-lms table.tutor-table.tutor-table-quiz-attempts th:last-child,
body.tutor-lms table.tutor-table.tutor-table-quiz-attempts td:last-child {
  border-right: 0;
}

body.tutor-lms table.tutor-table.tutor-table-quiz-attempts tbody tr:last-child td {
  border-bottom: 0;
}

/* Attempts tables: fixed layout helps keep numeric columns compact */
@media (min-width: 769px) {
  body.tutor-lms table.tutor-table.tutor-table-quiz-attempts {
    table-layout: fixed !important;
  }
}

/* Attempts table: do NOT break dates / action buttons into letters */
@media (min-width: 769px) {
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts th:first-child,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts td:first-child {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    min-width: 132px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts th:last-child,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts td:last-child {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    min-width: 140px;
  }
}

/* PROFPORTAL: attempts table compact numeric columns (desktop) */
@media (min-width: 769px) {
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts {
    table-layout: fixed;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts th,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts td {
    padding: 10px 12px;
    font-size: 14px;
    vertical-align: middle;
  }

  /* Headers can wrap by words (not by letters) */
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts thead th {
    white-space: normal;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts .pp-attempt-col--date {
    white-space: nowrap;
    min-width: 130px;
  }

  body.tutor-lms .pp-attempt-date {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.15;
  }

  body.tutor-lms .pp-attempt-date__t {
    opacity: 0.82;
    font-size: 12px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--question,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--total_marks,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--correct_answer,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--incorrect_answer,
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--earned_marks {
    text-align: center;
    white-space: nowrap;
    min-width: 86px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--question {
    min-width: 70px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--earned_marks {
    min-width: 110px;
  }

  body.tutor-lms .pp-attempt-earned {
    display: inline-flex;
    gap: 6px;
    align-items: baseline;
  }

  body.tutor-lms .pp-attempt-earned__p {
    opacity: 0.82;
    font-size: 12px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--result {
    text-align: center;
    white-space: nowrap;
    min-width: 92px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--details {
    text-align: center;
    white-space: nowrap;
    min-width: 120px;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--details .tutor-btn {
    padding: 8px 10px;
    white-space: nowrap;
  }

  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table-quiz-attempts
    .pp-attempt-col--result .tutor-badge-label {
    font-size: 12px;
    padding: 4px 10px;
  }
}

@media (min-width: 769px) {
  /* "Мои попытки теста" + quiz attempts: compact numeric columns */
  body.tutor-lms table.tutor-table-quiz-attempts th,
  body.tutor-lms table.tutor-table-quiz-attempts td {
    padding: 10px 12px;
    font-size: 14px;
    vertical-align: middle;
  }

  /* Allow header text to wrap by words */
  body.tutor-lms table.tutor-table-quiz-attempts thead th {
    white-space: normal;
  }

  /* Numeric columns (2..6) */
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(2),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(2),
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(3),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(3),
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(4),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(4),
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(5),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(5),
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(6),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(6) {
    text-align: center;
    white-space: nowrap;
  }

  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(2),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(2) {
    width: 76px;
  }
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(3),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(3) {
    width: 88px;
  }
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(4),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(4),
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(5),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(5) {
    width: 118px;
  }
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(6),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(6) {
    width: 128px;
  }

  /* Result + Details */
  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(7),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(7) {
    width: 110px;
    text-align: center;
    white-space: nowrap;
  }

  body.tutor-lms table.tutor-table-quiz-attempts th:nth-child(8),
  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(8) {
    width: 132px;
    text-align: center;
    white-space: nowrap;
  }

  body.tutor-lms table.tutor-table-quiz-attempts td:nth-child(8) .tutor-btn {
    padding: 8px 10px;
    white-space: nowrap;
  }
}

/* PROFPORTAL: Tutor tables "beauty pass" (consistent borders + rounded corners, no weird cut corners). */
body.tutor-lms .tutor-table-responsive {
  /* Avoid double frames from wrappers; the table itself will draw the frame. */
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.tutor-lms .tutor-table-responsive table.tutor-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid rgba(17, 24, 39, 0.14) !important;
  border-radius: 12px !important;
  background: #fff;
}

body.tutor-lms .tutor-table-responsive table.tutor-table thead th {
  background: rgba(17, 24, 39, 0.04);
  border-bottom: 1px solid rgba(17, 24, 39, 0.14);
}

body.tutor-lms .tutor-table-responsive table.tutor-table th,
body.tutor-lms .tutor-table-responsive table.tutor-table td {
  border-right: 1px solid rgba(17, 24, 39, 0.10);
  border-bottom: 1px solid rgba(17, 24, 39, 0.10);
}

body.tutor-lms .tutor-table-responsive table.tutor-table th:last-child,
body.tutor-lms .tutor-table-responsive table.tutor-table td:last-child {
  border-right: 0;
}

body.tutor-lms .tutor-table-responsive table.tutor-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Attempt details ("Подробности" + "Quiz Overview"): make content wrap nicely and avoid cramped layout. */
body.tutor-lms table.tutor-table.tutor-quiz-attempt-details th,
body.tutor-lms table.tutor-table.tutor-quiz-attempt-details td {
  white-space: normal !important;
  vertical-align: top;
}

body.tutor-lms table.tutor-table.tutor-quiz-attempt-details td.questions,
body.tutor-lms table.tutor-table.tutor-quiz-attempt-details td.given-answer,
body.tutor-lms table.tutor-table.tutor-quiz-attempt-details td.correct-answer {
  max-width: 560px;
}

/* On small screens, prevent "squeezed" columns: prefer horizontal scroll. */
@media (max-width: 768px) {
  /* Default behavior: allow horizontal scrolling for wide tables */
  body.tutor-lms .tutor-table-responsive:not(.tutor-table-mobile) table.tutor-table {
    min-width: 680px;
  }

  /*
    Tutor adds .tutor-table-mobile for quiz attempt tables on frontend dashboard.
    Tutor's own CSS turns it into a mobile-friendly stacked layout.
    We must NOT force min-width there, otherwise it looks "cut" or causes unnecessary scroll.
  */
  body.tutor-lms .tutor-table-responsive.tutor-table-mobile table.tutor-table {
    min-width: 0 !important;
  }

  /* Reduce overly large fixed first column in attempt tables on small screens */
  body.tutor-lms .tutor-dashboard .tutor-dashboard-content .tutor-table.tutor-table-quiz-attempts tr th:first-child,
  body.tutor-lms .tutor-dashboard .tutor-dashboard-content .tutor-table.tutor-table-quiz-attempts tr td:first-child {
    min-width: 140px !important;
  }

  /*
    "My Quiz Attempts" on mobile: Tutor converts rows into vertical cards.
    Make sure the wrapper does NOT create its own vertical scrolling area (no max-height / overflow-y:auto),
    and remove the "boxed" feeling by reducing horizontal paddings.
  */
  body.tutor-lms .tutor-dashboard .tutor-dashboard-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.tutor-lms .tutor-dashboard .tutor-dashboard-content-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.tutor-lms .tutor-dashboard .tutor-table-responsive.tutor-table-mobile {
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
  }

  /* Make Tutor form controls and buttons comfortable on mobile. */
  body.tutor-lms .tutor-form-control,
  body.tutor-lms .tutor-form-select {
    width: 100%;
  }

  body.tutor-lms .tutor-btn {
    max-width: 100%;
  }
}

