/* Hide the raw view rows; the JS builds the widget from them. */
.event-calendar .view-content { display: none; }

.event-calendar {
  --ec-brand: #8e1b6c;      /* header row, month title, selected day, button hover */
  --ec-today: #5a5a5a;      /* today's cell */
  --ec-text: #555;
  --ec-border: #d0d0d0;
  --ec-button: #d6d4d0;     /* "Show all events" button */
}

/* Full width of whatever region the block sits in. */
.event-calendar__widget { width: 100%; font-family: inherit; }

/* Month navigation */
.ec-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}
.ec-nav button {
  background: none;
  border: 0;
  padding: 0 .6rem;
  font-size: 28px;
  line-height: 1;
  color: var(--ec-brand);
  cursor: pointer;
}
.ec-month {
  font-weight: bold;
  font-size: 16px;
  color: var(--ec-brand);
  text-decoration: none;
  padding: .15rem .5rem;
}
.ec-month:hover,
.ec-month:focus { text-decoration: underline; }
.ec-month.is-selected { background: var(--ec-brand); color: #fff; }

/* Grid: fixed layout splits the width into 7 equal columns. */
.ec-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 0;
}
.ec-grid th {
  background: var(--ec-brand);
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  padding: .55rem 0;
  border: 1px solid #fff;
  border-bottom: 0;
}
.ec-grid th abbr { text-decoration: none; border: 0; cursor: default; }
.ec-grid td {
  border: 1px solid var(--ec-border);
  text-align: center;
  vertical-align: middle;
  padding: 0;
  color: var(--ec-text);
  font-size: 14px;
}

/* Day contents fill the cell and stay square at any width;
   the whole square is clickable. */
.ec-day a,
.ec-day span {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  color: inherit;
}
.ec-day a { text-decoration: underline; text-underline-offset: 3px; }
.ec-day a:hover,
.ec-day a:focus { background: #f1e3ed; color: var(--ec-brand); }
.ec-day a:focus-visible { outline: 2px solid var(--ec-brand); outline-offset: -2px; }

/* Today and the selected day */
.ec-day.is-today { background: var(--ec-today); color: #fff; }
.ec-day.is-today a { color: white;}
.ec-day.is-today a:hover,
.ec-day.is-today a:focus { background: #444; color: #fff; }
.ec-day.is-selected,
.ec-day.is-selected a { background: var(--ec-brand); color: #fff; }

/* "Show all events" button */
.ec-reset {
  display: block;
  width: 100%;
  margin-top: 2rem;
  padding: .6rem 1rem;
  border: 0;
  border-radius: 0;
  background: var(--ec-button);
  color: #000;
  font: inherit;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.ec-reset:hover,
.ec-reset:focus-visible {
  background: var(--ec-brand);
  color: #fff;
}
