/*
 * CP Math LMS v3.1 Tutor LMS presentation layer.
 * Loaded after the compact width rules so the learning screens stay readable
 * while catalog, dashboard, and course components share one polished system.
 */
body.cp-math-lms-theme {
  --cp-tutor-ink: #10233f;
  --cp-tutor-muted: #64748b;
  --cp-tutor-line: #e2e8f0;
  --cp-tutor-soft: #f5f8fc;
  --cp-tutor-surface: #ffffff;
  --cp-tutor-navy: #10233f;
  --cp-tutor-teal: #0f9fab;
  --cp-tutor-cyan: #17b8c8;
  --cp-tutor-purple: #695cf0;
  --cp-tutor-green: #0f9f72;
  --cp-tutor-shadow: 0 20px 55px rgba(15, 35, 63, 0.08);
  --cp-tutor-shadow-hover: 0 24px 65px rgba(15, 35, 63, 0.14);
}

body.cp-math-lms-theme:is(.cp-lms-catalog-view, .cp-lms-course-view, .cp-lms-dashboard-view) {
  background: var(--cp-tutor-soft);
}

body.cp-math-lms-theme .tutor-btn,
body.cp-math-lms-theme .tutor-button,
body.cp-math-lms-theme .tutor-btn-primary,
body.cp-math-lms-theme .tutor-button-primary {
  min-height: 44px;
  padding: 11px 20px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease !important;
}

body.cp-math-lms-theme .tutor-btn-primary,
body.cp-math-lms-theme .tutor-button-primary {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--cp-tutor-cyan), var(--cp-tutor-purple)) !important;
  box-shadow: 0 11px 24px rgba(23, 184, 200, 0.22);
}

body.cp-math-lms-theme .tutor-btn:hover,
body.cp-math-lms-theme .tutor-button:hover {
  transform: translateY(-1px);
}

body.cp-math-lms-theme .tutor-color-secondary,
body.cp-math-lms-theme .tutor-color-muted {
  color: var(--cp-tutor-muted) !important;
}

