/* فرم دوره — زمان‌بندی، گالری کاور، کارت کلاس آنلاین و ادیتور توضیحات */

.cm-course-html p { margin-bottom: 0.75rem; }
.cm-course-html ul, .cm-course-html ol { padding-right: 1.25rem; margin-bottom: 0.75rem; }
.cm-course-html h2, .cm-course-html h3, .cm-course-html h4 { font-weight: 800; margin: 1rem 0 0.5rem; }

.cm-ck-wrap .ck-editor__editable_inline {
  min-height: 220px;
  direction: rtl;
  text-align: right;
}

.cm-schedule {
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.85rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.4);
}

.cm-schedule-row {
  display: grid;
  grid-template-columns: 1fr 7.5rem auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.6rem;
}

@media (max-width: 575px) {
  .cm-schedule-row {
    grid-template-columns: 1fr;
  }
}

.cm-gallery,
.cm-cover-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.85rem;
}

.cm-cover-preview {
  margin-top: 0.85rem;
}

.cm-gallery__item,
.cm-cover-preview__item {
  position: relative;
  border: 1.5px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px -14px rgba(15, 23, 42, 0.45);
  aspect-ratio: 4 / 3;
}

.cm-gallery__item.is-default,
.cm-cover-preview__item.is-default {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.28), 0 10px 24px -12px rgba(22, 163, 74, 0.55);
}

.cm-gallery__item img,
.cm-cover-preview__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cm-gallery__tick,
.cm-cover-preview__tick,
.cm-gallery__remove,
.cm-cover-preview__remove {
  position: absolute;
  width: 2.15rem;
  height: 2.15rem;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  z-index: 2;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.15s ease;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.45);
}

.cm-gallery__tick:hover,
.cm-cover-preview__tick:hover {
  transform: scale(1.06);
}

.cm-gallery__tick,
.cm-cover-preview__tick {
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.92);
  color: #94a3b8;
}

.cm-gallery__item.is-default .cm-gallery__tick,
.cm-cover-preview__item.is-default .cm-cover-preview__tick,
.cm-gallery__tick.is-on,
.cm-cover-preview__tick.is-on {
  background: #16a34a;
  color: #fff;
}

.cm-gallery__remove,
.cm-cover-preview__remove {
  top: 0.5rem;
  left: 0.5rem;
  background: #d83d32;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
}

.cm-gallery__badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(22, 163, 74, 0.94);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.cm-gallery__item > form,
.cm-cover-preview__item > form {
  margin: 0;
}

.cm-live-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  min-height: 8.5rem;
  padding: 0.9rem 1rem;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.cm-live-card:hover { border-color: #2F66F2; }

.cm-live-card.is-selected {
  border-color: #2F66F2;
  box-shadow: 0 0 0 2px rgba(47, 102, 242, 0.2);
  background: rgba(47, 102, 242, 0.06);
}

.cm-live-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cm-live-card__icon {
  width: 2.15rem;
  height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.15rem;
}

.cm-live-card__icon svg {
  width: 2.15rem;
  height: 2.15rem;
}

.cm-live-card__title { font-weight: 800; font-size: 0.95rem; }
.cm-live-card__desc { font-size: 0.8rem; opacity: 0.7; line-height: 1.5; }

.cm-course-hero {
  border-radius: 0.85rem;
  overflow: hidden;
  background: #eef2ff;
}

.cm-course-hero img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  display: block;
}

.cm-schedule-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 2rem;
  background: rgba(47, 102, 242, 0.1);
  font-weight: 700;
  font-size: 0.85rem;
}
