/* Courses 2026: course overview (block courselist) + registration form extras */
:root {
  --course-blue: #002d4e;
  --course-free: #1e9e4a;
  --course-booked: #d0312d;
  --course-done: #9aa3ab;
  --course-grey-bg: #f2f4f6;
}

/* ---- Overview ---------------------------------------------------------- */
.courselist__course {
  padding: 4.5rem 0;
}
/* Every second course on a full-width grey band (no horizontal overflow). */
.courselist__course:nth-child(even) {
  background: var(--course-grey-bg);
  box-shadow: 0 0 0 100vmax var(--course-grey-bg);
  clip-path: inset(0 -100vmax);
}
.courselist__title {
  margin-bottom: 2.5rem;
}
.courselist__datesTitle {
  margin: 0 0 0.9rem;
}
.courselist__table {
  border-top: 2px solid var(--course-blue);
  margin-bottom: 2rem;
}
.courselist__date {
  display: grid;
  /* minmax(0, …) so every row gets identical column widths, independent of its content */
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr) minmax(0, 1.1fr) minmax(0, 1.4fr) minmax(0, 1.6fr);
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 2px solid var(--course-blue);
  color: var(--course-blue);
}
.courselist__cell--date,
.courselist__cell--type {
  font-weight: 700;
}
.courselist__cell--hotel a,
.courselist__cell--status a,
.courselist__statusText {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.courselist__cell--status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.courselist__dot {
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: currentColor;
}
.courselist__date--free .courselist__cell--status {
  color: var(--course-free);
}
.courselist__date--booked .courselist__cell--status {
  color: var(--course-booked);
}
.courselist__date--done,
.courselist__date--done .courselist__cell--status {
  color: var(--course-done);
}

/* «Mehr Infos» accordion */
.courselist__more {
  margin-top: 3.5rem;
  border-top: 2px solid var(--course-blue);
  border-bottom: 2px solid var(--course-blue);
}
.courselist__moreToggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
}
.courselist__moreToggle::-webkit-details-marker {
  display: none;
}
.courselist__moreTitle {
  margin: 0;
}
.courselist__chevron {
  width: 0.7rem;
  height: 0.7rem;
  margin: 0 0.4rem 0.35rem 0;
  border-right: 2px solid var(--course-blue);
  border-bottom: 2px solid var(--course-blue);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.courselist__more[open] .courselist__chevron {
  transform: rotate(-135deg);
  margin-bottom: -0.2rem;
}
.courselist__moreBody {
  padding-bottom: 1.5rem;
}

@media (max-width: 767px) {
  .courselist__course {
    padding: 3rem 0;
  }
  .courselist__date {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 0.35rem;
  }
  .courselist__cell--date {
    grid-column: 1 / -1;
  }
}

/* ---- Registration form ------------------------------------------------- */
.course-selections__empty {
  font-weight: 700;
}
.course-participants {
  margin: 0.25rem 0 1.5rem;
}
.course-participants__row {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #d5dbe0;
}
.course-participants__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--course-blue);
}
.course-participants__remove,
.course-participants__add {
  padding: 0;
  border: 0;
  background: none;
  color: var(--course-blue);
  font: inherit;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
}
/* Anrede alone on its row (half-width input), Vorname | Nachname below. */
.registration-section .row-wrapper > [class*="col-item-md-"]:has(> .form-group > label[for="lbl-01"]) {
  flex: 0 0 100%;
  max-width: 100%;
}
.registration-section .row-wrapper > [class*="col-item-md-"]:has(> .form-group > label[for="lbl-01"]) > .form-group {
  max-width: 41.6667%;
}
@media (max-width: 767px) {
  .registration-section .row-wrapper > [class*="col-item-md-"]:has(> .form-group > label[for="lbl-01"]) > .form-group {
    max-width: none;
  }
}
.course-participants__remove {
  font-weight: 400;
  text-decoration: underline;
}
.course-participants__add {
  margin-top: 0.75rem;
  font-weight: 700;
}
.course-participants__add:hover,
.course-participants__add:focus-visible {
  text-decoration: underline;
}

/* Spacing between courses comes only from the padding above (the theme adds a margin). */
.courselist .courselist__course {
  margin-top: 0;
  margin-bottom: 0;
}
/* No white strip between a grey last course and the footer. */
.courselist:has(.courselist__course:last-child:nth-child(even)),
.courselist:has(.courselist__course:last-child:nth-child(even)) .courselist__wrapper {
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Notice when no course has upcoming dates. */
.courselist__empty {
  margin: 0;
  padding: 6rem 0;
  font-size: 2rem;
  line-height: 1.3;
  text-align: center;
  color: var(--course-blue);
}
@media (max-width: 767px) {
  .courselist__empty {
    padding: 4rem 0;
    font-size: 1.5rem;
  }
}

/* Course without upcoming dates: notice instead of the dates table. */
.courselist__noDates {
  margin: 0;
  font-size: 1.25rem;
  color: var(--course-blue);
}
