/* -----------------------------------------------
  CALENDAR

  FullCalendar styling and the event details modal
  that opens when an event is clicked.
------------------------------------------------ */

#calendar-container {
  margin: 0 1rem;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 8px 8px 0 var(--rbm-orange);
  background: var(--rbm-black);
  color: var(--rbm-white);
}

/* FullCalendar reads these variables for its built-in colors */
.fc {
  --fc-border-color: var(--rbm-white);
  --fc-page-bg-color: var(--rbm-white);
  --fc-neutral-bg-color: var(--rbm-black);
  --fc-neutral-text-color: var(--rbm-white);
  --fc-event-bg-color: var(--rbm-blue);
  --fc-event-border-color: var(--rbm-white);
  --fc-event-text-color: var(--rbm-white);
  --fc-list-event-hover-bg-color: rgba(0, 191, 108, 0.12);

  font-family: var(--rbm-font-heading);
}

/* Links inside the calendar are day numbers, weekday names,
   and event titles, so they keep the calendar's text color
   instead of the site's link colors. */
.fc a,
.fc a:hover,
.fc a:focus {
  color: inherit;
  text-decoration: none;
}

/* Month view: weekday header row and day numbers */
.fc .fc-col-header-cell {
  background: var(--rbm-blue);
}

.fc .fc-daygrid-day-number {
  font-weight: 700;
}

/* Events, in both month view and list view */
.fc .fc-daygrid-event,
.fc .fc-list-event {
  border: 2px solid var(--rbm-black);
  border-radius: 10px;
  background: var(--rbm-blue);
  color: var(--rbm-white);
  font-weight: normal;
  cursor: pointer;
}

.fc .fc-daygrid-event:hover,
.fc .fc-list-event:hover {
  background: var(--rbm-orange);
}

.fc .fc-daygrid-event {
  padding: 2px 6px;
}

.fc .fc-event-title {
  font-weight: 500;
}

/* Month view shows events as plain blue pills, without FullCalendar's colored dot */
.fc .fc-daygrid-event-dot {
  display: none;
}

/* Today: pink outline around the day, and the date in a pink pill */
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
  padding: 2px;
  border: 2px solid var(--rbm-pink);
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number,
.fc .fc-list-day.fc-day-today .fc-list-day-text,
.fc .fc-list-day.fc-day-today .fc-list-day-side-text {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--rbm-pink);
  color: var(--rbm-black);
}

/* List view (used on phones) */
@media (max-width: 767.98px) {
  .fc .fc-list {
    overflow: hidden;
    border-radius: 0.75rem;
  }

  .fc .fc-list-event-time {
    white-space: nowrap;
  }

  /* No colored dot column between the time and the title, so
     the titles get that space instead */
  .fc .fc-list-event-graphic {
    display: none;
  }
}

/* -----------------------------------------------
  EVENT MODAL

  A Bootstrap modal, colored through Bootstrap's
  modal variables.
------------------------------------------------ */

.event-modal {
  --bs-modal-width: 700px;
  --bs-modal-padding: 1.25rem;
  --bs-modal-bg: var(--rbm-black);
  --bs-modal-color: var(--rbm-white);
  --bs-modal-border-color: var(--rbm-white);
  --bs-modal-border-width: 2px;
  --bs-modal-border-radius: 1rem;

  font-family: var(--rbm-font-heading);
}

.event-modal a:visited {
  color: var(--rbm-pink);
}

.event-modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
