/* Calendar view (views/home/calendar.js) and registrants view (views/home/calendarRegistrants.js) */

/* A date range breaks at the dash, never inside a day */
.calendar-date span {
  white-space: nowrap;
}

.calendar-details p:last-child {
  margin-bottom: 0;
}

/* Long words, links and pictures in the description never widen the table */
.calendar-details {
  overflow-wrap: anywhere;
}

.calendar-details img,
.calendar-details table {
  max-width: 100%;
  height: auto;
}

.calendar-table .badge {
  white-space: normal;
  text-align: left;
}

.calendar-chip {
  font-size: 0.75rem;
  line-height: 1.2;
  padding: 1px 3px;
  margin-top: 2px;
  border-left: 3px solid currentColor;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
}

/* Title and place each on one line, cut with "…" */
.calendar-chip-line,
.calendar-chip-place {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-chip-place {
  font-size: 0.65rem;
}

/* Phones: the chips shrink to coloured bars, the day's races are in the table below */
@media (max-width: 767.98px) {
  .calendar-chip {
    height: 6px;
    padding: 0;
    background-color: currentColor;
  }

  .calendar-chip-line,
  .calendar-chip-place {
    display: none;
  }
}

.calendar-event-link {
  color: inherit;
  font-size: inherit;
  text-align: start;
  vertical-align: baseline;
  text-decoration: none;
}

.calendar-event-link:hover {
  text-decoration: underline;
}

/* New label field of the race editor */
.calendar-new-label {
  max-width: 20rem;
}

/* Labels of a race in the list: yellow chips, like the dates of "Prossimi eventi" */
.calendar-label {
  background: var(--gold-yellow);
  color: var(--gold-blue);
  font-weight: 600;
}
