/* Übersicht /wissen (wissen.php): Titelband mit Fristenjahr, darunter das Verzeichnis der Vorgaben.
   Aufbau mit Bootstrap 5.0.2; hier nur Zeitachse, Verzeichniszeilen und Farben. */

.wu {
  /* Modulfarben, aufgehellt für den dunklen Grund */
  --wu-qs-light: hsl(195, 70%, 64%);
  --wu-qbm-light: hsl(356, 65%, 74%);
  --wu-muted: rgba(255, 255, 255, 0.72);
}

.wu-muted {
  color: var(--wu-muted);
}

.wu-band h1 {
  text-wrap: balance;
}

/* ---------- Fristenjahr ---------- */

.wu-year a {
  color: inherit;
  text-decoration: none;
}

.wu-year a:hover,
.wu-year a:focus {
  text-decoration: underline;
}

.wu-tag {
  font-weight: 700;
}

.wu-tag.qs {
  color: var(--wu-qs-light);
}

.wu-tag.qbm {
  color: var(--wu-qbm-light);
}

/* Schmal: Liste nach Datum */
.wu-list > li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.25rem 1rem;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Breit (ab 1200 px): Zeitachse über das Jahr */
@media (min-width: 1200px) {
  .wu-axis {
    position: relative;
    height: 22rem;
  }

  /* Monatsraster */
  .wu-months {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    border-top: 2px solid rgba(255, 255, 255, 0.55);
  }

  .wu-months span {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.35rem 0 0 0.4rem;
    font-size: 0.75rem;
    color: var(--wu-muted);
  }

  /* Termin: Punkt auf der Achse, Linie zum Text darüber oder darunter */
  .wu-ev {
    position: absolute;
    left: var(--x);
    top: 50%;
    width: var(--w, 0px);
  }

  .wu-ev::before {
    content: "";
    position: absolute;
    left: -0.375rem;
    top: -0.375rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: var(--wu-c);
    box-shadow: 0 0 0 3px var(--promato-color);
    z-index: 2;
  }

  /* Zeitraum: Balken auf der Achse */
  .wu-ev.wu-range::before {
    left: 0;
    width: 100%;
    height: 0.5rem;
    top: -0.25rem;
    border-radius: 0.25rem;
    box-shadow: none;
  }

  .wu-ev .wu-text {
    position: absolute;
    left: 0;
    width: 9.5rem;
    padding-left: 0.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 0.875rem;
    line-height: 1.35;
  }

  .wu-up .wu-text {
    bottom: 0.75rem;
  }

  .wu-down .wu-text {
    top: 2.25rem;
  }

  /* Stufen, damit nah beieinanderliegende Termine sich nicht überdecken */
  .wu-up.wu-l2 .wu-text {
    bottom: 5.5rem;
  }

  /* Rechts am Jahresende: Text nach links ausrichten */
  .wu-ev.wu-end .wu-text {
    left: auto;
    right: 0;
    padding-left: 0;
    padding-right: 0.6rem;
    border-left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.35);
    text-align: right;
  }

  .wu-ev.qs {
    --wu-c: var(--wu-qs-light);
  }

  .wu-ev.qbm {
    --wu-c: var(--wu-qbm-light);
  }

  /* Heute */
  .wu-today {
    position: absolute;
    left: var(--x);
    top: calc(50% - 1.5rem);
    height: 3rem;
    border-left: 2px dotted #fff;
  }

  .wu-today span {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
  }
}

/* Ab 1200 px zeigt die Zeitachse die Termine; die Liste bleibt für Screenreader lesbar */
@media (min-width: 1200px) {
  .wu-list {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

/* ---------- Verzeichnis ---------- */

.wu-reg-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid #dee2e6;
  color: inherit;
  font-weight: 400;
  text-decoration: none;
}

.wu-reg-row span {
  font-weight: 400;
}

.wu-reg-row:last-child {
  border-bottom: 1px solid #dee2e6;
}

.wu-reg-row .wu-reg-kurz {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--qs-color);
}

.wu-reg-row.qbm .wu-reg-kurz {
  color: var(--qbm-color);
}

.wu-reg-row .wu-reg-name,
.wu-reg-row strong {
  font-weight: 700;
  color: var(--promato-color);
}

.wu-reg-row:hover .wu-reg-name,
.wu-reg-row:focus .wu-reg-name {
  text-decoration: underline;
}

.wu-reg-row:focus-visible {
  outline: 2px solid var(--qs-color);
  outline-offset: 4px;
}

@media (min-width: 768px) {
  .wu-reg-row {
    grid-template-columns: 13rem 1fr 11rem;
    align-items: baseline;
  }

  .wu-reg-row .wu-reg-kurz {
    font-size: 2.5rem;
  }
}
