/* =====================================================================
   MSCOBA Events — calendar (left) + details (right)
   Tokens follow the MSCOBA homepage: navy #0A1F5C · red #C8102E · gold #E8B44A
   Everything is scoped to .msce-* so the WordPress theme can't restyle it.
   ===================================================================== */
.msce-cal, .msce-strip {
  --msce-navy: #0A1F5C; --msce-navy2: #12297a;
  --msce-red: #C8102E;  --msce-red-dk: #a50d26;
  --msce-gold: #E8B44A;
  --msce-ink: #182035;  --msce-mut: #5a6379;
  --msce-line: #e3e7f2; --msce-soft: #eef2fb; --msce-card: #fff;
  --msce-r: 14px; --msce-shadow: 0 2px 14px rgba(10, 31, 92, .08);
}
.msce-cal, .msce-cal *, .msce-strip, .msce-strip * { box-sizing: border-box; }

.msce-cal {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 24px;
  align-items: start;
  max-width: 980px;
  margin: 34px auto 24px;
  color: var(--msce-ink);
  font: inherit;
  line-height: 1.5;
}

/* ---------- calendar card (LEFT) ---------- */
.msce-card {
  background: var(--msce-card);
  border: 1px solid var(--msce-line);
  border-radius: var(--msce-r);
  box-shadow: var(--msce-shadow);
  overflow: hidden;
}
.msce-top {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--msce-navy);
  border-bottom: 3px solid var(--msce-red);
}
.msce-cal .msce-top h3.msce-month {
  flex: 1; margin: 0; padding: 0; border: 0;
  text-align: center; font-size: 17px; font-weight: 700; letter-spacing: .01em;
  color: #fff; line-height: 1.3; text-transform: none;
}
.msce-cal .msce-nav {
  -webkit-appearance: none; appearance: none;
  width: 38px; height: 38px; min-width: 38px; margin: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 10px;
  background: transparent; color: #fff;
  font: 700 20px/1 inherit; cursor: pointer; box-shadow: none; text-transform: none;
}
.msce-cal .msce-nav:hover { background: rgba(255, 255, 255, .16); color: #fff; }

.msce-weekdays, .msce-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.msce-weekdays span {
  padding: 9px 0; text-align: center; background: var(--msce-soft);
  font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--msce-mut);
}
.msce-days { gap: 5px; padding: 10px; }

