.enrollment-list {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  container-type: inline-size;
  container-name: enrollment-list;
}

.enrollment-list__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.enrollment-list__heading {
  margin: 0;
  padding: 0;
  line-height: 1.15;
  min-width: 0;
}

.enrollment-list__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.enrollment-list__row {
  display: grid;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border-bottom-style: solid;
  grid-template-areas: "date title location price register";
}

.enrollment-list__row:last-child {
  border-bottom: none;
}

.enrollment-list__date {
  grid-area: date;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.enrollment-list__day {
  margin: 0;
  padding: 0;
  line-height: 1;
}

.enrollment-list__month {
  margin: 0;
  padding: 0;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enrollment-list__title {
  grid-area: title;
  margin: 0;
  padding: 0;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

.enrollment-list__location {
  grid-area: location;
  margin: 0;
  padding: 0;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 0;
  overflow-wrap: break-word;
}

.enrollment-list__price {
  grid-area: price;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  white-space: nowrap;
  text-align: right;
  justify-self: stretch;
  font-variant-numeric: tabular-nums;
}

.enrollment-list__register {
  grid-area: register;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  margin: 0;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  justify-self: end;
  transition: opacity 0.2s ease;
}

.enrollment-list__register--empty {
  pointer-events: none;
  visibility: hidden;
}

/* Enrollment closed: label only, no arrow, muted */
.enrollment-list__register--closed {
  opacity: 0.6;
}

.enrollment-list__register:hover {
  opacity: 0.75;
}

.enrollment-list__register-arrow {
  line-height: 1;
}

/*
  Mid width:
  [date] [title ........] [price]
  [date] [location]       [register]
*/
@container enrollment-list (max-width: 900px) {
  .enrollment-list__row {
    grid-template-columns: auto minmax(0, 1fr) max-content !important;
    grid-template-areas:
      "date title price"
      "date location register";
    align-items: start;
    column-gap: 1.25rem !important;
    row-gap: 0.35rem;
  }

  .enrollment-list__date {
    align-self: start;
  }

  .enrollment-list__day,
  .enrollment-list__day * {
    font-size: 1.5rem !important;
  }

  .enrollment-list__month,
  .enrollment-list__month * {
    font-size: 0.625rem !important;
  }

  .enrollment-list__title {
    align-self: end;
  }

  .enrollment-list__title,
  .enrollment-list__title *,
  .enrollment-list__title .hs_cos_wrapper {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
  }

  .enrollment-list__price {
    align-self: center;
    text-align: right;
    max-width: 10rem;
    justify-self: end;
  }

  .enrollment-list__price,
  .enrollment-list__price *,
  .enrollment-list__price .hs_cos_wrapper {
    font-size: 0.95rem !important;
  }

  .enrollment-list__location {
    align-self: start;
    text-align: left;
    margin-top: 0.15rem;
    justify-self: start;
    max-width: none;
  }

  .enrollment-list__location,
  .enrollment-list__location *,
  .enrollment-list__location .hs_cos_wrapper {
    font-size: 0.625rem !important;
    line-height: 1.35 !important;
  }

  .enrollment-list__register {
    align-self: center;
    justify-self: end;
  }

  .enrollment-list__register,
  .enrollment-list__register *,
  .enrollment-list__register .hs_cos_wrapper {
    font-size: 0.625rem !important;
  }
}

@container enrollment-list (max-width: 520px) {
  .enrollment-list__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .enrollment-list__row {
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-areas:
      "date title"
      "date price"
      "date location"
      "date register";
    column-gap: 1rem !important;
    row-gap: 0.35rem;
  }

  .enrollment-list__location {
    max-width: none;
  }

  .enrollment-list__price,
  .enrollment-list__register {
    justify-self: start;
  }
}

@supports not (container-type: inline-size) {
  @media (max-width: 1000px) {
    .enrollment-list__row {
      grid-template-columns: auto minmax(0, 1fr) max-content !important;
      grid-template-areas:
        "date title price"
        "date location register";
      align-items: start;
      column-gap: 1.25rem !important;
      row-gap: 0.35rem;
    }

    .enrollment-list__date { align-self: start; }
    .enrollment-list__day,
    .enrollment-list__day * { font-size: 1.5rem !important; }
    .enrollment-list__month,
    .enrollment-list__month * { font-size: 0.625rem !important; }
    .enrollment-list__title { align-self: end; }
    .enrollment-list__title,
    .enrollment-list__title *,
    .enrollment-list__title .hs_cos_wrapper {
      font-size: 0.95rem !important;
      line-height: 1.3 !important;
    }
    .enrollment-list__price {
      align-self: center;
      text-align: right;
      max-width: 10rem;
      justify-self: end;
    }
    .enrollment-list__price,
    .enrollment-list__price *,
    .enrollment-list__price .hs_cos_wrapper {
      font-size: 0.95rem !important;
    }
    .enrollment-list__location {
      align-self: start;
      text-align: left;
      margin-top: 0.15rem;
      justify-self: start;
      max-width: none;
    }
    .enrollment-list__location,
    .enrollment-list__location *,
    .enrollment-list__location .hs_cos_wrapper {
      font-size: 0.625rem !important;
    }
    .enrollment-list__register { align-self: center; justify-self: end; }
    .enrollment-list__register,
    .enrollment-list__register *,
    .enrollment-list__register .hs_cos_wrapper {
      font-size: 0.625rem !important;
    }
  }

  @media (max-width: 540px) {
    .enrollment-list__header {
      flex-direction: column;
      align-items: flex-start;
    }

    .enrollment-list__row {
      grid-template-columns: auto minmax(0, 1fr) !important;
      grid-template-areas:
        "date title"
        "date price"
        "date location"
        "date register";
      column-gap: 1rem !important;
      row-gap: 0.35rem;
    }

    .enrollment-list__location { max-width: none; }
    .enrollment-list__price,
    .enrollment-list__register { justify-self: start; }
  }
}
