/* ══════════════════════════════════════════
   Timetable — desktop proportional grid + mobile list
══════════════════════════════════════════ */

/* ─── Desktop (≥ 701px) ─────────────────── */
.tt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tt-day-header-row {
  display: grid;
  grid-template-columns: 3.25rem repeat(5, 1fr);
  border-bottom: 1px solid var(--b1);
  flex-shrink: 0;
}
.tt-head-spacer {
  background: var(--s2);
  border-right: 1px solid var(--b1);
  padding: 0.625rem 0;
}
.tt-head-day {
  background: var(--s2);
  border-right: 1px solid var(--b1);
  padding: 0.625rem 0.5rem; text-align: center;
  font-size: 0.75rem; font-weight: 600; color: var(--t2);
  text-transform: uppercase; letter-spacing: .5px;
}
.tt-head-day:last-child    { border-right: none; }
.tt-head-day.tt-today-col  { color: var(--ac); background: rgba(99,102,241,.07); }

/* Time axis column */
.tt-time-col {
  position: relative;
  border-right: 1px solid var(--b1);
  background: var(--s2);
}
.tt-hour-label {
  position: absolute; right: 0.375rem;
  font-size: 0.625rem; color: var(--t3);
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%); line-height: 1;
}

/* Day columns */
.tt-day-col {
  position: relative;
  border-right: 1px solid var(--b1);
}
.tt-day-col:last-child    { border-right: none; }
.tt-day-col.tt-today-col  { background: rgba(99,102,241,.025); }

/* Hour grid lines */
.tt-hour-line      { position: absolute; left: 0; right: 0; height: 1px; background: var(--b1); pointer-events: none; }
.tt-hour-line.half { background: rgba(255,255,255,.03); }

/* Lesson block */
.tt-block {
  position: absolute; left: 0.25rem; right: 0.25rem;
  border-radius: var(--rxs);
  padding: 0.3125rem 0.4375rem;
  overflow: hidden; cursor: default;
  border-left: 3px solid transparent;
  display: flex; flex-direction: column; justify-content: flex-start;
  transition: filter var(--tr), transform var(--tr), box-shadow var(--tr);
}
.tt-block:hover {
  filter: brightness(1.2);
  transform: scaleX(.98);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  z-index: 2;
}
.tt-block-name    { font-size: 0.75rem; font-weight: 700; line-height: 1.2; }
.tt-block-room    { font-size: 0.65625rem; opacity: .7; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block-teacher { font-size: 0.625rem; opacity: .55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-block-time    { font-size: 0.625rem; opacity: .55; margin-top: 0.125rem; }

/* Break block */
.tt-break {
  position: absolute; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center;
  border-top: 1px dashed rgba(255,255,255,.06);
  border-bottom: 1px dashed rgba(255,255,255,.06);
}
.tt-break span { font-size: 0.625rem; color: var(--t3); font-style: italic; opacity: .7; }

/* Current time indicator */
.tt-now-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--red); z-index: 10; pointer-events: none;
}
.tt-now-line::before {
  content: '';
  position: absolute; left: -0.25rem; top: -0.1875rem;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--red);
}

/* ─── Mobile (≤ 700px) ─────────────────── */
.tt-mobile { display: none; }

/* day-picker inside mobile timetable is always full-width */
.tt-mobile .day-picker  { width: 100%; justify-content: space-between; margin-bottom: 0.875rem; }
.tt-mobile .dp-days     { flex: 1; justify-content: space-evenly; }


.tt-mobile-list { display: flex; flex-direction: column; gap: 0.5rem; }
.ttm-block {
  display: flex; gap: 0.75rem; align-items: stretch;
  background: var(--s1); border: 1px solid var(--b1); border-radius: var(--rsm);
  padding: 0.875rem 1rem; transition: border-color var(--tr);
}
.ttm-block:hover        { border-color: var(--b2); }
.ttm-block.break-row    { opacity: .4; border-style: dashed; background: transparent; }
.ttm-accent { width: 3px; border-radius: 99px; flex-shrink: 0; }
.ttm-time   {
  font-size: 0.71875rem; color: var(--t3); width: 3.25rem; flex-shrink: 0;
  font-variant-numeric: tabular-nums; line-height: 1.4;
}
.ttm-info   { flex: 1; min-width: 0; }
.ttm-name   { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.1875rem; }
.ttm-detail { font-size: 0.75rem; color: var(--t3); display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ttm-dur    {
  margin-left: auto; flex-shrink: 0;
  font-size: 0.6875rem; color: var(--t3); align-self: flex-start;
  background: var(--s2); padding: 0.125rem 0.4375rem; border-radius: 99px;
}

/* ─── Breakpoint switch ────────────────── */
@media (max-width: 700px) {
  .tt-wrap   { display: none; }
  .tt-mobile { display: block; }
}
@media (min-width: 701px) {
  .tt-mobile { display: none; }
  .tt-wrap   { display: block; }
}
