.cd-events {
  container-type: inline-size;
}

.cd-events > * + * {
  margin-top: var(--rhyme-sm);
}

.cd-event {
  grid-template-areas:
    "date title"
    "date status"
    "date links";
  grid-template-columns: 3.8em 1fr;
  column-gap: var(--rhyme-sm);
  display: grid;
  align-items: start;
  line-height: 1.15;
}

@container (min-width: 460px) {
  .cd-event {
    grid-template-areas:
        "date title status"
        "date links links";
    grid-template-columns: 3.8em 1fr min-content;
    column-gap: var(--rhyme-sm);
  }

  .cd-event__status {
    margin-top: 0;
    align-self: stretch;
    align-content: center;
    max-height: 4rem;
  }
}

@container (min-width: 720px) {
  .cd-event {
    grid-template-areas:
      "date title status links";
    grid-template-columns: 4rem 1fr max-content max-content;
    column-gap: var(--rhyme-sm);
  }
}

.cd-event__date-container {
  background-color: var(--color-primary);
  border-radius: var(--border-radius-sm);
  aspect-ratio: 1 / 1;
  width: 4rem;
  text-align: center;
  padding: calc(var(--rhyme-xxs) / 2);
  align-content: center;
}

.cd-event__main-area > * + * {
  margin-top: 0.25rem;
}

.cd-event__time {
  color: #666;
}

.cd-event__title {
  font-weight: bold;
}

.cd-event__address {
  font-size: var(--typography-sm);
}

.cd-event__status {
  grid-area: status;
  margin-top: var(--rhyme-xxs);
}

.cd-event__slots {
  border-radius: var(--border-radius-sm);
  padding: 0.2rem 0.6rem;
  text-wrap: nowrap;
}

.cd-event__slots--open {
  background-color: #adc178;
}

.cd-event__slots--filled {
  background-color: #ffbf69;
}

.cd-event__links {
  grid-area: links;
  margin-top: var(--rhyme-xxs);
}

.cd-event__links > * + * {
  margin-left: 0.5rem;
}

@container (min-width: 720px) {
  .cd-event__links {
    margin-top: 0;
    padding-top: var(--rhyme-xxs);
    align-self: stretch;
    align-content: center;
    max-height: 4rem;
  }
}

.cd-event a {
  display: inline-block;
  height: 1.5rem;
  text-decoration: none;
  font-weight: 700;
  line-height: 0.4;
  color: var(--color-on-background);
  padding: 0.56rem var(--rhyme-xxs);
  background-image: linear-gradient(var(--color-primary-light), var(--color-primary-light));
  background-size: 100% 0.6em;
  background-position-y: 100%;
  background-repeat: no-repeat;
  transition: background-size 0.2s ease-in-out, color 0.3s ease-in-out;
}

.cd-event a:hover {
  background-size: 100% 100%;
}

.cd-event__no-result {
  text-align: center;
}
