/* =========================================================================
   Learning area (Tutor LMS 4: lesson, quiz, assignment)
   The site header stays, the lesson sits on a soft brand background, and the
   video, actions, tabs and curriculum are calm white cards.
   Loaded by muslim-platform-core/src/Modules/LearningArea.php.
   ========================================================================= */

.tutor-learning-page {
  --l-ink: #0a192f;
  --l-text: #42566f;
  --l-blue: #1d8cf8;
  --l-blue-strong: #1478dc;
  --l-tint: #f4f9ff;
  --l-tint-2: #e8f2fe;
  --l-line: #e1edf9;
  --l-radius: 14px;
  background: var(--l-tint);
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

.tutor-learning-page :is(h1, h2, h3, h4, h5, p, a, button, span, div, textarea, input) {
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

/* The category bar and the closing call to action give way to the lesson. */
.mslp-catbar,
.mslp-footer-cta { display: none !important; }

/* ---------- Title row ---------- */

.tutor-learning-header {
  position: static !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid var(--l-line) !important;
  box-shadow: none !important;
}

.tutor-learning-header-inner {
  width: min(100%, 1440px);
  min-height: 60px;
  margin-inline: auto;
  padding: 0 24px !important;
  background: transparent !important;
}

.tutor-learning-header-content { background: transparent !important; }

.tutor-learning-header-back { border: 0 !important; }

.tutor-learning-header-back .tutor-btn {
  width: 38px;
  height: 38px;
  color: var(--l-ink) !important;
  background: var(--l-tint) !important;
  border: 0 !important;
  border-radius: 10px !important;
  transition: color 180ms ease, background-color 180ms ease;
}

.tutor-learning-header-back .tutor-btn:hover {
  color: var(--l-blue-strong) !important;
  background: var(--l-tint-2) !important;
}

.tutor-learning-header-title {
  color: var(--l-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.tutor-learning-header .tutor-btn-secondary {
  height: 38px;
  min-height: 38px;
  color: var(--l-blue-strong) !important;
  background: var(--l-tint-2) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.tutor-learning-header .tutor-btn-secondary:hover {
  color: #fff !important;
  background: var(--l-blue-strong) !important;
}

.tutor-learning-header-toggle-mobile .tutor-btn {
  width: 38px;
  height: 38px;
  color: var(--l-blue-strong) !important;
  background: var(--l-tint-2) !important;
  border: 0 !important;
  border-radius: 10px !important;
}

/* The course and the current lesson read as one breadcrumb. */
@media (min-width: 768px) {
  .tutor-learning-header-title .tutor-md-hidden {
    color: var(--l-text);
    font-weight: 500;
  }

  .tutor-learning-header-title .tutor-md-hidden::after {
    content: "/";
    margin-inline: 10px;
    color: #bcd3ea;
  }

  .tutor-learning-header-title .tutor-hidden.tutor-md-inline { display: inline !important; }
}

/* ---------- Layout ---------- */

.tutor-learning-area { background: var(--l-tint) !important; }

.tutor-learning-area-body {
  width: min(100%, 1440px);
  align-items: flex-start;
  gap: 20px;
  margin: 0 auto !important;
  padding: 20px 24px 40px !important;
  background: transparent !important;
}

/* ---------- Curriculum ---------- */

/* One card: the course list scrolls inside it, with no boxes nested in boxes. */
.tutor-learning-sidebar {
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  background: #fff !important;
  border: 1px solid var(--l-line) !important;
  border-radius: var(--l-radius) !important;
  box-shadow: none !important;
}

@media (min-width: 1200px) {
  .tutor-learning-sidebar {
    position: sticky !important;
    top: 76px;
    flex: 0 0 340px;
    width: 340px !important;
    height: calc(100vh - 96px) !important;
    max-height: none !important;
  }
}

.tutor-learning-sidebar-curriculum {
  flex: 1 1 auto;
  min-height: 0;
  width: 100% !important;
  padding: 0 !important;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.tutor-learning-progress {
  margin: 0;
  padding: 14px 16px !important;
  background: transparent !important;
  border-bottom: 1px solid var(--l-line);
  border-radius: 0;
}

.tutor-learning-progress-text {
  color: var(--l-ink) !important;
  font-size: 14px;
  font-weight: 700;
}

.tutor-learning-page .tutor-progress-bar {
  display: block !important;
  flex: 0 0 6px;
  height: 6px !important;
  min-height: 6px;
  margin-top: 6px;
  overflow: hidden;
  background: var(--l-tint-2) !important;
  border-radius: 999px !important;
}

.tutor-learning-page .tutor-progress-bar-fill {
  height: 100% !important;
  background: var(--l-blue) !important;
  border-radius: inherit !important;
}

.mslp-lessons-done {
  display: block;
  margin-top: 6px;
  color: var(--l-text);
  font-size: 12.5px;
}

.mslp-lesson-search {
  position: relative;
  display: block;
  margin: 10px 12px 2px;
}

.mslp-lesson-search i {
  position: absolute;
  top: 50%;
  inset-inline-start: 12px;
  color: var(--l-blue-strong);
  font-size: 12.5px;
  transform: translateY(-50%);
}

.mslp-lesson-search input {
  width: 100%;
  height: 38px;
  padding-inline: 34px 10px;
  color: var(--l-ink);
  background: var(--l-tint);
  border: 1px solid var(--l-line);
  border-radius: 10px;
  font-size: 13.5px;
}

.mslp-lesson-search input:focus {
  outline: 0;
  background: #fff;
  border-color: var(--l-blue);
}

.mslp-lesson-search__empty {
  margin: 10px 14px 0;
  color: var(--l-text);
  font-size: 13px;
}

.tutor-learning-nav { padding: 6px 8px 8px !important; }

.tutor-learning-nav-topic {
  margin-bottom: 6px;
  border: 0;
  border-radius: 0;
}

.tutor-learning-nav-header {
  padding: 10px 8px !important;
  border: 0 !important;
  border-radius: 0;
}

.tutor-learning-nav-header-title {
  color: var(--l-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.tutor-learning-nav-body { padding: 0 6px 6px !important; }

.tutor-learning-nav-item {
  gap: 10px;
  margin: 2px 0;
  padding: 9px 8px !important;
  color: var(--l-ink) !important;
  border-radius: 10px !important;
  transition: background-color 160ms ease;
}

.tutor-learning-nav-item > div > div:first-child {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
}

.tutor-learning-nav-item .tutor-text-subdued {
  color: var(--l-text) !important;
  font-size: 12px;
}

.tutor-learning-nav-item svg {
  flex: 0 0 auto;
  color: var(--l-blue);
}

.tutor-learning-nav-item:hover { background: var(--l-tint) !important; }
.tutor-learning-nav-item.active {
  background: var(--l-tint-2) !important;
  box-shadow: inset -3px 0 0 var(--l-blue-strong);
}
.tutor-learning-nav-item.active > div > div:first-child { color: var(--l-blue-strong); }

.tutor-learning-nav-item.active::before,
.tutor-learning-nav-item.active::after {
  display: none !important;
}

/* Tutor's "more" menu is hidden for now. */
.tutor-learning-sidebar-pages { display: none !important; }

/* Tutor's complete-course button, in the brand colours. */
.tutor-learning-sidebar .tutor-btn-secondary.tutor-btn-block {
  color: var(--l-blue-strong) !important;
  background: var(--l-tint-2) !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

/* ---------- Attachments tab ---------- */

.tutor-lesson-exercise-files { padding: 20px !important; }

.tutor-lesson-exercise-files > h5 {
  margin: 0 0 14px !important;
  color: var(--l-ink) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
}

.tutor-lesson-exercise-files > .tutor-grid { gap: 12px !important; }

.tutor-learning-page .tutor-attachment-card {
  position: relative;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 0 !important;
  padding: 14px !important;
  text-align: start !important;
  background: #fff !important;
  border: 1px solid var(--l-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.tutor-learning-page .tutor-attachment-card:hover { background: var(--l-tint) !important; border-color: #c9e1fb !important; }

.tutor-attachment-card-icon {
  display: grid !important;
  flex: 0 0 46px;
  place-items: center;
  width: 46px !important;
  height: 46px !important;
  margin: 0 !important;
  color: var(--l-blue-strong) !important;
  background: var(--l-tint-2) !important;
  border-radius: 10px !important;
}

.tutor-attachment-card-icon svg { width: 22px; height: 22px; }

.tutor-attachment-card-body { flex: 1 1 auto; min-width: 0; }

.tutor-attachment-card-title {
  overflow: hidden;
  color: var(--l-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutor-attachment-card-meta { display: block; margin-top: 3px; color: var(--l-text) !important; font-size: 13px !important; }

.tutor-attachment-card-actions { flex: 0 0 auto; }

/* The download button covers the card, so the whole card downloads. */
.tutor-attachment-card-actions .tutor-btn {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  color: #fff !important;
  background: var(--l-blue) !important;
  border: 0 !important;
  border-radius: 10px !important;
}

.tutor-attachment-card-actions .tutor-btn::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.tutor-attachment-card:hover .tutor-attachment-card-actions .tutor-btn { background: var(--l-blue-strong) !important; }

/* ---------- Notes tab ---------- */

.tutor-learning-area-notes > .tutor-p-6 { padding: 20px !important; }

.tutor-learning-area-notes textarea,
.tutor-lesson-note-form-wrapper textarea {
  min-height: 96px;
  padding: 12px 14px !important;
  color: var(--l-ink) !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
  background: var(--l-tint) !important;
  border: 1px solid var(--l-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  resize: vertical;
}

.tutor-learning-area-notes textarea:focus,
.tutor-lesson-note-form-wrapper textarea:focus {
  background: #fff !important;
  border-color: var(--l-blue) !important;
  box-shadow: 0 0 0 3px rgba(29, 140, 248, .12) !important;
}

.tutor-learning-area-notes textarea::placeholder,
.tutor-lesson-note-form-wrapper textarea::placeholder { color: #6f8299; }

/* Save and cancel, for the tab form, an edited note and the floating form. */
.tutor-lesson-note-form .tutor-btn,
.tutor-lesson-notes-form-buttons .tutor-btn {
  min-height: 38px !important;
  padding: 0 18px !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.tutor-lesson-note-form .tutor-btn[type="submit"],
.tutor-lesson-notes-form-buttons .tutor-btn[type="submit"] { color: #fff !important; background: var(--l-blue) !important; }

.tutor-lesson-note-form .tutor-btn[type="submit"]:hover,
.tutor-lesson-notes-form-buttons .tutor-btn[type="submit"]:hover { background: var(--l-blue-strong) !important; }

.tutor-lesson-note-form .tutor-btn-ghost,
.tutor-lesson-notes-form-buttons .tutor-btn-ghost { color: var(--l-text) !important; background: var(--l-tint) !important; }

/* Filter and order row */
.tutor-learning-area-notes > div > .tutor-border-t:first-child {
  padding: 12px 20px !important;
  border-color: var(--l-line) !important;
}

.tutor-learning-area-notes .tutor-dropdown-filter > .tutor-btn {
  gap: 8px;
  padding: 0 !important;
  color: var(--l-ink) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

.tutor-learning-area-notes .tutor-dropdown-filter > .tutor-btn .tutor-text-secondary { color: var(--l-ink) !important; }

.tutor-learning-area-notes .tutor-dropdown-filter > .tutor-btn .tutor-text-primary {
  min-width: 26px;
  padding: 1px 8px;
  color: var(--l-blue-strong) !important;
  font-size: 12.5px;
  font-weight: 700 !important;
  text-align: center;
  background: var(--l-tint-2);
  border-radius: 999px;
}

.tutor-learning-page .tutor-popover {
  border: 1px solid var(--l-line) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(16, 52, 96, .12) !important;
}

.tutor-learning-page .tutor-popover-menu-item { border-radius: 8px; color: var(--l-ink) !important; }
.tutor-learning-page .tutor-popover-menu-item:hover,
.tutor-learning-page .tutor-popover-menu-item.tutor-active { color: var(--l-blue-strong) !important; background: var(--l-tint) !important; }

.tutor-learning-page [aria-label="خيارات الترتيب"],
.tutor-learning-page [aria-label="Open sorting options"] {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  color: var(--l-blue-strong) !important;
  background: #fff !important;
  border: 1px solid var(--l-line) !important;
  border-radius: 10px !important;
}

/* Saved notes */
.tutor-learning-area-notes .tutor-lesson-note-list { border-color: var(--l-line) !important; }

.tutor-learning-area-notes .tutor-lesson-note {
  min-height: 0 !important;
  margin: 12px 20px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--l-line);
  border-inline-start: 3px solid var(--l-blue);
  border-radius: 12px;
}

.tutor-learning-area-notes .tutor-lesson-note:last-child { margin-bottom: 20px; }

.tutor-lesson-note-view > .tutor-flex:first-child { align-items: center; }
.tutor-lesson-note-view > .tutor-flex:first-child > .tutor-flex { color: var(--l-text) !important; font-size: 12.5px !important; }
.tutor-lesson-note-view > .tutor-flex:first-child svg { color: var(--l-blue); }

.tutor-lesson-note-actions .tutor-btn-secondary {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  color: var(--l-blue-strong) !important;
  background: var(--l-tint) !important;
  border: 0 !important;
  border-radius: 8px !important;
}

.tutor-lesson-note-actions .tutor-btn-secondary:hover { background: var(--l-tint-2) !important; }
.tutor-lesson-note-actions .tutor-btn-secondary + .tutor-btn-secondary:hover { color: #c0392b !important; }

/* Text first, then a compact "play from" chip instead of the empty poster. */
.tutor-lesson-note-view > .tutor-flex:last-child {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

.tutor-lesson-note-view > .tutor-flex:last-child > :last-child { order: -1; width: 100%; }

.tutor-lesson-note-view [id^="tutor-note-content-"] {
  color: var(--l-ink) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.9 !important;
}

.tutor-learning-area-notes .tutor-lesson-note-thumb {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 999px !important;
}

.tutor-learning-area-notes .tutor-lesson-note-thumb img { display: none !important; }

.tutor-learning-area-notes .tutor-lesson-note-play-button {
  position: static !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  width: auto !important;
  height: auto !important;
  min-height: 34px !important;
  padding: 4px 6px 4px 14px !important;
  color: var(--l-blue-strong) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  background: var(--l-tint-2) !important;
  border: 0 !important;
  border-radius: 999px !important;
  cursor: pointer;
}

.tutor-learning-area-notes .tutor-lesson-note-play-button:hover { color: #fff !important; background: var(--l-blue) !important; }

.tutor-learning-area-notes .tutor-lesson-note-play-icon {
  display: grid !important;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff !important;
  background: var(--l-blue) !important;
  border-radius: 50%;
}

.tutor-learning-area-notes .tutor-lesson-note-play-button:hover .tutor-lesson-note-play-icon { color: var(--l-blue) !important; background: #fff !important; }

/* Empty list: the brand icon instead of Tutor's grey folder. */
.tutor-learning-area-notes > div > .tutor-flex-center-col { padding: 28px 20px 32px !important; }
.tutor-learning-area-notes > div > .tutor-flex-center-col :is(img, svg) { display: none !important; }

.tutor-learning-area-notes > div > .tutor-flex-center-col::before {
  content: "";
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: var(--l-tint-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231478dc' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E") center / 26px no-repeat;
  border-radius: 50%;
}

.tutor-learning-area-notes > div > .tutor-flex-center-col :is(h1, h2, h3, h4, h5, h6, p, div) { color: var(--l-ink) !important; font-size: 15px !important; font-weight: 600 !important; }

/* "Take a note" in the tab bar, and the one Tutor shows beside the video or a text selection. */
/* Tutor pins it over the content; it belongs at the end of the tab bar. */
#tutor-lesson-nav-take-note-btn { position: static !important; margin-inline-start: auto; }

#tutor-lesson-nav-take-note-btn,
#tutor-take-lesson-note-btn {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 14px !important;
  color: var(--l-blue-strong) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  background: var(--l-tint-2) !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

#tutor-lesson-nav-take-note-btn:hover,
#tutor-take-lesson-note-btn:hover { color: #fff !important; background: var(--l-blue) !important; }

#tutor-lesson-nav-take-note-btn.tutor-d-none,
#tutor-take-lesson-note-btn.tutor-d-none { display: none !important; }
#tutor-lesson-nav-take-note-btn svg,
#tutor-take-lesson-note-btn svg { width: 18px; height: 18px; }

/* Floating note form */
.tutor-lesson-note-form-wrapper {
  overflow: hidden;
  background: #fff !important;
  border: 1px solid var(--l-line) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 48px rgba(16, 52, 96, .16) !important;
}

.tutor-lesson-note-form-wrapper > .tutor-flex:first-child {
  padding: 14px 18px !important;
  background: var(--l-tint);
  border-bottom: 1px solid var(--l-line);
}

.tutor-lesson-note-form-wrapper > .tutor-flex:first-child + div { padding: 16px 18px 18px !important; }

.tutor-lesson-note-form-title-wrapper { display: flex; align-items: center; gap: 8px; color: var(--l-blue-strong); }
.tutor-lesson-note-form-title { color: var(--l-ink) !important; font-size: 16px !important; font-weight: 700 !important; }

.tutor-lesson-note-start-time {
  padding: 3px 10px;
  color: var(--l-blue-strong) !important;
  font-size: 12.5px;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: isolate;
  background: var(--l-tint-2);
  border-radius: 999px;
}

.tutor-lesson-note-form-wrapper [data-action-close] { color: var(--l-text) !important; border-radius: 8px !important; }
.tutor-lesson-note-form-wrapper [data-action-close]:hover { color: var(--l-ink) !important; background: var(--l-tint-2) !important; }
.tutor-lesson-notes-form-buttons { margin-top: 14px !important; }

/* Focus mode toggle (sidebar foot) */
.tutor-learning-sidebar > button.tutor-btn-icon {
  position: static !important;
  align-self: stretch;
  width: auto !important;
  height: 38px !important;
  flex: 0 0 38px;
  gap: 8px;
  margin: 10px 12px 12px !important;
  color: var(--l-blue-strong) !important;
  background: var(--l-tint) !important;
  border: 0 !important;
  border-radius: 10px !important;
  white-space: nowrap;
}

.tutor-learning-sidebar > button.tutor-btn-icon::after {
  content: "وضع التركيز";
  font-size: 13px;
  font-weight: 600;
}

.tutor-learning-sidebar > button.tutor-btn-icon:hover {
  color: #fff !important;
  background: var(--l-blue-strong) !important;
}

/* In focus mode Tutor hides the sidebar; mslp-learning.js adds this exit button. */
.mslp-focus-exit {
  position: fixed;
  z-index: 990;
  bottom: 24px;
  inset-inline-end: 84px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  color: #fff;
  background: #1478dc;
  border: 0;
  border-radius: 10px;
  font: 600 13px/1 "IBM Plex Sans Arabic", sans-serif;
  cursor: pointer;
}

.mslp-focus-exit[hidden] { display: none; }
.mslp-focus-exit:hover { background: #1d8cf8; }

/* ---------- Lesson column: video, actions, tabs ---------- */

.tutor-learning-area-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 !important;
  background: transparent !important;
}

.tutor-learning-area-container {
  max-width: none !important;
  margin: 0;
  padding: 0 !important;
  background: transparent !important;
}

.tutor-lesson-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* The wrapper steps aside so its children can sit around the actions bar. */
.tutor-lesson-content-tab { display: contents; }

.tutor-lesson-video-wrapper,
.tutor-lesson-image-wrapper {
  order: 1;
  width: 100% !important;
  margin: 0 !important;
  overflow: hidden;
  background: var(--l-ink);
  border: 0 !important;
  border-radius: var(--l-radius) !important;
}

.tutor-lesson-video-wrapper { position: relative; }

.tutor-learning-page .plyr {
  --plyr-color-main: #1d8cf8;
  border-radius: var(--l-radius);
}

.mslp-lesson-end {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  color: #fff;
  background: var(--l-ink);
  text-align: center;
}

.mslp-lesson-end strong { font-size: clamp(16px, 2.2vw, 22px); font-weight: 700; }
.mslp-lesson-end div { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.mslp-lesson-end :is(a, button) {
  min-height: 42px;
  padding: 8px 20px;
  color: #fff !important;
  background: transparent;
  border: 1px solid #4a6386;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.mslp-lesson-end :is(a, button):hover { background: #16335a; }
.mslp-lesson-end .is-main { background: var(--l-blue-strong); border-color: var(--l-blue-strong); }
.mslp-lesson-end .is-main:hover { background: var(--l-blue); }

.tutor-learning-page .plyr--youtube .plyr__video-embed iframe { pointer-events: none; }

.tutor-learning-area-footer {
  position: static !important;
  order: 2;
  box-sizing: border-box;
  width: 100% !important;
  align-items: center;
  margin: 0 !important;
  padding: 10px 14px !important;
  background: #fff !important;
  border: 1px solid var(--l-line) !important;
  border-radius: var(--l-radius) !important;
  box-shadow: none !important;
}

.tutor-learning-area-footer .tutor-btn-ghost {
  min-height: 40px;
  padding-inline: 14px !important;
  color: var(--l-ink) !important;
  background: var(--l-tint) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  white-space: nowrap;
}

.tutor-learning-area-footer .tutor-btn-ghost:hover {
  color: var(--l-blue-strong) !important;
  background: var(--l-tint-2) !important;
}

.tutor-mark-as-complete-button {
  min-height: 42px;
  padding-inline: 22px !important;
  color: #fff !important;
  background: var(--l-blue) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  white-space: nowrap;
  transition: background-color 180ms ease;
}

.tutor-mark-as-complete-button:hover { background: var(--l-blue-strong) !important; }
.tutor-mark-as-complete-button svg { color: #fff !important; }

.tutor-tabs-nav {
  order: 3;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px !important;
  background: #fff !important;
  border: 1px solid var(--l-line) !important;
  border-radius: var(--l-radius);
}

.tutor-tabs-nav .tutor-tabs-tab {
  min-height: 38px;
  padding-inline: 14px !important;
  color: var(--l-text) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
}

.tutor-tabs-nav .tutor-tabs-tab:hover { color: var(--l-blue-strong) !important; background: var(--l-tint) !important; }
.tutor-tabs-nav .tutor-tabs-tab-active { color: var(--l-blue-strong) !important; background: var(--l-tint-2) !important; }
.tutor-tabs-nav .tutor-btn-ghost-brand { margin-inline-start: auto; color: var(--l-blue-strong) !important; }

.tutor-lesson-content-tab .tutor-tabs-content {
  order: 4;
  width: 100%;
  background: #fff;
  border: 1px solid var(--l-line) !important;
  border-radius: var(--l-radius);
}

.tutor-learning-page .tutor-form-control {
  color: var(--l-ink) !important;
  background: #fff !important;
  border: 1px solid #c9e1fb !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.tutor-learning-page .tutor-form-control:focus {
  border-color: var(--l-blue) !important;
  box-shadow: 0 0 0 3px rgba(29, 140, 248, .12) !important;
}

.tutor-learning-page .tutor-empty-state,
.tutor-learning-page .tutor-text-subdued {
  color: var(--l-text) !important;
}

/* ---------- Quiz ---------- */

.tutor-learning-page .tutor-quiz-question-option,
.tutor-learning-page .tutor-quiz-question-answer {
  border: 1.5px solid var(--l-line) !important;
  border-radius: 10px !important;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.tutor-learning-page .tutor-quiz-question-option:hover {
  background: var(--l-tint) !important;
  border-color: #c9e1fb !important;
}

.tutor-learning-page .tutor-btn-primary {
  color: #fff !important;
  background: var(--l-blue) !important;
  border-color: var(--l-blue) !important;
  border-radius: 10px !important;
}

.tutor-learning-page .tutor-btn-primary:hover { background: var(--l-blue-strong) !important; }

/* ---------- Tablet and phone: the curriculum is Tutor's side sheet ---------- */

@media (max-width: 1199px) {
  .tutor-learning-area-body { padding: 16px 16px 32px !important; }

  .tutor-learning-sidebar {
    z-index: 1250;
    max-width: 100vw;
    border-radius: 0 !important;
  }

  .tutor-learning-sidebar.is-open { box-shadow: -18px 0 48px rgba(16, 52, 96, .16) !important; }
}

@media (max-width: 767px) {
  .tutor-learning-header-inner { min-height: 52px; gap: 8px; padding: 0 12px !important; }
  /* A long lesson title shortens instead of widening the page. */
  .tutor-learning-header-inner > *,
  .tutor-learning-header-content { min-width: 0; }
  .tutor-learning-header-back { flex: 0 0 auto; }
  .tutor-learning-header-inner > .tutor-learning-header-toggle-mobile { flex: 0 0 auto; width: auto !important; min-width: max-content; }
  .tutor-learning-header-content { flex: 1 1 0; overflow: hidden; }
  .tutor-learning-header-title {
    display: block !important;
    overflow: hidden;
    font-size: 14px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tutor-learning-area-body { gap: 12px; padding: 0 0 24px !important; }

  /* The video stays in view while the notes and tabs scroll. */
  .tutor-lesson-video-wrapper {
    position: sticky !important;
    top: 0;
    z-index: 6;
  }

  /* Says what the menu button opens. */
  .tutor-learning-header-inner > .tutor-learning-header-toggle-mobile .tutor-btn {
    width: auto;
    min-width: 38px;
    gap: 6px;
    padding: 0 10px !important;
    white-space: nowrap;
  }

  .tutor-learning-header-inner > .tutor-learning-header-toggle-mobile .tutor-btn::after {
    content: "الدروس";
    font-size: 13px;
    font-weight: 700;
  }

  .tutor-lesson-video-wrapper,
  .tutor-lesson-image-wrapper,
  .tutor-learning-page .plyr { border-radius: 0 !important; }

  /* Complete on its own row, previous and next under it. */
  .tutor-learning-area-footer {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 8px !important;
    margin-inline: 12px !important;
    width: auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  .tutor-learning-area-footer form {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 !important;
  }

  .tutor-mark-as-complete-button {
    width: 100% !important;
    min-height: 48px;
    justify-content: center;
    gap: 8px;
    border-radius: 12px !important;
  }

  .tutor-learning-area-footer .tutor-btn-ghost {
    grid-row: 2;
    width: 100% !important;
    min-height: 44px;
    justify-content: center;
    color: var(--l-blue-strong) !important;
    background: #fff !important;
    border: 1px solid var(--l-line) !important;
    border-radius: 12px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
  }

  /* Tutor only hides the missing link, so the first and last lessons mark this row. */
  .tutor-learning-area-footer a.tutor-btn-ghost.is-absent { display: none !important; }
  .tutor-learning-area-footer.has-one-link a.tutor-btn-ghost { grid-column: 1 / -1; }

  .tutor-tabs-nav,
  .tutor-lesson-content-tab .tutor-tabs-content {
    width: auto;
    margin-inline: 12px;
  }

  .tutor-learning-sidebar > button.tutor-btn-icon { display: none !important; }

  /* Three tabs and the note button share one row: the button keeps its icon only. */
  .tutor-tabs-nav { flex-wrap: nowrap; }
  .tutor-tabs-nav .tutor-tabs-tab { padding-inline: 10px !important; }

  #tutor-lesson-nav-take-note-btn {
    justify-content: center;
    width: 38px !important;
    min-width: 38px;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border-radius: 50% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tutor-learning-page * { transition-duration: 0.01ms !important; }
}