body.cp-math-lms-theme .tutor-form-control {
  min-height: 46px;
  border-color: var(--cp-tutor-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

body.cp-math-lms-theme .tutor-form-control:focus {
  border-color: var(--cp-tutor-cyan) !important;
  box-shadow: 0 0 0 4px rgba(23, 184, 200, 0.12) !important;
}

/* Catalog */
body.cp-math-lms-theme .cp-tutor-catalog,
body.cp-math-lms-theme.cp-lms-catalog-view .tutor-course-archive-results-wrap {
  padding: clamp(6px, 1vw, 14px) 0 44px;
}

body.cp-math-lms-theme .tutor-course-filter-wrap {
  padding: 18px;
  border: 1px solid var(--cp-tutor-line);
  border-radius: 18px;
  background: var(--cp-tutor-surface);
  box-shadow: 0 12px 30px rgba(15, 35, 63, 0.045);
}

body.cp-math-lms-theme .tutor-course-card,
body.cp-math-lms-theme .tutor-course-card .tutor-card {
  overflow: hidden;
  height: 100%;
  border: 1px solid var(--cp-tutor-line) !important;
  border-radius: 20px !important;
  background: var(--cp-tutor-surface) !important;
  box-shadow: 0 12px 34px rgba(15, 35, 63, 0.06) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

body.cp-math-lms-theme .tutor-course-card:hover,
body.cp-math-lms-theme .tutor-course-card:hover .tutor-card {
  border-color: rgba(23, 184, 200, 0.38) !important;
  box-shadow: var(--cp-tutor-shadow-hover) !important;
  transform: translateY(-4px);
}

body.cp-math-lms-theme .tutor-course-card .tutor-course-thumbnail,
body.cp-math-lms-theme .tutor-course-card .tutor-card-image-top {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e9fbfd, #eff0ff);
}

body.cp-math-lms-theme .tutor-course-card .tutor-course-thumbnail img,
body.cp-math-lms-theme .tutor-course-card .tutor-card-image-top img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transition: transform 250ms ease;
}

body.cp-math-lms-theme .tutor-course-card:hover .tutor-course-thumbnail img,
body.cp-math-lms-theme .tutor-course-card:hover .tutor-card-image-top img {
  transform: scale(1.045);
}

body.cp-math-lms-theme .tutor-course-card .tutor-card-body {
  padding: 18px 18px 12px !important;
}

body.cp-math-lms-theme .tutor-course-card .tutor-card-footer {
  padding: 12px 18px 18px !important;
  border-top: 1px solid #eef2f7 !important;
}

body.cp-math-lms-theme .tutor-course-card .tutor-course-name,
body.cp-math-lms-theme .tutor-course-card h3,
body.cp-math-lms-theme .tutor-course-card h4 {
  color: var(--cp-tutor-ink) !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
  letter-spacing: -0.02em;
}

body.cp-math-lms-theme .tutor-course-card .tutor-ratings {
  color: #f59e0b;
}

body.cp-math-lms-theme .tutor-course-card .tutor-course-price {
  color: var(--cp-tutor-teal);
  font-weight: 900;
}

/* Course details */
body.cp-math-lms-theme.cp-lms-course-view .tutor-wrap {
  padding-top: clamp(20px, 4vw, 48px);
  padding-bottom: 64px;
}

body.cp-math-lms-theme.cp-lms-course-view .tutor-course-details-page {
  max-width: 1240px !important;
  margin-inline: auto !important;
  padding-inline: clamp(14px, 3vw, 28px) !important;
}

body.cp-math-lms-theme .tutor-course-details-title,
body.cp-math-lms-theme .tutor-course-details-page h1 {
  color: var(--cp-tutor-ink) !important;
  font-size: clamp(30px, 4.5vw, 48px) !important;
  line-height: 1.1 !important;
  letter-spacing: -0.045em;
}

body.cp-math-lms-theme .tutor-course-details-header,
body.cp-math-lms-theme .tutor-course-details-content {
  color: var(--cp-tutor-ink);
}

body.cp-math-lms-theme .tutor-course-details-tab {
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid var(--cp-tutor-line);
  border-radius: 18px;
  background: var(--cp-tutor-surface);
  box-shadow: 0 12px 34px rgba(15, 35, 63, 0.05);
}

body.cp-math-lms-theme .tutor-course-details-tab .tutor-nav {
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--cp-tutor-line);
  background: #f8fafc;
}

body.cp-math-lms-theme .tutor-course-details-tab .tutor-nav-link {
  border-radius: 10px;
  color: var(--cp-tutor-muted);
  font-size: 14px;
  font-weight: 800;
}

body.cp-math-lms-theme .tutor-course-details-tab .tutor-nav-link.is-active,
body.cp-math-lms-theme .tutor-course-details-tab .tutor-nav-link.active {
  color: var(--cp-tutor-teal);
  background: #eafafb;
}

body.cp-math-lms-theme .tutor-course-single-sidebar-wrapper,
body.cp-math-lms-theme .tutor-course-details-widget {
  overflow: hidden;
  border: 1px solid var(--cp-tutor-line) !important;
  border-radius: 20px !important;
  background: var(--cp-tutor-surface) !important;
  box-shadow: var(--cp-tutor-shadow) !important;
}

body.cp-math-lms-theme .tutor-course-single-sidebar-wrapper .tutor-card-body,
body.cp-math-lms-theme .tutor-course-details-widget {
  padding: 18px !important;
}

/* Curriculum */
body.cp-math-lms-theme .tutor-course-topic {
  overflow: hidden;
  margin-bottom: 12px !important;
  border: 1px solid var(--cp-tutor-line) !important;
  border-radius: 14px !important;
  background: var(--cp-tutor-surface);
}

body.cp-math-lms-theme .tutor-course-topic-header {
  min-height: 58px;
  padding: 16px 18px !important;
  background: #f8fafc;
}

body.cp-math-lms-theme .tutor-course-topic-title {
  color: var(--cp-tutor-ink);
  font-weight: 900 !important;
  letter-spacing: -0.01em;
}

body.cp-math-lms-theme .tutor-course-topic-item {
  min-height: 50px;
  border-top: 1px solid #edf2f7 !important;
  color: var(--cp-tutor-ink);
  transition: background-color 140ms ease;
}

body.cp-math-lms-theme .tutor-course-topic-item:hover {
  background: #f2fbfc;
}

body.cp-math-lms-theme .tutor-course-topic-item-icon {
  color: var(--cp-tutor-teal);
}

/* Dashboard */
body.cp-math-lms-theme .cp-learning-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 24px;
  margin: 6px 0 26px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 18%, rgba(117, 221, 227, 0.27), transparent 24%),
    linear-gradient(135deg, #10233f 0%, #16385d 58%, #0e7f89 100%);
  box-shadow: 0 20px 48px rgba(16, 35, 63, 0.2);
}

body.cp-math-lms-theme .cp-learning-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #7ce4e8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body.cp-math-lms-theme .cp-learning-command h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

body.cp-math-lms-theme .cp-learning-command p {
  max-width: 620px;
  margin: 0;
  color: #c6d7e9;
  line-height: 1.7;
}

