.shi-events-widget {max-width: 1200px; margin: 0 auto;}
.shi-events-widget > label {display: inline-flex; align-items: center; gap: 12px; margin: 0 0 20px; font-weight: 600;}
.shi-category-filter {min-width: 180px; padding: 9px 12px; border: 1px solid #ccc; border-radius: 5px; background: white;}
.shi-events-widget .fc .fc-button-primary {background: #264a74; border-color: #264a74;}
.shi-events-widget .fc .fc-event {cursor: default;}
.shi-calendar-error {color: #b42318;}
.shi-calendar-timezone {margin: 0 0 12px; color: #526174; font-size: .875rem;}
@media(max-width:700px) {.shi-events-widget .fc .fc-toolbar {flex-wrap: wrap; gap: 12px;} .shi-events-widget .fc .fc-toolbar-title {font-size: 1.25rem;}}
.shi-events-widget .fc .fc-event {cursor:pointer;}
.shi-modal[hidden] {display:none !important;}
.shi-modal {position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:20px;}
.shi-modal-backdrop {position:absolute;inset:0;background:rgba(12,23,40,.66);}
.shi-modal-panel {position:relative;background:#fff;color:#1f2937;width:min(100%,640px);max-height:90vh;overflow:auto;border-radius:12px;padding:32px;box-shadow:0 20px 65px rgba(0,0,0,.25);}
.shi-modal-close {position:absolute;right:14px;top:12px;border:0;background:transparent;color:#334155;font-size:30px;line-height:1;cursor:pointer;padding:6px 10px;}
.shi-modal-title {font-size:1.65rem;line-height:1.25;margin:0 35px 20px 0;}
.shi-modal-date,.shi-modal-type,.shi-modal-location {margin:8px 0;font-size:1rem;}
.shi-modal-subheading {font-size:1.15rem;margin:24px 0 10px;}
.shi-modal-description {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;}
.shi-modal-link {display:inline-block;margin-top:24px;padding:11px 18px;background:#264a74;color:#fff !important;border-radius:5px;text-decoration:none !important;}
body.shi-modal-open {overflow:hidden;}
@media(max-width:600px) {.shi-modal-panel {padding:26px 20px;} .shi-modal-title {font-size:1.35rem;}}

.shi-modal-field { margin: 1rem 0; }
.shi-modal-field .shi-modal-subheading { margin-bottom: .3rem; }
.shi-modal-description { white-space: pre-wrap; }


/* v1.6: polished, theme-resistant calendar presentation */
.shi-events-widget {
  width: 100%;
  max-width: 1200px;
  margin: 42px auto 56px;
  padding: 0 16px;
  box-sizing: border-box;
  --fc-border-color: #e5eaf0;
  --fc-neutral-bg-color: #f6f8fb;
  --fc-today-bg-color: #f5f8fc;
  --fc-page-bg-color: #fff;
  --fc-event-bg-color: #294e78;
  --fc-event-border-color: #294e78;
  --fc-event-text-color: #fff;
}
.shi-events-widget *, .shi-modal * {box-sizing: border-box;}
.shi-events-widget > label {
  display: flex;
  flex-wrap: wrap;
  width: fit-content;
  font-size: .94rem;
  color: #334155;
  margin-bottom: 26px;
}
.shi-events-widget .shi-category-filter {
  min-height: 44px;
  border: 1px solid #d9e1eb;
  border-radius: 9px;
  background: #fff;
  color: #1e293b;
  padding: 9px 34px 9px 13px;
  font-size: .94rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.shi-events-widget .fc {font-family: inherit; color: #263448;}
.shi-events-widget .fc .fc-toolbar {gap: 16px; margin-bottom: 23px;}
.shi-events-widget .fc .fc-toolbar-title {font-size: clamp(1.3rem, 2.1vw, 1.75rem); font-weight: 650; letter-spacing: -.025em; color: #17263b;}
.shi-events-widget .fc .fc-button {border-radius: 8px; font-size: .9rem; font-weight: 600; padding: .53em .78em; box-shadow: none; text-transform: none;}
.shi-events-widget .fc .fc-button-primary {background: #294e78; border-color: #294e78; color: #fff;}
.shi-events-widget .fc .fc-button-primary:hover:not(:disabled),
.shi-events-widget .fc .fc-button-primary:focus:not(:disabled) {background: #1d3b60; border-color: #1d3b60;}
.shi-events-widget .fc .fc-button-primary:not(:disabled).fc-button-active {background: #172f4d; border-color: #172f4d;}
.shi-events-widget .fc .fc-button:focus {box-shadow: 0 0 0 3px rgba(41,78,120,.18);}
.shi-events-widget .fc .fc-daygrid-day-number,
.shi-events-widget .fc .fc-col-header-cell-cushion,
.shi-events-widget .fc .fc-list-day-text,
.shi-events-widget .fc .fc-list-day-side-text {
  color: #334155 !important;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}
.shi-events-widget .fc .fc-daygrid-day-number:hover,
.shi-events-widget .fc .fc-col-header-cell-cushion:hover,
.shi-events-widget .fc .fc-list-day-text:hover,
.shi-events-widget .fc .fc-list-day-side-text:hover {text-decoration: none !important;}
.shi-events-widget .fc .fc-col-header-cell {background: #f8fafc; padding: 9px 0; font-size: .84rem; font-weight: 650;}
.shi-events-widget .fc .fc-daygrid-day-number {font-size: .88rem; padding: 8px 10px;}
.shi-events-widget .fc .fc-day-other .fc-daygrid-day-number {color: #a0abba !important;}
.shi-events-widget .fc .fc-daygrid-day.fc-day-today {background: #f1f6fd;}
.shi-events-widget .fc .fc-daygrid-event {border-radius: 6px; padding: 2px 5px; font-size: .84rem;}
.shi-events-widget .fc .fc-daygrid-dot-event {background: #edf3fb; color: #21456f; border-radius: 6px;}
.shi-events-widget .fc .fc-daygrid-dot-event .fc-event-title,
.shi-events-widget .fc .fc-daygrid-dot-event .fc-event-time {color: #21456f;}
.shi-events-widget .fc .fc-event-title {font-weight: 600;}
.shi-events-widget .fc .fc-event, .shi-events-widget .fc .fc-event a {cursor: pointer;}
.shi-events-widget .fc .fc-list {border-radius: 10px; overflow: hidden; border-color: #e5eaf0;}
.shi-events-widget .fc .fc-list-day-cushion {background: #f6f8fb; padding: 11px 14px;}
.shi-events-widget .fc .fc-list-event td {padding: 13px 12px; border-color: #e5eaf0;}
.shi-events-widget .fc .fc-list-event:hover td {background: #f4f7fb;}
.shi-events-widget .fc .fc-list-event-title a {color: #23466e; text-decoration: none !important; font-weight: 600;}
.shi-events-widget .fc .fc-list-event-title a:hover {text-decoration: none !important;}
.shi-events-widget .fc .fc-list-empty {background: #f8fafc; color: #64748b;}
.shi-modal-panel {border-radius: 16px;}
.shi-modal-panel a:not(.shi-modal-link) {color: #265b95;}
@media (max-width: 700px) {
  .shi-events-widget {margin: 28px auto 40px; padding: 0 12px;}
  .shi-events-widget > label {width: 100%; margin-bottom: 22px; gap: 8px;}
  .shi-events-widget .shi-category-filter {width: 100%; min-width: 0;}
  .shi-events-widget .fc .fc-toolbar {display: grid; grid-template-columns: 1fr auto; gap: 12px 8px; align-items: center; margin-bottom: 16px;}
  .shi-events-widget .fc .fc-toolbar-chunk:nth-child(2) {grid-column: 1 / -1; grid-row: 1; text-align: center;}
  .shi-events-widget .fc .fc-toolbar-chunk:nth-child(1) {grid-column: 1; grid-row: 2; display: flex; align-items: center;}
  .shi-events-widget .fc .fc-toolbar-chunk:nth-child(3) {grid-column: 2; grid-row: 2;}
  .shi-events-widget .fc .fc-toolbar-title {font-size: 1.38rem;}
  .shi-events-widget .fc .fc-button {padding: .55em .75em;}
  .shi-events-widget .fc .fc-list-event td {padding: 13px 8px; font-size: .89rem;}
  .shi-events-widget .fc .fc-list-event-time {white-space: nowrap; font-size: .8rem;}
  .shi-modal {padding: 10px;}
  .shi-modal-panel {padding: 26px 20px; max-height: calc(100dvh - 20px); border-radius: 13px;}
}

/* v1.7 refined, theme-independent modal */
.shi-modal {padding: 20px;}
.shi-modal-backdrop {background: rgba(11, 23, 41, .67);backdrop-filter: blur(3px);}
.shi-modal-panel {width: min(100%, 610px);padding: 0;overflow: auto;border: 1px solid rgba(221,230,239,.9);border-radius: 18px;box-shadow: 0 28px 90px rgba(8, 26, 48, .32);}
.shi-modal-body {font-family: inherit;line-height: 1.55;}
.shi-modal-header {padding: 33px 38px 27px;background: linear-gradient(135deg,#f8fbff 0%,#fff 75%);border-bottom: 1px solid #e7edf3;}
.shi-modal-eyebrow {font-size: .7rem;font-weight: 800;letter-spacing: .14em;color: #6381a0;margin-bottom: 10px;}
.shi-modal-title {margin: 0 40px 16px 0;font-size: clamp(1.5rem, 3vw, 2rem);line-height: 1.19;letter-spacing: -.03em;font-weight: 720;color: #152c46;}
.shi-modal-category-badge {display: inline-flex;max-width: 100%;padding: 5px 12px;border-radius: 100px;background: #e6eef8;color: #234d7d;font-weight: 700;font-size: .78rem;letter-spacing: .01em;}
.shi-modal-close {position: absolute;z-index: 2;top: 21px;right: 22px;display: grid;place-items: center;width: 38px;height: 38px;border: 1px solid #e0e7ef;border-radius: 50%;padding: 0;background: #fff;color: #3d526a;font: normal 27px/1 Arial,sans-serif;transition: background .15s ease;}
.shi-modal-close:hover {background: #f1f5fa;}
.shi-modal-close:focus-visible {outline: 3px solid #3773b8;outline-offset: 2px;}
.shi-modal-meta {padding: 24px 38px;border-bottom: 1px solid #edf1f5;}
.shi-modal-meta-row {display: flex;align-items: start;gap: 12px;}
.shi-modal-meta-icon {width: 31px;height: 31px;border-radius: 9px;flex: 0 0 31px;display: grid;place-items: center;background: #eff4fa;color: #355f8a;font-size: 19px;line-height:1;}
.shi-modal-meta-value {padding-top: 3px;color: #304155;font-size: .94rem;font-weight: 550;}
.shi-modal-fields {padding: 5px 38px 32px;}
.shi-modal-field {margin: 0;padding: 20px 0;border-bottom: 1px solid #eff2f6;}
.shi-modal-field:last-child {border-bottom: 0;padding-bottom: 0;}
.shi-modal-subheading {font-family: inherit;color: #667b91;font-size: .72rem;font-weight: 800;text-transform: uppercase;letter-spacing: .075em;margin: 0 0 7px;line-height: 1.4;}
.shi-modal-description {font-size: .98rem;color: #223348;line-height: 1.65;overflow-wrap: anywhere;white-space: pre-wrap;}
.shi-modal-panel .shi-modal-external-link {display: inline-flex;align-items: center;gap: 9px;font-weight: 700;font-size: .94rem;color: #1e558d;text-decoration: none !important;overflow-wrap: anywhere;}
.shi-modal-panel .shi-modal-external-link:hover {text-decoration: underline !important;color: #133e6b;}
.shi-modal-external-icon {font-size: 1.05rem;line-height: 1;}
@media(max-width:600px) {
  .shi-modal {padding: 10px;align-items: center;}
  .shi-modal-panel {max-height: calc(100dvh - 20px);border-radius: 14px;}
  .shi-modal-header {padding: 27px 23px 22px;}
  .shi-modal-title {margin-right: 30px;font-size: 1.5rem;}
  .shi-modal-close {top: 15px;right: 15px;width: 34px;height: 34px;}
  .shi-modal-meta {padding: 21px 23px;}
  .shi-modal-fields {padding: 4px 23px 26px;}
}

/* v1.9 Add to Calendar action */
.shi-modal-actions {padding: 23px 38px 29px; border-top: 1px solid #e7edf3; background: #f8fafc;}
.shi-modal-panel .shi-add-calendar-button {display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 12px 22px; border-radius: 9px; border: 1px solid #254e7a; background: #254e7a; color: #fff; font: inherit; font-size: .94rem; font-weight: 700; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .15s ease, transform .15s ease;}
.shi-modal-panel .shi-add-calendar-button:hover {background: #173c65; color: #fff;}
.shi-modal-panel .shi-add-calendar-button:focus-visible {outline: 3px solid #81b4f0; outline-offset: 3px;}
.shi-modal-calendar-note {color: #718096; font-size: 9px; margin: 10px 0 0; line-height: 1.55;}
@media(max-width:600px) {.shi-modal-actions {padding: 21px 23px 25px;} .shi-modal-panel .shi-add-calendar-button {width: 100%;}}

/* v2.0 — Google Maps directions */
.shi-modal-panel .shi-modal-location-link { display: inline-flex; align-items: center; gap: 8px; color: #245789; font-weight: 600; line-height: 1.6; text-decoration: none !important; overflow-wrap: anywhere; }
.shi-modal-panel .shi-modal-location-link:hover { color: #173d65; text-decoration: underline !important; }
.shi-modal-action-buttons { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }
.shi-modal-panel .shi-directions-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; border: 1px solid #cbd8e5; border-radius: 9px; background: #fff; color: #254e7a; font: inherit; font-size: .94rem; font-weight: 700; line-height: 1.2; text-decoration: none !important; transition: background .15s ease; }
.shi-modal-panel .shi-directions-button:hover { background: #edf3f9; color: #173c65; }
.shi-modal-panel .shi-directions-button:focus-visible, .shi-modal-panel .shi-modal-location-link:focus-visible { outline: 3px solid #81b4f0; outline-offset: 3px; }
@media(max-width:600px) { .shi-modal-action-buttons { flex-direction: column; align-items: stretch; } .shi-modal-panel .shi-directions-button { width: 100%; } }

/* v2.1: Event links use a background hover instead of underlining. */
.shi-events-widget .fc a.fc-event,
.shi-events-widget .fc a.fc-event:hover,
.shi-events-widget .fc a.fc-event:focus,
.shi-events-widget .fc .fc-event a,
.shi-events-widget .fc .fc-event a:hover,
.shi-events-widget .fc .fc-event-title,
.shi-events-widget .fc .fc-event-title:hover,
.shi-events-widget .fc .fc-list-event-title a,
.shi-events-widget .fc .fc-list-event-title a:hover {
  text-decoration: none !important;
  text-decoration-line: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.shi-events-widget .fc .fc-daygrid-block-event,
.shi-events-widget .fc .fc-daygrid-dot-event {
  transition: background-color .18s ease, border-color .18s ease;
}
.shi-events-widget .fc .fc-daygrid-block-event:hover,
.shi-events-widget .fc .fc-daygrid-block-event:focus-visible {
  background-color: #173a62 !important;
  border-color: #173a62 !important;
}
.shi-events-widget .fc .fc-daygrid-dot-event:hover,
.shi-events-widget .fc .fc-daygrid-dot-event:focus-visible {
  background-color: #d9e8f8 !important;
}
.shi-events-widget .fc .fc-list-event:hover td,
.shi-events-widget .fc .fc-list-event:focus-within td {
  background-color: #eaf2fb !important;
  transition: background-color .18s ease;
}

/* v2.1: Use the active WordPress theme's font throughout the calendar UI. */
.shi-events-widget,
.shi-events-widget .fc,
.shi-events-widget .fc button,
.shi-events-widget .shi-category-filter,
.shi-modal,
.shi-modal-panel,
.shi-modal-panel button,
.shi-modal-panel a {
  font-family: inherit;
}

/* v2.2 — SHI burgundy brand accents (#a53e51 sampled from site buttons). */
.shi-events-widget, .shi-modal { --shi-accent: #a53e51; --shi-accent-hover: #872c40; --shi-accent-soft: #fbeff2; }
.shi-events-widget .fc .fc-button-primary {background: var(--shi-accent); border-color: var(--shi-accent);}
.shi-events-widget .fc .fc-button-primary:hover:not(:disabled),
.shi-events-widget .fc .fc-button-primary:focus:not(:disabled),
.shi-events-widget .fc .fc-button-primary:not(:disabled).fc-button-active {background: var(--shi-accent-hover); border-color: var(--shi-accent-hover);}
.shi-events-widget .fc .fc-button:focus-visible,
.shi-modal-panel a:focus-visible, .shi-modal-panel button:focus-visible {outline: 2px solid var(--shi-accent); outline-offset: 2px; box-shadow: none;}
.shi-events-widget .fc {--fc-event-bg-color: var(--shi-accent);--fc-event-border-color: var(--shi-accent);}
.shi-events-widget .fc .fc-daygrid-dot-event {background:var(--shi-accent-soft); color:var(--shi-accent-hover);}
.shi-events-widget .fc .fc-daygrid-dot-event .fc-event-title,
.shi-events-widget .fc .fc-daygrid-dot-event .fc-event-time,
.shi-events-widget .fc .fc-list-event-title a {color:var(--shi-accent-hover) !important;}
.shi-events-widget .fc .fc-daygrid-block-event:hover,
.shi-events-widget .fc .fc-daygrid-block-event:focus-visible {background-color:var(--shi-accent-hover) !important;border-color:var(--shi-accent-hover) !important;}
.shi-events-widget .fc .fc-daygrid-dot-event:hover {background-color:#f3dce3 !important;}
.shi-events-widget .fc .fc-list-event:hover td, .shi-events-widget .fc .fc-list-event:focus-within td {background:var(--shi-accent-soft) !important;}
.shi-modal-header {background:linear-gradient(135deg,#fdf4f6,#fff 80%);}
.shi-modal-eyebrow, .shi-modal-subheading {color:#8e4050;}
.shi-modal-title {color:#26303c;}
.shi-modal-category-badge {background:var(--shi-accent-soft);color:var(--shi-accent-hover);}
.shi-modal-meta-icon {background:var(--shi-accent-soft);color:var(--shi-accent);}
.shi-modal-panel .shi-add-calendar-button {min-height:40px;padding:9px 15px;background:var(--shi-accent);border-color:var(--shi-accent);border-radius:8px;font-size:.84rem;gap:8px;}
.shi-modal-panel .shi-add-calendar-button:hover {background:var(--shi-accent-hover);border-color:var(--shi-accent-hover);}
.shi-modal-panel .shi-directions-button {min-height:40px;padding:9px 15px;border-color:var(--shi-accent);color:var(--shi-accent);border-radius:8px;font-size:.84rem;}
.shi-modal-panel .shi-directions-button:hover {background:var(--shi-accent-soft);border-color:var(--shi-accent-hover);color:var(--shi-accent-hover);}
.shi-modal-panel .shi-modal-location-link,
.shi-modal-panel .shi-modal-external-link,
.shi-modal-panel a:not(.shi-directions-button):not(.shi-modal-link) {color:var(--shi-accent);}
.shi-modal-panel .shi-modal-location-link:hover,
.shi-modal-panel .shi-modal-external-link:hover,
.shi-modal-panel a:not(.shi-directions-button):not(.shi-modal-link):hover {color:var(--shi-accent-hover);}
.shi-modal-panel .shi-modal-external-link:hover, .shi-modal-panel .shi-modal-location-link:hover {text-decoration:none !important;}
.shi-events-widget .fc .fc-daygrid-event {position:relative;padding-right:24px;}
.shi-events-widget .fc .fc-daygrid-event .shi-quick-calendar {position:absolute;right:3px;top:50%;transform:translateY(-50%);}
.shi-events-widget .fc .fc-list-event-title .shi-quick-calendar {margin-left:12px;vertical-align:middle;}
.shi-events-widget .shi-quick-calendar {display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:22px;height:22px;border-radius:5px;color:inherit;cursor:pointer;transition:background .15s ease;color:var(--shi-accent-hover);}
.shi-events-widget .fc .fc-daygrid-block-event .shi-quick-calendar {color:#fff;}
.shi-events-widget .shi-quick-calendar:hover, .shi-events-widget .shi-quick-calendar:focus-visible {background:rgba(165,62,81,.17);outline:2px solid currentColor;outline-offset:0;}
.shi-events-widget .fc .fc-daygrid-block-event .shi-quick-calendar:hover {background:rgba(255,255,255,.25);}
.shi-modal-panel .shi-add-calendar-button svg, .shi-events-widget .shi-quick-calendar svg {display:block;flex-shrink:0;}

/* v2.3 — strong SHI theme overrides, blue category chip and readable body copy. */
.shi-modal .shi-modal-panel .shi-add-calendar-button,
.shi-modal .shi-modal-panel .shi-add-calendar-button:link,
.shi-modal .shi-modal-panel .shi-add-calendar-button:visited {
  background: #a53e51 !important; border: 1px solid #a53e51 !important;
  color: #fff !important; -webkit-text-fill-color: #fff !important;
  text-decoration: none !important; box-shadow: none;
}
.shi-modal .shi-modal-panel .shi-add-calendar-button:hover,
.shi-modal .shi-modal-panel .shi-add-calendar-button:focus-visible {
  background: #872c40 !important; border-color: #872c40 !important;
  color: #fff !important; -webkit-text-fill-color: #fff !important;
}
.shi-modal .shi-modal-panel .shi-directions-button,
.shi-modal .shi-modal-panel .shi-directions-button:link,
.shi-modal .shi-modal-panel .shi-directions-button:visited {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  gap: 8px; background: #fff !important; border: 1px solid #a53e51 !important;
  color: #a53e51 !important; -webkit-text-fill-color: #a53e51 !important;
  text-decoration: none !important; box-shadow: none !important;
}
.shi-modal .shi-modal-panel .shi-directions-button:hover,
.shi-modal .shi-modal-panel .shi-directions-button:focus-visible {
  background: #fbeff2 !important; border-color: #872c40 !important;
  color: #872c40 !important; -webkit-text-fill-color: #872c40 !important;
}
.shi-modal .shi-modal-panel .shi-directions-button svg,
.shi-modal .shi-modal-panel .shi-add-calendar-button svg {
  width: 16px !important; height: 16px !important; display: inline-block !important;
  visibility: visible !important; opacity: 1 !important; flex-shrink: 0;
  stroke: currentColor !important; fill: none !important;
}
.shi-modal .shi-modal-panel .shi-modal-category-badge {
  background: #e6eef8 !important; color: #234d7d !important;
  -webkit-text-fill-color: #234d7d !important; border: 1px solid #d1e2f5;
}
.shi-modal .shi-modal-panel .shi-modal-description,
.shi-modal .shi-modal-panel .shi-modal-meta-value,
.shi-modal .shi-modal-panel .shi-modal-calendar-note,
.shi-modal .shi-modal-panel .shi-modal-field p {
  color: #171717 !important; -webkit-text-fill-color: #171717 !important;
}
.shi-modal .shi-modal-panel .shi-modal-subheading { color: #374151 !important; }
.shi-modal .shi-modal-panel .shi-modal-external-link,
.shi-modal .shi-modal-panel .shi-modal-location-link { color: #a53e51 !important; -webkit-text-fill-color: #a53e51 !important; }
.shi-modal .shi-modal-panel .shi-modal-external-link:hover,
.shi-modal .shi-modal-panel .shi-modal-location-link:hover { color: #872c40 !important; -webkit-text-fill-color: #872c40 !important; }

/* v2.4: hide any quick-add icon from event titles; calendar download is only in the popup. */
.shi-events-widget .shi-quick-calendar { display: none !important; }


/* v2.5: remove trailing pseudo marks from event links, eliminate reserved icon space,
   and cool the popup header tint to a subtle grey-blue. */
.shi-events-widget .fc a.fc-event::before,
.shi-events-widget .fc a.fc-event::after,
.shi-events-widget .fc .fc-event a::before,
.shi-events-widget .fc .fc-event a::after,
.shi-events-widget .fc .fc-list-event-title a::before,
.shi-events-widget .fc .fc-list-event-title a::after,
.shi-events-widget .fc .fc-daygrid-dot-event::before,
.shi-events-widget .fc .fc-daygrid-dot-event::after {
  content: none !important;
  display: none !important;
}
.shi-events-widget .fc .fc-daygrid-event {
  padding-right: 5px !important;
}
.shi-events-widget .shi-quick-calendar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.shi-modal .shi-modal-panel .shi-modal-header {
  background: linear-gradient(135deg, #f4f7fb 0%, #fbfdff 78%) !important;
  border-bottom: 1px solid #e5ebf2 !important;
}
.shi-modal .shi-modal-panel .shi-modal-eyebrow {
  color: #5f7388 !important;
}

/* Minimal month calendar. Type colors are limited to event dots. */
.shi-events-widget {
  --fc-border-color: #e5e5e5;
  --fc-neutral-bg-color: #fafafa;
  --fc-today-bg-color: #fbfbfb;
  --fc-event-bg-color: transparent;
  --fc-event-border-color: #f0f0f0;
  --fc-event-text-color: #171717;
}
.shi-events-widget .fc,
.shi-events-widget .fc .fc-toolbar-title,
.shi-events-widget .fc .fc-daygrid-day-number,
.shi-events-widget .fc .fc-col-header-cell-cushion,
.shi-events-widget .fc .fc-list-day-text,
.shi-events-widget .fc .fc-list-day-side-text { color: #171717 !important; }
.shi-events-widget .fc .fc-col-header-cell {
  background: #f4f7fb !important;
  border: 0 !important;
  border-bottom: 1px solid #dce5ef !important;
}
.shi-events-widget .fc .fc-daygrid-day.fc-day-today { background: #fbfbfb; }
.shi-events-widget .fc .fc-toolbar-title { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 600; }
.shi-events-widget .fc .fc-button { font-size: .82rem; padding: .42em .68em; border-radius: 6px; }
.shi-events-widget .fc .fc-col-header-cell { font-size: .78rem; }
.shi-events-widget .fc .fc-daygrid-day-number { font-size: .82rem; }
.shi-events-widget .fc .fc-list-event td { font-size: .82rem; }
.shi-events-widget .shi-category-filter { min-height: 38px; font-size: .85rem; }
.shi-events-widget .fc a.fc-daygrid-dot-event,
.shi-events-widget .fc a.fc-daygrid-block-event {
  background: var(--shi-dot-tint, #a53e510f) !important;
  border: 1px solid var(--shi-dot-soft, #a53e5166) !important;
  border-radius: 5px;
  color: #171717 !important;
  padding: 2px 4px !important;
  font-size: .72rem;
  transition: opacity .15s ease;
}
.shi-events-widget .fc a.fc-daygrid-dot-event:hover,
.shi-events-widget .fc a.fc-daygrid-block-event:hover {
  opacity: .72;
  background: var(--shi-dot-tint, #a53e510f) !important;
  border: 1px solid var(--shi-dot-soft, #a53e5166) !important;
}
.shi-events-widget .fc a.fc-daygrid-dot-event:focus-visible,
.shi-events-widget .fc a.fc-daygrid-block-event:focus-visible {
  background: var(--shi-dot-tint, #a53e510f) !important;
  border: 1px solid var(--shi-dot-soft, #a53e5166) !important;
}
.shi-events-widget .fc .fc-daygrid-dot-event { align-items: flex-start; }
.shi-events-widget .fc .fc-daygrid-dot-event .fc-daygrid-event-dot { margin-top: 4px; flex: 0 0 auto; }
.shi-events-widget .fc .fc-daygrid-dot-event .fc-event-title {
  display: block;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  line-height: 1.3;
  min-width: 0;
  flex: 1 1 auto;
}
.shi-events-widget .fc .fc-daygrid-event .fc-event-title,
.shi-events-widget .fc .fc-daygrid-event .fc-event-time,
.shi-events-widget .fc .fc-list-event-title a,
.shi-events-widget .fc .fc-list-event-time {
  color: #171717 !important;
  -webkit-text-fill-color: #171717 !important;
  text-decoration: none !important;
  font-weight: 400 !important;
}
.shi-events-widget .fc .fc-daygrid-event .fc-event-time { margin-right: 4px; flex: 0 0 auto; }
.shi-events-widget .fc a.fc-daygrid-dot-event.shi-timed-event .fc-daygrid-event-dot { display: none; }
.shi-events-widget .fc a.fc-daygrid-dot-event.shi-timed-event .fc-event-time {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  flex: 0 0 auto;
  width: max-content;
  min-width: 20px;
  height: auto;
  margin: -2px 5px -2px -4px;
  padding: 0 3px;
  border-radius: 4px 0 0 4px;
  border-right: 1px solid var(--shi-dot-soft, #a53e5166);
  background: transparent;
  color: #171717 !important;
  -webkit-text-fill-color: #171717 !important;
  font-size: 9px;
  font-weight: 600 !important;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

/* Multi-day events are continuous ranges; keep their month-view row slim. */
.shi-events-widget .fc a.fc-daygrid-block-event.shi-date-range {
  min-height: 22px;
  padding: 1px 6px !important;
  border-color: var(--shi-dot-soft, #a53e5166) !important;
  border-left: 2px solid var(--shi-dot-soft, #a53e5166) !important;
  background: color-mix(in srgb, var(--shi-dot-color, #a53e51) 2%, transparent) !important;
}
.shi-events-widget .fc a.fc-daygrid-block-event.shi-date-range:hover,
.shi-events-widget .fc a.fc-daygrid-block-event.shi-date-range:focus-visible {
  opacity: 1;
  border-color: var(--shi-dot-soft, #a53e5166) !important;
  border-left-color: var(--shi-dot-soft, #a53e5166) !important;
  background: color-mix(in srgb, var(--shi-dot-color, #a53e51) 6%, transparent) !important;
}
.shi-events-widget .fc a.fc-daygrid-block-event.shi-date-range .fc-event-time {
  display: none !important;
}
.shi-events-widget .fc a.fc-daygrid-block-event.shi-date-range .fc-event-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
}
.shi-events-widget .fc .fc-daygrid-event-dot,
.shi-events-widget .fc .fc-list-event-dot {
  border-color: var(--shi-dot-medium, #a53e5199) !important;
}
.shi-events-widget .fc .fc-list-event:hover td,
.shi-events-widget .fc .fc-list-event:focus-within td { background: #f5f5f5 !important; }
.shi-events-widget .fc .fc-list-day-cushion { background: #fafafa; }
.shi-events-widget .fc .fc-button-primary,
.shi-events-widget .fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #f8f8f8;
  border-color: #dedede;
  color: #292929;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.shi-events-widget .fc .fc-button-primary:hover:not(:disabled),
.shi-events-widget .fc .fc-button-primary:focus:not(:disabled) {
  background: #efefef;
  border-color: #d4d4d4;
  color: #171717;
}
.shi-events-widget .fc .fc-button-primary:not(:disabled).fc-button-active { background: #eaeaea; }
.shi-events-widget .fc .fc-dayGridMonth-button,
.shi-events-widget .fc .fc-listMonth-button { background: #fdfdfd; }
.shi-events-widget .fc .fc-dayGridMonth-button:not(:disabled).fc-button-active,
.shi-events-widget .fc .fc-listMonth-button:not(:disabled).fc-button-active { background: #f5f5f5; }
.shi-events-widget .fc .fc-dayGridMonth-button:hover:not(:disabled),
.shi-events-widget .fc .fc-listMonth-button:hover:not(:disabled) { background: #f8f8f8; }
.shi-events-widget .fc .fc-prev-button,
.shi-events-widget .fc .fc-next-button,
.shi-events-widget .fc .fc-prev-button:hover:not(:disabled),
.shi-events-widget .fc .fc-next-button:hover:not(:disabled),
.shi-events-widget .fc .fc-prev-button:focus:not(:disabled),
.shi-events-widget .fc .fc-next-button:focus:not(:disabled) {
  background: transparent;
  border-color: transparent;
  color: #858585;
  box-shadow: none;
}
.shi-events-widget .fc .fc-prev-button:hover:not(:disabled),
.shi-events-widget .fc .fc-next-button:hover:not(:disabled) { color: #292929; }
.shi-events-widget .fc .fc-button:focus-visible { outline-color: #777; }
.shi-events-widget .shi-category-filter { border-color: #d6d6d6; color: #171717; }

/* Category picker: use the same dot color as the matching calendar events. */
.shi-events-widget .shi-category-control {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 26px;
  color: #171717;
  font-size: .85rem;
  font-weight: 600;
}
.shi-events-widget .shi-category-filter[hidden] { display: none !important; }
.shi-events-widget .shi-category-picker {
  position: relative;
  min-width: 205px;
  font-weight: 400;
}
.shi-events-widget .shi-category-picker summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #d6dce3;
  border-radius: 7px;
  background: #fff;
  color: #171717;
  cursor: pointer;
  list-style: none;
}
.shi-events-widget .shi-category-picker summary::-webkit-details-marker { display: none; }
.shi-events-widget .shi-category-picker summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin: -3px 2px 0 auto;
  border-right: 1.5px solid #777;
  border-bottom: 1.5px solid #777;
  transform: rotate(45deg);
}
.shi-events-widget .shi-category-picker[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.shi-events-widget .shi-category-picker summary:focus-visible,
.shi-events-widget .shi-category-option:focus-visible { outline: 2px solid #547ba5; outline-offset: 2px; }
.shi-events-widget .shi-category-selected-dot,
.shi-events-widget .shi-category-dot {
  display: inline-block;
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--shi-category-color, #a53e5199);
}
.shi-events-widget .shi-category-selected-dot[hidden] { display: none; }
.shi-events-widget .shi-category-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(320px, calc(100vw - 32px));
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #d6dce3;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20,35,50,.12);
}
.shi-events-widget .shi-category-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #171717;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.shi-events-widget .shi-category-option:first-child { padding-left: 27px; }
.shi-events-widget .shi-category-option:hover,
.shi-events-widget .shi-category-option[aria-pressed="true"] { background: #f4f7fb; }
@media (max-width: 700px) {
  .shi-events-widget .shi-category-control { display: block; margin-bottom: 22px; }
  .shi-events-widget .shi-category-label { display: block; margin-bottom: 8px; }
  .shi-events-widget .shi-category-picker { width: 100%; }
  .shi-events-widget .shi-category-options { width: 100%; }
}

.shi-events-widget .shi-filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 26px;
}
.shi-events-widget .shi-filter-controls .shi-category-control { margin: 0; }
.shi-events-widget .shi-search-control {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #171717;
  font-size: .85rem;
  font-weight: 600;
}
.shi-events-widget .shi-search-input-wrap { position: relative; width: 240px; max-width: 100%; }
.shi-events-widget .shi-event-search {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 7px 34px 7px 11px;
  border: 1px solid #d6dce3;
  border-radius: 7px;
  background: #fff;
  color: #171717;
  font: inherit;
  font-weight: 400;
}
.shi-events-widget .shi-event-search::-webkit-search-cancel-button { -webkit-appearance: none; }
.shi-events-widget .shi-event-search:focus-visible,
.shi-events-widget .shi-search-clear:focus-visible { outline: 2px solid #777; outline-offset: 2px; }
.shi-events-widget .shi-search-clear {
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.shi-events-widget .shi-search-clear:hover { background: #f4f4f4; color: #171717; }
.shi-events-widget .shi-search-clear[hidden],
.shi-events-widget .shi-calendar-filter-status[hidden] { display: none !important; }
.shi-events-widget .shi-calendar-filter-status { margin: 12px 0 0; color: #555; font-size: .85rem; }
@media (max-width: 700px) {
  .shi-events-widget .shi-filter-controls { display: block; }
  .shi-events-widget .shi-filter-controls .shi-category-control { margin-bottom: 16px; }
  .shi-events-widget .shi-search-control { display: block; }
  .shi-events-widget .shi-search-label { display: block; margin-bottom: 8px; }
  .shi-events-widget .shi-search-input-wrap { width: 100%; }
}

/* Keep the event details popup in the calendar's quiet grey palette. */
.shi-modal .shi-modal-panel { background: #fafafa; border-color: #e5e5e5; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.shi-modal .shi-modal-panel .shi-modal-header {
  background: #f8f8f8 !important;
  border-bottom-color: #e5e5e5 !important;
}
.shi-modal .shi-modal-panel .shi-modal-title { color: #171717; }
.shi-modal .shi-modal-panel .shi-modal-eyebrow,
.shi-modal .shi-modal-panel .shi-modal-subheading { color: #626262 !important; }
.shi-modal .shi-modal-panel .shi-modal-category-badge {
  background: var(--shi-modal-category-tint, #a53e510f) !important;
  border-color: var(--shi-modal-category-border, #a53e5166) !important;
  color: var(--shi-modal-category-color, #a53e51) !important;
  -webkit-text-fill-color: var(--shi-modal-category-color, #a53e51) !important;
}
.shi-modal .shi-modal-panel .shi-modal-meta-icon { background: #fafafa; color: #626262; }
.shi-modal .shi-modal-panel .shi-modal-meta,
.shi-modal .shi-modal-panel .shi-modal-field { border-bottom-color: #ececec; }
.shi-modal .shi-modal-panel .shi-modal-actions {
  background: #f5f5f5;
  border-top-color: #e5e5e5;
}
.shi-modal .shi-modal-panel .shi-add-calendar-button,
.shi-modal .shi-modal-panel .shi-directions-button,
.shi-modal .shi-modal-panel .shi-directions-button:link,
.shi-modal .shi-modal-panel .shi-directions-button:visited {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #dedede !important;
  border-radius: 6px;
  background: #fbfbfb !important;
  color: #292929 !important;
  -webkit-text-fill-color: #292929 !important;
  font-size: .82rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0,0,0,.05) !important;
}
.shi-modal .shi-modal-panel .shi-add-calendar-button:hover,
.shi-modal .shi-modal-panel .shi-add-calendar-button:focus-visible,
.shi-modal .shi-modal-panel .shi-directions-button:hover,
.shi-modal .shi-modal-panel .shi-directions-button:focus-visible {
  background: #f3f3f3 !important;
  border-color: #d4d4d4 !important;
  color: #171717 !important;
  -webkit-text-fill-color: #171717 !important;
}
.shi-modal .shi-modal-panel .shi-add-calendar-button:focus-visible,
.shi-modal .shi-modal-panel .shi-directions-button:focus-visible,
.shi-modal .shi-modal-panel .shi-modal-close:focus-visible {
  outline: 2px solid #777;
  outline-offset: 2px;
}
.shi-modal .shi-modal-panel .shi-modal-close {
  border-color: #dedede;
  background: #fbfbfb;
  color: #626262;
}
.shi-modal .shi-modal-panel .shi-modal-close:hover { background: #f3f3f3; color: #171717; }
.shi-modal .shi-modal-panel .shi-modal-external-link,
.shi-modal .shi-modal-panel .shi-modal-location-link {
  color: #3f3f3f !important;
  -webkit-text-fill-color: #3f3f3f !important;
}
.shi-modal .shi-modal-panel .shi-modal-external-link:hover,
.shi-modal .shi-modal-panel .shi-modal-location-link:hover {
  color: #171717 !important;
  -webkit-text-fill-color: #171717 !important;
}
.shi-modal .shi-modal-panel .shi-modal-meta-value,
.shi-modal .shi-modal-panel .shi-modal-location-link,
.shi-modal .shi-modal-panel .shi-modal-external-link {
  font-weight: 500 !important;
}
