/* ============================================================================
   courses.css — صفحهٔ «مدیریت دروس»
   معادل دقیقِ CourseManagerSheet در ui/home/HomeScreen.kt — همان چیدمان:
   عنوان با آیکن دایره‌ای → فیلد نام → چیپ رنگ‌ها → ردیف آیکن‌ها →
   دکمهٔ پرعرض ۴۸px → لیست دروس.
   ========================================================================== */

.cs { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.cs-head { display: flex; align-items: center; gap: 10px; padding: 8px 2px 0; }
.cs-hic {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center; color: var(--primary);
  background: linear-gradient(140deg, rgba(var(--primary-rgb) / .26), rgba(var(--primary-rgb) / .1));
}
.cs-head b { display: block; font-size: 1.12rem; font-weight: 800; }
.cs-head span { font-size: .78rem; color: var(--muted); }

.cs-card {
  background: var(--surface); border: 1px solid var(--outline-v);
  border-radius: var(--r-lg, 22px); padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.cs-lb { font-size: .78rem; font-weight: 700; color: var(--muted); }
.cs-input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: .95rem;
  padding: 12px 14px; border-radius: 16px; color: var(--fg);
  background: var(--bg); border: 1px solid var(--outline);
  transition: border-color var(--t-fast);
}
.cs-input:focus { outline: none; border-color: color-mix(in srgb, var(--primary) 62%, transparent); }

/* FilterChip های رنگ */
.cs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-chip {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  font: inherit; font-size: .84rem; font-weight: 700; color: var(--fg);
  padding: 8px 13px; border-radius: var(--r-full);
  background: transparent; border: 1px solid var(--outline);
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.cs-chip i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.cs-chip.on { background: color-mix(in srgb, var(--primary) 16%, transparent); border-color: var(--primary); }
.cs-chip:active { transform: scale(.95); }

/* LazyRow آیکن‌ها */
.cs-icons {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px;
  scrollbar-width: none;
}
.cs-icons::-webkit-scrollbar { display: none; }
.cs-ic {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 0; font-size: 1.25rem; line-height: 1;
  background: color-mix(in srgb, var(--surface-v) 55%, transparent);
  transition: background var(--t-fast), transform var(--t-fast);
}
.cs-ic.on { background: color-mix(in srgb, var(--primary) 25%, transparent); }
.cs-ic:active { transform: scale(.92); }

/* دکمهٔ افزودن — ۴۸px پرعرض، دقیقاً مانند اندروید */
.cs-add {
  height: 48px; width: 100%; cursor: pointer; border: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-full); font: inherit; font-size: .95rem; font-weight: 800;
  background: var(--primary); color: var(--on-primary); box-shadow: var(--sh-sm);
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.cs-add:active { transform: scale(.97); }
.cs-add:disabled { opacity: .45; cursor: default; box-shadow: none; }

/* لیست دروس */
.cs-list { display: flex; flex-direction: column; gap: 8px; }
.cs-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  background: var(--surface); border: 1px solid var(--outline-v);
  border-radius: 18px;
  animation: csRow 220ms var(--e-decel) both;
}
@keyframes csRow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cs-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; display: block; }
.cs-emo { font-size: 1.1rem; line-height: 1; }
.cs-row b { font-size: .95rem; font-weight: 700; }
.cs-del {
  flex: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 0; background: transparent; color: var(--error);
  display: grid; place-items: center;
  transition: background var(--t-fast);
}
.cs-del:hover { background: color-mix(in srgb, var(--error) 14%, transparent); }
.cs-del:disabled { opacity: .4; cursor: default; }

/* overflow guards */
.cr-row > *, .cr-main, .cr-nm { min-width: 0; }
.cr-nm, .cr-sub { overflow-wrap: anywhere; }
