@charset "UTF-8";

/* Date sub pages (training plans): next date card, entries grouped by month on the timeline of the chronicle
   (.history-line, .history-label, .history-item, .history-card from history-2.css; date and time above the title),
   form button in the management box.
   Cards and notes reuse .contact-card, .contact-note, .contact-area, .contact-name, .contact-role (contact-2.css). */
.events-page .events-intro { margin: 0 0 8px; }
.events-years { max-width: 720px; margin: 8px 0 4px; }
.events-years.is-forward { text-align: right; } /* button to the following year on the right, back on the left */
/* in the line of the checkbox "Vergangene Termine anzeigen" (it must stay a sibling of the blocks it hides, so the
   button lies over the right end of that line instead of sharing a wrapper with it) */
.events-years.is-beside-toggle { height: 0; margin: 0; position: relative; z-index: 1; }
.events-list > .events-change-note:first-child { margin-top: 8px; }
.events-page .events-manage-form { display: contents; margin: 0; }
/* masks of termine.php: return link and management box above the grey frame of the mask (floats like div.inhalt) */
#thwDoubleCol .events-mask-head { float: left; width: 100%; box-sizing: border-box; margin-top: 30px; }
#thwDoubleCol .events-mask-head .fleet-manage { margin: 0; }
.events-page .events-manage-form button { cursor: pointer; font-family: inherit; font-size: 16px; }
.events-next { display: block; max-width: 720px; text-decoration: none; color: #202020; }
.events-next:hover .contact-name, .events-next:focus .contact-name { text-decoration: underline; }
.events-next:focus-visible { outline: 3px solid #ffe600; outline-offset: 1px; }
.events-next .contact-area, .events-next .contact-name, .events-next .contact-role { display: block; }
.events-next .contact-name { font-size: 20px; color: #039; }
.events-next + .events-next { margin-top: 10px; }
.events-past-toggle { width: 24px; height: 24px; margin: 10px 8px 10px 0; vertical-align: middle; accent-color: #039; }
.events-past-toggle:focus-visible { outline: 3px solid #ffe600; outline-offset: 2px; }
.events-past-label { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; color: #039; font-weight: bold; cursor: pointer; }
.events-list { max-width: 720px; margin-bottom: 16px; }
.events-past-toggle:not(:checked) ~ .events-list .is-past { display: none; }
.events-past-toggle:not(:checked) ~ .events-next-block, .events-past-toggle:not(:checked) ~ .events-upcoming-title { display: none; }
.events-list .history-line { margin-top: 16px; }
.events-past-toggle:not(:checked) ~ .events-list .is-first-upcoming { padding-top: 0; }
.events-month-title { margin: 0; font-size: inherit; line-height: inherit; }
.events-entry { scroll-margin-top: 16px; }
.events-entry:target .history-card { outline: 3px solid #ffe600; outline-offset: 1px; }
/* date and time as in the card "Nächster Termin" (.contact-area), not bold blue as in the chronicle */
.events-list time.events-when { font-weight: normal; font-size: 12px; line-height: 1.3; text-transform: uppercase; letter-spacing: 1px; color: #53616b;
  white-space: normal; }
/* next date: thicker line on top as the card "Nächster Termin" (.contact-card.is-address); the arrow moves up by the
   3 px the padding box moves down, so it stays at the dot */
.events-entry.is-next .history-card { border-top-width: 5px; }
.events-entry.is-next .history-card::before { top: 18px; }
.events-entry.is-next .history-card::after { top: 19px; }
.history-card .events-next-badge { display: inline-block; margin: 0 0 6px; padding: 2px 10px; background: #039; color: #fff; font-size: 14px;
  line-height: 1.4; font-weight: bold; }
.events-title { margin: 3px 0 0; font-size: 18px; line-height: 1.3; font-weight: bold; color: #202020; overflow-wrap: anywhere; }
.events-meta { display: block; margin-top: 3px; font-size: 16px; line-height: 1.4; color: #53616b; overflow-wrap: anywhere; }
.events-notice { font-style: italic; }
.events-page .contact-note { max-width: 720px; box-sizing: border-box; }

@container (max-width: 420px) {
  .events-list time.events-when { letter-spacing: 0.5px; }
  .events-next { padding: 10px 12px; }
  .events-next .contact-name { font-size: 18px; }
}

/* Overview: slider Monat / Liste (the track, labels and thumb are .units-switch* from units-2.css), month calendar as CSS
   grid, list cards with search and filter bar, legend. The markers use the colours of layout-2.css (.oeffentlich, .intern, .b1, ...). */
.events-overview .fleet { container-type: inline-size; }
.events-switch-form { margin: 8px 0 12px; }
.events-switch { max-width: 360px; }
#events-view-list:checked ~ .units-switch-thumb { transform: translateX(100%); }
.events-dot { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.35); box-sizing: border-box; }
.events-cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.events-cal-nav .fleet-button { min-width: 44px; min-height: 44px; justify-content: center; }
.events-cal-nav .is-disabled { opacity: 0.4; cursor: default; }
.events-cal-title-month { flex: 1 1 auto; margin: 0; text-align: center; font-size: 20px; color: #039; }
.events-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 2px solid #039; border-left: 2px solid #039; }
.events-cal-head { padding: 6px 2px; text-align: center; font-weight: bold; color: #fff; background: #039; border-right: 2px solid #039; }
.events-cal-day { position: relative; min-height: 96px; padding: 4px; box-sizing: border-box; background: #fff; border-right: 2px solid #039; border-bottom: 2px solid #039;
  display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.events-cal-day.is-other { background: #f1f3f5; color: #8a949b; }
.events-cal-day.is-off { background: #fdeeee; }
.events-cal-day.is-today { box-shadow: inset 0 0 0 3px #ffe600; background: #eaf0fa; }
.events-cal-num { font-weight: bold; font-size: 15px; color: #202020; }
.events-cal-day.is-off .events-cal-num { color: #b00000; }
.events-cal-wd { display: none; }
.events-cal-special { font-size: 12px; line-height: 1.25; color: #53616b; overflow-wrap: anywhere; }
.events-cal-day.is-off .events-cal-special { color: #b00000; }
.events-cal-item { display: flex; align-items: flex-start; gap: 4px; padding: 2px 3px; background: #eaf0fa; border-left: 3px solid #039; font-size: 13px; line-height: 1.25;
  color: #039; font-weight: bold; text-decoration: none; overflow-wrap: anywhere; }
.events-cal-item:hover, .events-cal-item:focus { text-decoration: underline; }
.events-cal-item:focus-visible, .events-card:focus-visible { outline: 3px solid #ffe600; outline-offset: 1px; }
.events-dots { display: inline-flex; flex-wrap: wrap; gap: 2px; padding-top: 2px; }
.events-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; }
.events-legend li { display: inline-flex; align-items: center; gap: 6px; }
.events-card { display: flex; gap: 14px; max-width: 720px; margin: 0 0 10px; padding: 12px 14px; box-sizing: border-box; background: #fff; border: 2px solid #039;
  color: #202020; text-decoration: none; }
.events-card.is-next { border-top-width: 5px; }
.events-card:hover .events-card-title, .events-card:focus .events-card-title { text-decoration: underline; }
.events-card-date { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 64px; min-height: 64px; background: #039; color: #fff; }
.events-card-date b { font-size: 26px; line-height: 1; }
.events-card-date span { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.events-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.events-card-body .events-next-badge { align-self: flex-start; padding: 2px 10px; background: #039; color: #fff; font-size: 14px; line-height: 1.4; font-weight: bold; }
.events-card-title { font-size: 18px; line-height: 1.3; font-weight: bold; color: #039; overflow-wrap: anywhere; }
.events-card-when, .events-card-meta { font-size: 16px; line-height: 1.4; color: #53616b; }
.events-card-groups { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; color: #202020; }
.events-card-groups li { display: inline-flex; align-items: center; gap: 5px; }
.events-more { margin: 14px 0; }
.events-overview .events-more .fleet-button { min-height: 44px; }
.events-overview .events-more .fleet-button.is-loading { opacity: 0.6; cursor: progress; }
/* filter of both views: search form (.news-search of news-4.css) and filter bar (.fleet-filter) above the slider */
.events-overview .events-search, .events-overview .fleet-filter, .events-overview .events-result { max-width: 720px; }
.events-overview .fleet-filter { margin-bottom: 14px; }
/* note on changes directly above the calendar or the cards */
.events-overview .events-change-note { margin: 12px 0; }
.events-card:focus { outline: 3px solid #ffe600; outline-offset: 1px; }

/* narrow container: the month grid shows only the markers (titles for screen readers), the cards get smaller */
@container (max-width: 560px) {
  .events-cal-day { min-height: 56px; padding: 2px; }
  .events-cal-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .events-cal-item { min-height: 44px; padding: 4px 3px; border-left-width: 2px; }
  .events-cal-special { font-size: 10px; }
  .events-card { gap: 10px; padding: 10px; }
  .events-card-date { width: 52px; min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { #events-view-list:checked ~ .units-switch-thumb { transition: none; } }
