/* Расписание открытых занятий и баннер на главной (templates/schedule/open, _banner.html). Заполняет З4: техплан открытого доступа, 2.9.
   Общие компоненты — components.css. Экраны расписания обёрнуты в .sched; баннер — .banner. Макет — design/prototype/src/open.html (экраны schedule, s-schedule, home). */

/* ===== Баннер сегодняшнего занятия на главной ученика =====
   Тёмная плашка в светлой теме и светлая в тёмной: фон и текст — пара --ink / --surf, поэтому
   подпись «Сегодня» того же цвета, что и текст (жёлтая из макета на светлом фоне не читается). */
.banner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: center; background: var(--ink); color: var(--surf); border-radius: var(--r); padding: 20px 24px; margin-bottom: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.banner::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--cta); opacity: 0.12; pointer-events: none; }
.banner .live { grid-column: 1; display: inline-flex; gap: 8px; align-items: center; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.banner .live i { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: banner-blink 1.6s ease-in-out infinite; }
@keyframes banner-blink { 50% { opacity: 0.25; } }
.banner b { grid-column: 1; font: 700 20px/1.25 var(--f-disp); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.banner .m { grid-column: 1; color: color-mix(in oklab, var(--surf) 70%, var(--ink)); font-size: 15px; }
.banner .go { grid-column: 2; grid-row: 1 / span 3; position: relative; z-index: 1; display: grid; gap: 10px; justify-items: center; }
.banner .wait { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; white-space: nowrap; }
.banner .wait .i { width: 18px; height: 18px; }
.banner .all { font-weight: 600; font-size: 14px; text-underline-offset: 3px; white-space: nowrap; }
.banner :is(.btn, .all):focus-visible { outline-color: var(--surf); }

/* ===== Расписание: дни и занятия ===== */
.sched .tools .chips { margin-bottom: 0; }
.day-h { font: 800 13px/1.4 var(--f-ui); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 26px 0 10px; }
.sched .day-h:first-of-type { margin-top: 6px; }
.sch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sch-ev { display: grid; grid-template-columns: 72px 6px minmax(0, 1fr) auto; gap: 16px; align-items: center; background: var(--surf); border-radius: var(--r-md); padding: 14px 18px; box-shadow: var(--shadow); }
.sch-ev .t b { display: block; font: 700 18px var(--f-disp); letter-spacing: -0.02em; white-space: nowrap; }
.sch-ev .t span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.sch-ev .sb { width: 6px; align-self: stretch; border-radius: 99px; background: var(--sc, var(--muted)); }
.sch-ev .d { min-width: 0; overflow-wrap: anywhere; }
.sch-ev .d > b { display: block; }
.sch-ev .m { color: var(--muted); font-size: 14px; }
.sch-ev.is-off .t, .sch-ev.is-off .d > b, .sch-ev.is-off .m { color: var(--muted); }
.sch-wait { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.sch-wait .i { width: 17px; height: 17px; }
.sch-remind { display: flex; gap: 8px; align-items: center; margin: 22px 0 0; color: var(--muted); font-size: 14px; }
.sch-remind .i { width: 17px; height: 17px; flex: none; }
.sch-remind a { color: var(--pri-ink); font-weight: 700; text-underline-offset: 3px; }

/* Тип занятия: интенсив и разбор — жёлтые, марафон — фиолетовый, олимпиада — синяя */
.ev-kind { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--warn-t); color: var(--warn-ink); margin-bottom: 4px; }
.ev-kind.k-marathon { background: var(--vio-t); color: var(--hist-ink); }
.ev-kind.k-olympiad { background: var(--tint); color: var(--pri-ink); }

/* ===== Управление (менеджер, руководитель): таблица, форма, вопрос перед отменой ===== */
.sch-tbl { min-width: 640px; } /* на узком экране таблица прокручивается внутри карточки (.card.flush) */
.sch-tbl .sch-when { white-space: nowrap; }
.sch-tbl tr.is-off .sch-when b, .sch-tbl tr.is-off .tt { color: var(--muted); }
.sch-acts { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.sched .check { margin: 4px 0 6px; }
.sched .two { align-items: start; } /* поля в паре разной высоты (у одного есть подсказка) — подписи на одной линии */

@media (max-width: 640px) {
  /* Телефон: время, полоска предмета и текст — в ряд, кнопка или «Ссылка в …» — строкой ниже */
  .sch-ev { grid-template-columns: 64px 5px minmax(0, 1fr); gap: 10px 12px; padding: 12px 14px; }
  .sch-ev .t b { font-size: 16px; }
  .sch-ev .sb { width: 5px; }
  .sch-ev .a { grid-column: 1 / -1; justify-self: start; }
  /* Баннер: кнопка (или «Ссылка в …») и «Всё расписание» — строкой под текстом */
  .banner { grid-template-columns: minmax(0, 1fr); padding: 18px 20px; }
  .banner .go { grid-column: 1; grid-row: auto; display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; margin-top: 4px; }
  .banner .all { padding: 11px 0; }
  .banner::after { right: -60px; top: -80px; width: 170px; height: 170px; }
}