body.cp-math-lms-theme .cp-learning-quicklinks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.cp-math-lms-theme .cp-learning-quicklinks a {
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: end;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

body.cp-math-lms-theme .cp-learning-quicklinks a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

body.cp-math-lms-theme .cp-learning-quicklinks strong {
  font-size: 14px;
}

body.cp-math-lms-theme .cp-learning-quicklinks span {
  margin-top: 5px;
  color: #c6d7e9;
  font-size: 12px;
  line-height: 1.35;
}

body.cp-math-lms-theme.cp-lms-dashboard-view .tutor-dashboard {
  display: grid;
  max-width: 1240px !important;
  margin-inline: auto !important;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 18px;
}

body.cp-math-lms-theme .tutor-dashboard .tutor-dashboard-left-menu {
  overflow: hidden;
  border: 1px solid var(--cp-tutor-line);
  border-radius: 18px !important;
  background: var(--cp-tutor-surface);
  box-shadow: 0 12px 34px rgba(15, 35, 63, 0.055);
}

body.cp-math-lms-theme .tutor-dashboard .tutor-dashboard-menu-item-link {
  margin: 3px 7px;
  border-radius: 10px !important;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}

body.cp-math-lms-theme .tutor-dashboard .tutor-dashboard-menu-item-link:hover,
body.cp-math-lms-theme .tutor-dashboard .active .tutor-dashboard-menu-item-link {
  color: var(--cp-tutor-teal);
  background: #eafafb;
}

body.cp-math-lms-theme .tutor-dashboard-content {
  min-width: 0;
  padding: clamp(16px, 3vw, 24px) !important;
  border: 1px solid var(--cp-tutor-line);
  border-radius: 18px;
  background: var(--cp-tutor-surface);
  box-shadow: 0 12px 34px rgba(15, 35, 63, 0.055);
}

body.cp-math-lms-theme .tutor-dashboard-content h2,
body.cp-math-lms-theme .tutor-dashboard-content h3 {
  color: var(--cp-tutor-ink);
  letter-spacing: -0.025em;
}

/* Lesson workspace */
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-course-topic-single-header,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-single-page-top-bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff !important;
  background: var(--cp-tutor-navy) !important;
}

body.cp-math-lms-theme.cp-lms-lesson-view .tutor-course-topic-single-header a,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-single-page-top-bar a,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-course-topic-single-header button,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-single-page-top-bar button {
  color: #fff !important;
}

body.cp-math-lms-theme.cp-lms-lesson-view .tutor-course-single-sidebar-wrapper,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-course-single-sidebar {
  border-color: #dce4ee !important;
  border-radius: 0 !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}

body.cp-math-lms-theme.cp-lms-lesson-view .tutor-lesson-content,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-course-topic-single-body {
  color: #1e293b;
  font-size: 16px;
  line-height: 1.75;
}

body.cp-math-lms-theme.cp-lms-lesson-view .tutor-lesson-content h1,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-lesson-content h2,
body.cp-math-lms-theme.cp-lms-lesson-view .tutor-lesson-content h3 {
  color: var(--cp-tutor-ink);
  letter-spacing: -0.025em;
}

body.cp-math-lms-theme.cp-lms-lesson-view .tutor-lesson-content table {
  overflow: hidden;
  border: 1px solid var(--cp-tutor-line);
  border-radius: 12px;
  background: #fff;
}

body.cp-math-lms-theme.cp-lms-lesson-view .tutor-lesson-content th {
  color: var(--cp-tutor-ink);
  background: #f1f5f9;
}

@media (max-width: 980px) {
  body.cp-math-lms-theme .cp-learning-command {
    grid-template-columns: 1fr;
  }

  body.cp-math-lms-theme.cp-lms-dashboard-view .tutor-dashboard {
    display: block;
  }

  body.cp-math-lms-theme .tutor-dashboard .tutor-dashboard-left-menu {
    margin-bottom: 16px;
  }
}

@media (max-width: 640px) {
  body.cp-math-lms-theme .cp-learning-command {
    margin-inline: -4px;
    border-radius: 18px;
  }

  body.cp-math-lms-theme .cp-learning-quicklinks {
    grid-template-columns: 1fr;
  }

  body.cp-math-lms-theme .cp-learning-quicklinks a {
    min-height: 74px;
  }

  body.cp-math-lms-theme .tutor-course-card,
  body.cp-math-lms-theme .tutor-course-card .tutor-card,
  body.cp-math-lms-theme .tutor-course-details-tab,
  body.cp-math-lms-theme .tutor-course-single-sidebar-wrapper {
    border-radius: 15px !important;
  }
}

body.cp-math-lms-theme.cp-lms-dashboard-view .tutor-dashboard{display:block!important}