/* ============================================================
   Judith Rooster — Frontend schedule (time-axis grid)
   ============================================================ */

/* ── Filter chips ────────────────────────────────────────────── */
.jr-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.jr-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}
.jr-chip:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.3);
}

/* "Alle" chip active */
.jr-chip--all.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #06141d;
  font-weight: 500;
}

/* Lesson chip active — uses --c set inline */
.jr-chip:not(.jr-chip--all).active {
  background: color-mix(in srgb, var(--c) 22%, transparent);
  border-color: var(--c);
  color: color-mix(in srgb, var(--c) 80%, #ffffff);
}

/* Colored dot inside each lesson chip */
.jr-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--c);
  flex-shrink: 0;
}

/* ── Calendar grid container ─────────────────────────────────── */
/* grid-template-columns and grid-template-rows injected inline   */
/* by PHP since repeat() cannot use CSS custom properties.        */
.jr-cal {
  display: grid;
  gap: 1px;
  background: var(--line);       /* shows through 1px gaps as separators */
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 12px;
  position: relative;
}

/* ── Corner cell (row 1 / col 1) ─────────────────────────────── */
.jr-cal__corner {
  background: var(--bg-elev);
}

/* ── Day-name headers (row 1 / col 2-N) ─────────────────────── */
.jr-cal__head {
  background: var(--bg-elev);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ── Time axis (row 2 / col 1) ───────────────────────────────── */
.jr-cal__axis {
  background: var(--bg-elev);
  position: relative;
  overflow: hidden;
}

.jr-cal__tick {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);   /* center text on the grid line */
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
}

/* ── Break indicators (between non-contiguous hour segments) ─── */
.jr-cal__break-tick {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--fg-muted);
  opacity: 0.5;
  line-height: 1;
  letter-spacing: 0.15em;
}

.jr-cal__break-line {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.jr-cal__break-line::after {
  content: '';
  flex: 1;
  border-top: 1px dashed color-mix(in srgb, var(--line-strong) 40%, transparent);
}

/* ── Day columns (row 2 / col 2-N) ──────────────────────────── */
.jr-cal__day {
  background: var(--bg);
  position: relative;
  /* Horizontal grid lines via repeating gradient                 */
  /* Period = 56px (1 hour). Strong line at :00, subtle at :30.  */
  background-image:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.10) 0px, rgba(255, 255, 255, 0.10) 1px,
      transparent 1px, transparent 80px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0px, transparent 40px,
      rgba(255, 255, 255, 0.04) 40px, rgba(255, 255, 255, 0.04) 41px,
      transparent 41px, transparent 80px
    );
}

/* ── Session blocks ──────────────────────────────────────────── */
.jr-cal__session {
  position: absolute;
  background: color-mix(in srgb, var(--c) 22%, var(--bg, #0a0a0c));
  border-left: 3px solid var(--c);
  border-radius: 0 4px 4px 0;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.12s;
  z-index: 2;
  box-sizing: border-box;
}
.jr-cal__session:hover {
  filter: brightness(1.3);
  transform: scaleX(1.02);
  z-index: 5;
}

/* Session name */
.jr-cal__sn {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.15;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Session time */
.jr-cal__st {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  color: color-mix(in srgb, var(--c) 75%, #ffffff);
  letter-spacing: 0.03em;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Coach name */
.jr-cal__sc {
  font-size: 10px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Filtered-out sessions */
.jr-cal__session[hidden]          { display: none; }
.jr-cal-mobile__slot[hidden]      { display: none; }

/* ── Mobile: stacked list ────────────────────────────────────── */
.jr-cal-mobile {
  display: none;
  flex-direction: column;
  gap: 32px;
}

.jr-cal-mobile__day h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.jr-cal-mobile__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.jr-cal-mobile__slot {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  background: color-mix(in srgb, var(--c) 18%, var(--bg-panel, #16161d));
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  border-left: 3px solid var(--c);
  border-radius: 8px;
  text-decoration: none;
  transition: filter 0.15s;
}
.jr-cal-mobile__slot:hover { filter: brightness(1.2); }

.jr-cal-mobile__time {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: color-mix(in srgb, var(--c) 75%, #ffffff);
}

.jr-cal-mobile__name {
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
}

.jr-cal-mobile__coach {
  font-size: 12px;
  color: var(--fg-dim);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .jr-cal        { display: none; }
  .jr-cal-mobile { display: flex; }
}
