/* Existing theme labels rendered by CSS must follow the interface language. */
html[data-cc-language="en"] body #lp-archive-courses .course-count-item.lp_lesson::after { content: ' lessons' !important; }
html[data-cc-language="en"] body #lp-archive-courses .course-count-item.lp_student::after { content: ' students' !important; }
html[data-cc-language="en"] body .cc-handout-link::after { content: 'View →' !important; }

/* Keep native current prices and effective sale prices visually distinct. */
html body#thim-body .cc-home .ccake-course-price,
html body#thim-body #lp-archive-courses .ccake-course-price,
html body#thim-body.single-lp_course:not(.course-item-popup) #main-content .course-price .course-item-price {
  display: inline-flex !important;
  align-items: baseline !important;
  flex-wrap: wrap;
  gap: 8px !important;
  line-height: 1.4;
}
html body#thim-body .cc-home .ccake-price-original,
html body#thim-body #lp-archive-courses .ccake-price-original,
html body#thim-body.single-lp_course:not(.course-item-popup) #main-content .course-price .origin-price {
  color: #a5a5a5 !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
  opacity: 1;
}
html body#thim-body .cc-home .ccake-price-current,
html body#thim-body #lp-archive-courses .ccake-price-current,
html body#thim-body.single-lp_course:not(.course-item-popup) #main-content .course-price .price {
  color: var(--cc-blue, #547f97) !important;
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

/* Reduce only course and player headings, leaving lesson notes readable. */
html body#thim-body.single-lp_course:not(.course-item-popup) #main-content .course-info > h1.entry-title {
  font-size: clamp(22px, 2.1vw, 28px) !important;
  line-height: 1.45 !important;
}
html body#thim-body.course-item-popup #popup-course.cc-learning #popup-header h2.course-title,
html body#thim-body.course-item-popup #popup-course.cc-learning #popup-header h2.course-title > a {
  font-size: clamp(18px, 1.6vw, 22px) !important;
  line-height: 1.45 !important;
}
html body#thim-body.course-item-popup #popup-course.cc-learning #popup-header .course-title .curriculum-info {
  font-size: 14px !important;
  line-height: 1.5 !important;
}
html body#thim-body.course-item-popup #popup-course.cc-learning #popup-content h1.course-item-title {
  font-size: clamp(20px, 1.8vw, 24px) !important;
  line-height: 1.45 !important;
}
html body#thim-body #popup-course.cc-learning .cc-lesson-tabs > [data-ccake-empty-highlights],
html body#thim-body #popup-course.cc-learning .cc-lesson-panels > [data-ccake-empty-highlights] {
  display: none !important;
}
.ccake-lesson-notices { margin: 0 0 18px; }
.ccake-lesson-notices > .ccake-video-pending { margin: 0; }

/* The numbered introduction artwork remains complete and continuous. */
.ccake-course-intro-gallery { display: flex; flex-direction: column; gap: 0; width: 100%; margin: 0; padding: 0; }
.ccake-course-intro-gallery > p,
.ccake-course-intro-gallery figure { margin: 0 !important; padding: 0; line-height: 0; }
.ccake-course-intro-gallery img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 !important; padding: 0; border: 0; }
.ccake-course-intro-gallery > br { display: none; }

