/* Расписание ВКК — только блок расписания. Шапку, подвал, шрифты и сетку даёт тема
   колледжа (css_* из /static/vkk/, как на www.koper35.ru). Здесь — выбор и дни занятий. */

:root {
  --blue: #00528c;
  --green: #09aa70;
  --green-dark: #067a50;
  --ink: #3d3934;
  --muted: #7d7d7d;
  --line: #e0e2e4;
  --head: #f4f4f4;
  --stripe: #fafafa;
  --serif: "Benguiat Rus", "Times New Roman", Georgia, serif;
}

[hidden] { display: none !important; }

/* Прижатый подвал поверх темы */
body { display: flex; flex-direction: column; min-height: 100vh; }
.dialog-off-canvas-main-canvas, .page { display: flex; flex-direction: column; flex: 1 0 auto; min-width: 0; }
.page-content { flex: 1 0 auto; }
.footer { flex-shrink: 0; }

.rasp { margin: 8px 0 60px; letter-spacing: normal; }

/* --- панель выбора: группа/преподаватель, неделя --------------------------- */

.rasp__bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 28px;
  padding: 0 0 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line);
}
.rasp__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rasp__label { font-size: 13px; color: var(--muted); }

.rasp__tabs { display: flex; align-self: stretch; align-items: flex-end; }
.rasp__tab {
  min-height: 44px; padding: 0 20px; border: 1px solid #cdd2d6; background: #fff;
  font-size: 15px; color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.rasp__tab + .rasp__tab { border-left: 0; }
.rasp__tab:first-child { border-radius: 2px 0 0 2px; }
.rasp__tab:last-child { border-radius: 0 2px 2px 0; }
.rasp__tab:hover { color: var(--blue); }
.rasp__tab[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }

.rasp__select {
  height: 44px; max-width: 100%; padding: 0 40px 0 14px; border: 1px solid #cdd2d6; border-radius: 2px;
  background: #fff; color: var(--ink); font-size: 15px; line-height: 1.2;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%2300528c' stroke-width='2' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
#who { min-width: 260px; }
.rasp__select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 1px var(--blue); }

.rasp__week { display: flex; align-items: stretch; }
.rasp__select--week { min-width: 230px; border-radius: 0; }
.rasp__step {
  width: 44px; flex: none; border: 1px solid #cdd2d6; background: #fff no-repeat center / 8px 12px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 12'%3E%3Cpath fill='none' stroke='%2300528c' stroke-width='2' d='M7 1 2 6l5 5'/%3E%3C/svg%3E");
  transition: background-color .2s;
}
.rasp__step:hover { background-color: #e5eef4; }
.rasp__step:disabled { opacity: .4; cursor: default; background-color: #fff; }
.rasp__step--prev { border-radius: 2px 0 0 2px; border-right: 0; }
.rasp__step--next { border-radius: 0 2px 2px 0; border-left: 0; transform: scaleX(-1); }

/* --- неделя занятий -------------------------------------------------------- */

.rasp__out { transition: opacity .15s; }
.rasp__out.is-loading { opacity: .4; }

.result__head { margin-bottom: 20px; }
.result__head h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 0 0 6px; color: var(--ink); }
.result__meta { margin: 0; color: var(--muted); font-size: 15px; }
.result__stamp { margin: 20px 0 0; font-size: 13px; color: var(--muted); }

.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
.days--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.days--1, .days--2, .days--3, .days--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.day { border: 1px solid var(--line); background: #fff; min-width: 0; }
.day__head { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; background: var(--head); }
.day__name { font-weight: 500; }
.day__date { font-size: 13px; color: var(--muted); }
.day.is-today { border-color: var(--blue); }
.day.is-today .day__head { background: var(--blue); color: #fff; }
.day.is-today .day__date { color: rgba(255, 255, 255, .85); }

.day__list { list-style: none; margin: 0; padding: 0; }
.day__empty { padding: 13px 12px; color: var(--muted); font-size: 14px; }

.les { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-top: 1px solid var(--line); }
.les:nth-child(even) { background: var(--stripe); }
.les__n { flex: none; width: 26px; font-weight: 700; color: var(--blue); line-height: 1.35; }
.les__n--time { width: 40px; font-size: 12px; padding-top: 2px; }
.les__main { flex: 1 1 auto; min-width: 0; }
.les__subj { font-size: 14px; line-height: 1.3; overflow-wrap: break-word; }
.les__meta { margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--muted); }
.les__who + .les__room::before { content: " · "; }
.les__room { color: var(--green-dark); white-space: nowrap; }
.les--event .les__n:empty { display: none; }
.les--event .les__subj { font-weight: 500; }
.tag { display: inline-block; margin-left: 6px; padding: 0 5px; border: 1px solid #ccd0d3; font-size: 11px; line-height: 16px; color: var(--muted); white-space: nowrap; vertical-align: 1px; }

.rasp__note {
  margin: 0; padding: 26px 22px; background: var(--head); color: var(--ink); font-size: 15px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.rasp__note p { margin: 0; }
/* кнопка .btn — из темы колледжа (зелёная); доп. вид для «обычной» кнопки */
.btn--plain { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px #cdd2d6; }
.btn--plain:hover { background: var(--head); color: var(--ink); }

/* --- телефон --------------------------------------------------------------- */

@media (max-width: 767px) {
  .rasp__bar { gap: 14px; }
  .rasp__field { width: 100%; }
  .rasp__tabs { width: 100%; }
  .rasp__tab { flex: 1 1 0; }
  #who, .rasp__select--week { min-width: 0; width: 100%; }
  .rasp__week { width: 100%; }
  .rasp__select--week { flex: 1 1 auto; }
  .days, .days--6 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .les__subj { font-size: 15px; }
  .les__meta { font-size: 13px; }
}

@media print {
  .header, .footer, .region-breadcrumb, .rasp__bar, .result__stamp { display: none !important; }
  .rasp { margin: 0; }
  .days, .days--6 { grid-template-columns: repeat(3, 1fr); gap: 8pt; }
  .day { break-inside: avoid; }
  .day.is-today { border-color: var(--line); }
  .day.is-today .day__head { background: var(--head); color: inherit; }
}

/* --- встраивание в сайт колледжа (iframe): без своей шапки/подвала ---------- */
.embed .header, .embed .footer, .embed .region-breadcrumb, .embed .region-title { display: none; }
.embed .page-content { padding: 0; }
.embed .rasp { margin-top: 4px; }
