/* =====================================================================
   รอบ 129b: ตั้งเวลาส่งรายงานทาง Telegram (prefix rsch-)
   - ป๊อปอัปจากปุ่มในหน้ารายงาน (ReportScheduleButton.razor)
   - การ์ด "รายงานที่ตั้งเวลาไว้" ในหน้า Telegram (ReportScheduleList.razor — วางใน .tg-grid area "sched" ของ telegram.css)
   - สีใช้ตัวแปรของธีมทั้งหมด (โหมดมืดใช้ตัวแปรเดียวกัน) · มือถือ ≤760px คอลัมน์เดียว ไม่เลื่อนแนวนอน
   ===================================================================== */

@media screen {
  .rsch-btn { display: inline-flex; align-items: center; gap: 6px; }

  /* ---------- ป๊อปอัป ---------- */
  .rsch-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .rsch-what { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--bg); min-width: 0; }
  .rsch-what strong { font-size: .98rem; overflow-wrap: anywhere; }
  .rsch-what small { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
  .rsch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
  .rsch-grid .rsch-wide { grid-column: 1 / -1; }
  .rsch-grid select { width: 100%; min-width: 0; }
  .rsch-hint { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
  .rsch-warn {
    margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-text, #7a5300);
    font-size: .84rem; line-height: 1.45; overflow-wrap: anywhere;
  }

  /* ---------- รายการในหน้า Telegram ---------- */
  .rsch-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px; background: var(--bg); }
  .rsch-empty p { margin: 0; color: var(--muted); font-size: .88rem; }
  .rsch-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; align-items: start; }
  .rsch-item {
    display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  }
  .rsch-item.off { background: var(--bg); }
  .rsch-item.off .rsch-item-title strong { color: var(--muted); }
  .rsch-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .rsch-item-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .rsch-item-title strong { font-size: .95rem; overflow-wrap: anywhere; }
  .rsch-item-title small { color: var(--muted); font-size: .8rem; }
  .rsch-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; margin: 0; }
  .rsch-meta div { min-width: 0; }
  .rsch-meta dt { color: var(--muted); font-size: .74rem; }
  .rsch-meta dd { margin: 0; font-size: .84rem; overflow-wrap: anywhere; }
  .rsch-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line); }
  .rsch-gap { flex: 1 1 auto; }
  .rsch-del { color: var(--danger); }

  @media (max-width: 760px) {
    .rsch-grid { grid-template-columns: minmax(0, 1fr); }
    .rsch-meta { grid-template-columns: minmax(0, 1fr); }
    .rsch-item { padding: 12px; }
    .rsch-gap { display: none; }
    .rsch-foot .btn { flex: 1 1 0; min-height: 40px; justify-content: center; }
  }
}