/* Learning navigation and server-rendered course ownership cards. */
body.ccake-learning-ready .ccake-primary-button,
body.ccake-learning-ready .ccake-complete-lesson {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid #285d64;
  border-radius: 8px;
  background: #285d64 !important;
  color: #fff !important;
  font: inherit;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
body.ccake-learning-ready .ccake-primary-button:hover,
body.ccake-learning-ready .ccake-complete-lesson:hover { background: #204c52 !important; color: #fff !important; border-color: #204c52 !important; }
body.ccake-learning-ready .ccake-primary-button:focus-visible,
body.ccake-learning-ready .ccake-complete-lesson:focus-visible,
body.ccake-learning-ready .ccake-notice-close:focus-visible { outline: 3px solid #729ca2; outline-offset: 3px; }
body.ccake-learning-ready .ccake-complete-lesson:disabled { opacity: .65; cursor: wait; }
body.ccake-learning-ready.course-item-popup #popup-course form.form-button-finish-course.ccake-finish-blocked,
body.ccake-learning-ready form.form-button-finish-course.ccake-finish-blocked { display: none !important; }
body.ccake-learning-ready .ccake-lesson-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; width: 100%; margin: 0 0 18px; }
body.ccake-learning-ready .ccake-lesson-actions form { display: flex; align-items: center; justify-content: flex-end; gap: 12px; float: none !important; width: auto; max-width: 100%; margin: 0 !important; padding: 0 !important; }
body.ccake-learning-ready.course-item-popup #popup-course.cc-learning .ccake-lesson-actions .ccake-complete-lesson,
body.ccake-learning-ready.course-item-popup #popup-course .ccake-lesson-actions .ccake-complete-lesson { margin: 0 !important; background: #285d64 !important; color: #fff !important; border-color: #285d64 !important; }
body.ccake-learning-ready.course-item-popup #popup-course.cc-learning .ccake-lesson-actions .ccake-complete-lesson:hover,
body.ccake-learning-ready.course-item-popup #popup-course .ccake-lesson-actions .ccake-complete-lesson:hover { background: #204c52 !important; color: #fff !important; border-color: #204c52 !important; }
.ccake-home-learning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 32px;
  padding: 15px 24px;
  background: #f0f5f3;
  border: 1px solid #cbdcd8;
  border-radius: 14px;
  color: #243240;
}
.ccake-home-learning h2 {
  margin: 0 0 3px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.4;
}
.ccake-home-learning p { margin: 0; color: #50616a; font-size: 14px; line-height: 1.5; }
body.ccake-learning-ready .ccake-home-learning > a[data-ccake-start-learning] {
  flex-shrink: 0;
  gap: 4px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none !important;
  color: var(--cc-blue, #547f97) !important;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  white-space: nowrap;
}
.ccake-home-learning > a[data-ccake-start-learning]::after { content: "↗" / ""; }
body.ccake-learning-ready .ccake-home-learning > a[data-ccake-start-learning]:hover {
  background: none !important;
  color: var(--cc-blue, #547f97) !important;
  text-decoration: underline;
}
#ccake-my-courses { width: 100%; min-width: 0; color: #243240; }
#ccake-my-courses .ccake-learning-heading { margin: 0 0 24px; }
#ccake-my-courses .ccake-learning-heading h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); }
.ccake-course-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ccake-course-card { min-width: 0; overflow: hidden; border: 1px solid #d5dde2; border-radius: 14px; background: #fffdf7; }
.ccake-course-image { display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #eef2ef; }
.ccake-course-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ccake-course-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; }
.ccake-course-copy h3 { margin: 0; font-size: 21px; line-height: 1.5; }
.ccake-course-copy h3 a { color: #243240; text-decoration: none; }
.ccake-course-copy p { margin: 0; }
.ccake-course-progress { color: #50616a; font-size: 15px; }
.ccake-course-progress-bar { width: 100%; height: 9px; accent-color: #285d64; }
.ccake-empty-state { padding: 28px; background: #fffdf7; border: 1px solid #d5dde2; border-radius: 12px; }
body.ccake-notice-open { overflow: hidden; }
.ccake-notice-backdrop { position: fixed; inset: 0; z-index: 100010; display: grid; place-items: center; padding: 20px; background: rgb(24 39 44 / 48%); }
.ccake-notice-dialog { position: relative; width: min(100%, 440px); max-height: calc(100dvh - 40px); overflow: auto; padding: 40px 32px 32px; box-sizing: border-box; border-radius: 16px; background: #fbf8f0; color: #243240; text-align: center; box-shadow: 0 18px 70px rgb(0 0 0 / 20%); }
.ccake-notice-dialog h2 { margin: 0 0 14px; font-size: 28px; line-height: 1.4; }
.ccake-notice-dialog p { margin: 0 0 26px; }
.ccake-notice-dialog .ccake-notice-close { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #50616a; font-size: 28px; line-height: 1; cursor: pointer; }

/* Every list item gets its image and card. The theme's grid mode remains separate. */
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li { margin: 0 0 24px !important; padding: 0 !important; border: 0 !important; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li > .course-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 28px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 18px !important;
  border: 1px solid #d5dde2 !important;
  border-radius: 16px !important;
  background: #fffdf7 !important;
  box-sizing: border-box !important;
}
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .course-thumbnail {
  display: block !important;
  float: none !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden !important;
  border-radius: 12px !important;
}
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .course-thumbnail .thumb { display: block !important; width: 100% !important; height: 100% !important; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .course-thumbnail img { display: block !important; width: 100% !important; height: 100% !important; object-fit: cover !important; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .thim-course-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .course-title { order: 0 !important; grid-column: auto !important; grid-row: auto !important; width: 100% !important; margin: 0 !important; font-size: clamp(20px, 2.2vw, 25px) !important; line-height: 1.5 !important; overflow-wrap: anywhere; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .thim-course-content > .course-instructor { display: block !important; order: 1 !important; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .course-description { display: block !important; order: 2 !important; grid-column: auto !important; width: 100% !important; margin: 0 !important; font-size: 14px !important; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .course-meta { order: 3 !important; grid-column: auto !important; width: 100% !important; margin: 0 !important; }
body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li .cc-view-course { display: inline-flex !important; order: 4 !important; grid-column: auto !important; grid-row: auto !important; align-self: flex-start !important; align-items: center !important; justify-content: center !important; margin: 0 !important; padding: 12px 24px !important; min-width: 0 !important; border: 1px solid #285d64 !important; border-radius: 8px !important; background: #285d64 !important; color: #fff !important; white-space: normal !important; }

@media (max-width: 767px) {
  .ccake-home-learning {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    padding: 15px 20px;
  }
  .ccake-home-learning > div { display: contents; }
  .ccake-home-learning h2 { grid-area: 1 / 1; margin: 0; }
  .ccake-home-learning p {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: clamp(12px, 3.75vw, 14px);
  }
  .ccake-home-learning > a[data-ccake-start-learning] { grid-area: 1 / 2; }
  .ccake-course-grid { grid-template-columns: minmax(0, 1fr); }
  .ccake-course-copy { padding: 20px; }
  body.ccake-learning-ready #lp-archive-courses .thim-course-list .learn-press-courses > li > .course-item { grid-template-columns: minmax(0, 1fr) !important; gap: 18px !important; padding: 12px !important; }
}
