/* TEAM events calendar (<team-events-calendar>): FullCalendar in TEAM brand colours (Barn Red #a72123,
   Egg Shell #f2dbc2, Sage #95a67c) and the event popup. Fonts come from the site's global styles. */
:is(#bootstrap-theme, body) .team-cal { font-family: inherit; margin: 1rem 0 2rem; }
:is(#bootstrap-theme, body) .team-cal .fc { font-size: 0.95rem; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-toolbar { flex-wrap: wrap; gap: 0.5rem; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-toolbar-title {
  font-family: var(--wp--preset--font-family--francois-one), sans-serif;
  font-weight: 400; font-size: 1.25rem; color: #a72123;
}
:is(#bootstrap-theme, body) .team-cal .fc .fc-button {
  background: #fff; border: 1px solid #a72123; color: #a72123; text-shadow: none; box-shadow: none;
  font-family: inherit; font-size: 0.85rem; padding: 0.3em 0.7em; border-radius: 4px; text-transform: none;
}
:is(#bootstrap-theme, body) .team-cal .fc .fc-button:hover,
:is(#bootstrap-theme, body) .team-cal .fc .fc-button-primary:not(:disabled).fc-button-active,
:is(#bootstrap-theme, body) .team-cal .fc .fc-button-primary:not(:disabled):active { background: #a72123; border-color: #a72123; color: #fff; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-button:disabled { opacity: 0.45; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-button:focus-visible { outline: 2px solid #a72123; outline-offset: 2px; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-col-header-cell-cushion { font-weight: 600; color: #1d1d1d; text-decoration: none; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-day-number { color: #555; text-decoration: none; font-size: 0.85rem; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-day-today { background: #f2dbc2 !important; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-day-past .fc-daygrid-day-number { opacity: 0.55; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-event,
:is(#bootstrap-theme, body) .team-cal .fc .fc-event {
  background: #fbf3ea; border: 0; border-left: 4px solid #a72123; border-radius: 2px;
  color: #1d1d1d; padding: 2px 4px; white-space: normal; cursor: pointer;
}
:is(#bootstrap-theme, body) .team-cal .fc .fc-event .fc-event-title,
:is(#bootstrap-theme, body) .team-cal .fc .fc-event .fc-event-time { color: #1d1d1d; font-weight: 600; font-size: 0.85rem; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-day-cushion { background: #f6efe6; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-day-text,
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-day-side-text { color: #1d1d1d; text-decoration: none; font-weight: 600; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-event-dot { border-color: #a72123; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-event { background: transparent; border-left: 0; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-event:hover td { background: #fbf3ea; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-event-title a { color: #1d1d1d; text-decoration: none; font-weight: 600; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-empty { background: #fbf3ea; }
:is(#bootstrap-theme, body) .team-cal-error { color: #a72123; font-weight: 600; }

/* "Subscribe to calendar": a small outline button above the calendar, right-aligned; the menu drops below it. */
:is(#bootstrap-theme, body) .team-cal-subscribe { position: relative; display: flex; flex-direction: column; align-items: flex-end; margin: 0 0 0.75rem; }
:is(#bootstrap-theme, body) .team-cal-subscribe > summary {
  display: block; list-style: none; cursor: pointer; background: #fff; border: 1px solid #a72123; color: #a72123;
  font-size: 0.85rem; padding: 0.3em 0.8em; border-radius: 4px; user-select: none;
}
:is(#bootstrap-theme, body) .team-cal-subscribe > summary::-webkit-details-marker { display: none; }
:is(#bootstrap-theme, body) .team-cal-subscribe > summary::marker { content: ""; }
/* CiviCRM draws its own caret icon before every <summary>; this one has its own after the text. */
:is(#bootstrap-theme, body) .team-cal-subscribe > summary::before { content: none; display: none; }
:is(#bootstrap-theme, body) .team-cal-subscribe > summary::after { content: " \25BE"; }
:is(#bootstrap-theme, body) .team-cal-subscribe[open] > summary,
:is(#bootstrap-theme, body) .team-cal-subscribe > summary:hover { background: #a72123; color: #fff; }
:is(#bootstrap-theme, body) .team-cal-subscribe > summary:focus-visible { outline: 2px solid #a72123; outline-offset: 2px; }
:is(#bootstrap-theme, body) .team-cal-subscribe-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 20; width: 16rem; padding: 0.35rem 0;
  background: #fff; border: 1px solid #eadfd2; border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
:is(#bootstrap-theme, body) .team-cal-subscribe-menu ul { margin: 0; padding: 0; list-style: none; }
:is(#bootstrap-theme, body) .team-cal-subscribe-menu li { margin: 0; padding: 0; }
:is(#bootstrap-theme, body) .team-cal-subscribe-menu a { display: block; padding: 0.45rem 1rem; color: #1d1d1d; text-decoration: none; font-size: 0.95rem; }
:is(#bootstrap-theme, body) .team-cal-subscribe-menu a:hover,
:is(#bootstrap-theme, body) .team-cal-subscribe-menu a:focus-visible { background: #fbf3ea; color: #a72123; }
:is(#bootstrap-theme, body) .team-cal-subscribe-menu p {
  margin: 0.35rem 0 0; padding: 0.5rem 1rem 0.25rem; border-top: 1px solid #eadfd2; color: #555; font-size: 0.8rem; line-height: 1.4;
}
@media (max-width: 640px) {
  :is(#bootstrap-theme, body) .team-cal-subscribe { align-items: center; }
  :is(#bootstrap-theme, body) .team-cal-subscribe-menu { right: auto; left: 50%; transform: translateX(-50%); }
}

/* Popup */
:is(#bootstrap-theme, body) .team-cal-dialog {
  border: 0; border-radius: 6px; padding: 1.5rem 1.5rem 1rem; max-width: min(36rem, calc(100vw - 2rem));
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25); font-family: inherit;
}
:is(#bootstrap-theme, body) .team-cal-dialog::backdrop { background: rgba(29, 29, 29, 0.45); }
:is(#bootstrap-theme, body) .team-cal-close {
  position: absolute; top: 0.4rem; right: 0.6rem; background: none; border: 0; font-size: 1.8rem; line-height: 1;
  color: #555; cursor: pointer; padding: 0.2rem 0.4rem;
}
:is(#bootstrap-theme, body) .team-cal-close:hover { color: #a72123; }
:is(#bootstrap-theme, body) .team-cal-popup { font-size: 1rem; line-height: 1.5; }

@media (max-width: 640px) {
  :is(#bootstrap-theme, body) .team-cal .fc .fc-toolbar { flex-direction: column; align-items: center; }
  :is(#bootstrap-theme, body) .team-cal .fc .fc-toolbar-title { font-size: 1.1rem; }
}

/* Time and title run together on one line and wrap ("6pm PROTOTYPE Weekly Pasture Walk"). */
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-block-event .fc-event-main-frame { display: block; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-block-event .fc-event-time,
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-block-event .fc-event-title-container { display: inline; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-block-event .fc-event-time { margin-right: 0.3em; overflow: visible; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-block-event .fc-event-title { display: inline; position: static; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-daygrid-block-event .fc-event-time { white-space: nowrap; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-event td { padding: 0.5rem 0.75rem; vertical-align: top; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-day-cushion { padding: 0.4rem 0.75rem; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-list-event-time { white-space: nowrap; color: #555; }

/* "Today" between the month arrows, in Barn Red. */
:is(#bootstrap-theme, body) .team-cal .fc .fc-thisWeek-button { background: #a72123; border-color: #a72123; color: #fff; }
:is(#bootstrap-theme, body) .team-cal .fc .fc-thisWeek-button:hover { background: #8a1a1c; border-color: #8a1a1c; }

/* Popup: how to register, add to calendar. */
:is(#bootstrap-theme, body) .team-cal-popup h4 {
  font-family: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #555; margin: 0 0 0.3rem;
}
:is(#bootstrap-theme, body) .team-cal-popup :is(.team-ev-desc, .team-ev-instructions, .team-ev-register, .team-ev-addcal) { border-top: 1px solid #eadfd2; padding-top: 0.6rem; margin-top: 0.6rem; }
/* CiviCRM gives .crm-container headings a light-blue background and padding; not in the popup. */
:is(#bootstrap-theme, body) .team-cal-popup :is(h3, h4) { background: none; border: 0; padding: 0; }