.msce-cal .msce-day {
  -webkit-appearance: none; appearance: none;
  position: relative; margin: 0; padding: 0;
  aspect-ratio: 1 / .92; min-height: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--msce-ink);
  font: 500 14.5px/1 inherit; text-transform: none; letter-spacing: 0;
  cursor: pointer; box-shadow: none;
}
.msce-cal .msce-day:hover { background: var(--msce-soft); color: var(--msce-ink); }
.msce-cal .msce-day.is-other { color: #b4bccf; }
.msce-cal .msce-day.has-event { background: #fdeef0; border-color: #f3c6cd; color: var(--msce-red-dk); font-weight: 800; }
.msce-cal .msce-day.has-event.is-other { opacity: .6; }
.msce-cal .msce-day.is-today { outline: 2px solid var(--msce-gold); outline-offset: -2px; }
.msce-cal .msce-day.is-sel { background: var(--msce-navy); border-color: var(--msce-navy); color: #fff; }
.msce-cal .msce-day:focus-visible, .msce-cal .msce-nav:focus-visible,
.msce-cal .msce-up__item:focus-visible, .msce-cal .msce-today-btn:focus-visible, .msce-cal .msce-btn:focus-visible {
  outline: 3px solid var(--msce-gold); outline-offset: 2px;
}

.msce-dots { display: flex; gap: 3px; height: 6px; }
.msce-dots i, .msce-key i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.msce-dots i.m, .msce-key i.m { background: var(--msce-red); }
.msce-dots i.o, .msce-key i.o { background: var(--msce-navy); }
.msce-cal .msce-day.is-sel .msce-dots i.m { background: var(--msce-gold); }
.msce-cal .msce-day.is-sel .msce-dots i.o { background: #fff; }

.msce-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  padding: 10px 16px; border-top: 1px solid var(--msce-line);
  font-size: 12.5px; color: var(--msce-mut);
}
.msce-key i { margin-right: 6px; width: 9px; height: 9px; vertical-align: middle; }
.msce-count { margin-left: auto; }
.msce-cal .msce-today-btn {
  -webkit-appearance: none; appearance: none; margin: 0; padding: 3px 10px;
  border: 1px solid var(--msce-line); border-radius: 99px; background: #fff;
  color: var(--msce-navy); font: 700 12px/1.4 inherit; text-transform: none; letter-spacing: 0; cursor: pointer; box-shadow: none;
}
.msce-cal .msce-today-btn:hover { background: var(--msce-soft); color: var(--msce-navy); }

/* ---------- details + coming up (RIGHT) ---------- */
.msce-cal__side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.msce-panel, .msce-up {
  background: var(--msce-card);
  border: 1px solid var(--msce-line);
  border-radius: var(--msce-r);
  box-shadow: var(--msce-shadow);
  padding: 18px 20px;
}
.msce-panel { border-left: 5px solid var(--msce-red); min-height: 150px; }
.msce-cal .msce-lbl {
  margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--msce-red);
}
.msce-cal .msce-ev + .msce-ev { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--msce-line); }
.msce-cal h4.msce-title { margin: 6px 0 4px; padding: 0; font-size: 19px; line-height: 1.3; color: var(--msce-navy); }
.msce-cal .msce-when, .msce-cal .msce-time, .msce-cal .msce-where, .msce-cal .msce-note, .msce-cal .msce-empty, .msce-cal .msce-hint {
  margin: 3px 0; font-size: 14.5px; line-height: 1.5; color: var(--msce-mut);
}
.msce-cal .msce-when b { color: var(--msce-ink); }
.msce-cal .msce-note { font-style: italic; }
.msce-cal .msce-hint { font-size: 13px; }

.msce-chip, .msce-badge {
  display: inline-block; padding: 2px 9px; border-radius: 99px; margin-right: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
/* Category label on the details card: no pill fill, just coloured text poking above the box */
.msce-cal .msce-ev > .msce-chip { background: none; padding: 0; margin: 0 0 8px; font-size: 16px; letter-spacing: .05em; line-height: 1.3; }
.msce-chip.m { color: var(--msce-red-dk); }
.msce-chip.o { color: var(--msce-navy); }
/* the label of the first event in the panel floats fully above the card, clear of its top edge on both sides */
.msce-cal .msce-panel > .msce-ev:first-child > .msce-chip {
  position: absolute; top: -46px; left: 2px; z-index: 1;
}

/* "Rescheduled" — a curved corner tab on the top-right of the box */
.msce-cal .msce-ev { position: relative; }
.msce-cal .msce-ribbon {
  position: absolute; top: 0; right: 0; z-index: 1;
  padding: 7px 16px 8px 18px;
  background: #d9631e; color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase;
  border-radius: 0 0 0 16px;               /* the curve, bottom-left */
  box-shadow: 0 2px 6px rgba(217, 99, 30, .28);
}
/* first event: sit flush in the card's corner (cancel the panel padding, follow its rounded corner) */
.msce-cal .msce-panel > .msce-ev:first-child > .msce-ribbon { top: -19px; right: -21px; border-top-right-radius: 13px; }
/* later events on the same day: a small curved tab in their own corner */
.msce-cal .msce-ev + .msce-ev > .msce-ribbon { top: 18px; border-radius: 10px; }

/* Cancelled — the whole event box tints blue with a "Cancelled" watermark over it */
.msce-cal .msce-ev.is-cancelled {
  background: #eaf1ff;
  border: 1px solid #bcd3fb;
  border-radius: 12px;
  padding: 14px 16px;
}
.msce-cal .msce-ev.is-cancelled > *:not(.msce-watermark) { position: relative; z-index: 1; }
.msce-cal .msce-watermark {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 26px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase;
  color: #c8102e;
  background: rgba(255, 255, 255, .92);
  border: 3px solid #c8102e;
  border-radius: 10px;
  padding: 8px 26px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  white-space: nowrap; pointer-events: none;
}
.msce-cal .msce-ev.is-cancelled .msce-when,
.msce-cal .msce-ev.is-cancelled .msce-time,
.msce-cal .msce-ev.is-cancelled .msce-where { text-decoration: line-through; text-decoration-color: rgba(10, 31, 92, .35); }
.msce-cal .msce-ev.is-cancelled .msce-hosts li { background: #fff; border-color: #bcd3fb; }
/* the admin's cancellation note, shown plainly as the reason instead of a faint aside */
.msce-cal .msce-cancel-reason {
  margin-top: 10px; padding: 8px 10px;
  background: rgba(255, 255, 255, .6); border: 1px solid #bcd3fb; border-radius: 8px;
  font-style: normal; color: var(--msce-ink);
}
.msce-cancel-reason__lbl { font-weight: 800; color: var(--msce-navy); }

.msce-hosts { margin: 10px 0 0; }
.msce-hosts__lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--msce-mut); margin-bottom: 4px; }
.msce-cal .msce-hosts ul { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.msce-cal .msce-hosts li {
  display: flex; align-items: center; gap: 9px;
  margin: 0; padding: 7px 12px; border-radius: 10px; list-style: none;
  background: var(--msce-soft); border: 1px solid var(--msce-line);
  font-size: 13px; font-weight: 600; color: var(--msce-navy2);
}
.msce-cal .msce-hosts li::before {
  content: ''; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--msce-red);
}
.msce-cal a.msce-btn {
  display: inline-block; margin-top: 14px; padding: 8px 14px; border-radius: 10px;
  background: var(--msce-red); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; border: 0;
}
.msce-cal a.msce-btn:hover { background: var(--msce-red-dk); color: #fff; }

.msce-cal .msce-up__list { list-style: none; margin: 0; padding: 0; }
.msce-cal .msce-up__list > li { margin: 0; padding: 0; list-style: none; border-top: 1px dashed var(--msce-line); }
.msce-cal .msce-up__list > li:first-child { border-top: 0; }
.msce-cal .msce-up__list > li:not(:has(button)) { padding: 11px 0; font-size: 14px; }
.msce-cal .msce-up__item {
  -webkit-appearance: none; appearance: none; width: 100%; margin: 0; padding: 11px 0;
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  border: 0; background: transparent; color: var(--msce-ink);
  font: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; box-shadow: none;
}
.msce-cal .msce-up__item:hover { background: transparent; color: var(--msce-ink); }
.msce-cal .msce-up__item:hover .msce-up__t b { color: var(--msce-red-dk); }
.msce-dchip {
  flex: 0 0 52px; padding: 6px 0; text-align: center; line-height: 1.1;
  background: var(--msce-soft); border: 1px solid var(--msce-line); border-radius: 10px;
}
.msce-dchip b { display: block; font-size: 18px; color: var(--msce-navy); }
.msce-dchip span { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--msce-mut); }
.msce-up__t b { display: block; font-size: 14.5px; line-height: 1.35; }
.msce-up__t span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--msce-mut); }

