#cb-course-builder .cb-chapter {
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px 0;
  background: #fff;
}
#cb-course-builder .cb-lesson {
  border: 1px dashed #ccc;
  padding: 8px;
  margin: 8px 0;
  background: #f9f9f9;
}
#cb-course-builder .widefat {
  margin-bottom: 6px;
}
#cb-course-builder .cb-chapter-description,
#cb-course-builder .cb-lesson-description {
  min-height: 60px;
}

/* Frontend widget styles (simple) */
.cb-course-widget .cb-chapter {
  margin-bottom: 16px;
}
.cb-course-widget .cb-chapter-title {
  margin: 0 0 6px 0;
}
.cb-course-widget .cb-chapter-desc {
  color: #333;
  margin-bottom: 8px;
}
.cb-course-widget .cb-lessons {
  list-style: none;
  padding-left: 0;
}
.cb-course-widget .cb-lesson {
  margin-bottom: 8px;
}
.cb-course-widget .cb-lesson-desc {
  color: #555;
  margin: 4px 0;
}
/* New frontend styles to match attachments */
.cb-course-widget {
  font-family: "Vazirmatn", system-ui, -apple-system, sans-serif;
  color: #24303a;
}
.cb-course-widget-title {
  font-size: 20px;
  margin-bottom: 10px;
  text-align: right;
}
.cb-chapter {
  border-radius: 10px;
  border: 1px solid #e6eef8;
  padding: 14px;
  margin-bottom: 14px;
  background: #fff;
}
.cb-chapter summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 8px;
}
.cb-chapter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cb-chapter-index {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: transparent;
  color: #2b6cb0;
  font-weight: 600;
}
.cb-chapter-title {
  flex: 1 1 auto;
  margin-right: 12px;
  text-align: right;
}
.cb-chapter-meta {
  color: #6b7280;
  font-size: 13px;
  white-space: nowrap;
}
.cb-chapter-body {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

/* Support smooth height animation when expanding/collapsing chapters */
.cb-chapter-body {
  overflow: hidden;
}
.cb-lessons {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cb-lesson {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 8px;
}
.cb-lesson + .cb-lesson {
  margin-top: 8px;
  border-top: 1px dashed #f1f5f9;
}
.cb-lesson-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  text-decoration: none;
}
.cb-lesson-info {
  flex: 1 1 auto;
  text-align: right;
}
.cb-lesson-link {
  display: inline-block;
  color: #0b5394;
  font-weight: 600;
  text-decoration: none;
}
.cb-badge {
  display: inline-block;
  background: #fff0f0;
  color: #e04b35;
  padding: 4px 8px;
  border-radius: 14px;
  font-size: 12px;
  margin-right: 8px;
}
.cb-lesson-meta {
  color: #6b7280;
  font-size: 13px;
  margin-top: 6px;
}

/* small screens */
@media (max-width: 600px) {
  .cb-chapter-summary {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
  .cb-chapter-meta {
    font-size: 12px;
  }
}
/* Admin meta box */
#cb-course-builder .cb-chapter {
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px 0;
  background: #fff;
}
#cb-course-builder .cb-lesson {
  border: 1px dashed #ccc;
  padding: 8px;
  margin: 8px 0;
  background: #f9f9f9;
}
#cb-course-builder .widefat {
  margin-bottom: 6px;
}
#cb-course-builder .cb-chapter-description,
#cb-course-builder .cb-lesson-description {
  min-height: 60px;
}

/* Frontend widget styles (simple) */
.cb-course-widget .cb-chapter {
  margin-bottom: 16px;
}
.cb-course-widget .cb-chapter-title {
  margin: 0 0 6px 0;
}
.cb-course-widget .cb-chapter-desc {
  color: #333;
  margin-bottom: 8px;
}
.cb-course-widget .cb-lessons {
  list-style: none;
  padding-left: 0;
}
.cb-course-widget .cb-lesson {
  margin-bottom: 8px;
}
.cb-course-widget .cb-lesson-desc {
  color: #555;
  margin: 4px 0;
}