/* ---------- "Recent past" (read-only) — always full width, never squeezed into a column ---------- */
.msce-past {
  grid-column: 1 / -1;
  background: var(--msce-card);
  border: 1px solid var(--msce-line);
  border-radius: var(--msce-r);
  box-shadow: var(--msce-shadow);
  padding: 18px 20px;
}
.msce-past__head { margin: 0 0 14px; }
.msce-past__head h3 { margin: 0; padding: 0; font-size: 17px; color: var(--msce-navy); }
.msce-past__wrap { overflow-x: auto; }
.msce-past__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.msce-past__table th {
  padding: 10px 12px; text-align: left; white-space: nowrap;
  background: var(--msce-navy); color: #fff; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
}
.msce-past__table th:first-child { border-radius: 8px 0 0 0; }
.msce-past__table th:last-child { border-radius: 0 8px 0 0; }
.msce-past__table td { padding: 11px 12px; border-top: 1px solid var(--msce-line); vertical-align: top; color: var(--msce-ink); }
.msce-past__table tbody tr:first-child td { border-top: 0; }
.msce-past__hosts { margin: 0; padding: 0; list-style: none; }
.msce-past__hosts li { margin: 0; padding: 0; line-height: 1.6; }
.msce-past__more { margin: 12px 0 0; }
.msce-past__more a { color: var(--msce-navy2); font-weight: 700; font-size: 13.5px; text-decoration: none; }
.msce-past__more a:hover { text-decoration: underline; }

/* status pills reused by .msce-past__table (same palette as the admin diary) */
.msce-cal .msce-b-scheduled { background: #e5f5ec; color: #1a7f4e; }
.msce-cal .msce-b-moved     { background: #fdf0e5; color: #b3541e; }
.msce-cal .msce-b-cancelled { background: #fdeaea; color: #b3261e; }

/* ---------- [mscoba_next_strip] ---------- */
.msce-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  padding: 8px 18px; background: var(--msce-navy); color: #dfe6ff; font-size: 13.5px; line-height: 1.5;
}
.msce-strip strong { color: #fff; }
.msce-strip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--msce-gold); box-shadow: 0 0 0 4px rgba(232, 180, 74, .22); }
.msce-strip a { margin-left: auto; color: var(--msce-gold); font-weight: 700; text-decoration: none; }
.msce-strip a:hover { text-decoration: underline; }

/* ---------- small screens ---------- */
@media (max-width: 760px) {
  .msce-cal { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .msce-count { margin-left: 0; flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  .msce-panel .msce-ev { animation: msceFade .35s ease-out; }
  @keyframes msceFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
