/* Events page: compact search bar + filters dialog + removable active-filter chips.
   px units (the theme sets html{font-size:10px}). */
.evf-lock, .evf-lock body { overflow: hidden; }

.evf-bar { display: flex; gap: 10px; margin: -64px auto 14px; position: relative; }
.evf-search { position: relative; flex: 1 1 auto; min-width: 0; }
.evf-search .ifp-input { width: 100%; padding-right: 56px; border-color: #e6ebe8; }
.evf-search__go {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px;
  background: #0aae70; color: #fff; cursor: pointer;
}
.evf-search__go:hover { background: #078658; }
.evf-open {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 1px solid #e6ebe8; border-radius: 16px; background: #fff; color: #072366;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.evf-open:hover { border-color: #0aae70; }
.evf-open__n {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; background: #072366; color: #fff; font-size: 12px; font-weight: 800;
}
.evf-search__go:focus-visible, .evf-open:focus-visible, .evf-close:focus-visible, .evf-active a:focus-visible {
  outline: 3px solid rgba(10, 174, 112, .45); outline-offset: 2px;
}

/* Active filters */
.evf-active { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.evf-active li { max-width: 100%; }
.evf-active a {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 34px; padding: 0 12px 0 14px;
  border: 1px solid #cfe9dd; border-radius: 999px; background: #eff8f4; color: #072366 !important;
  font-size: 14px; font-weight: 600; text-decoration: none !important; overflow-wrap: anywhere;
}
.evf-active a span { font-size: 18px; line-height: 1; color: #078658; }
.evf-active a:hover { border-color: #0aae70; }
.evf-active .evf-active__clear {
  padding: 0 6px; border-color: transparent; background: transparent; color: #078658 !important; text-decoration: underline !important;
}

/* Dialog: full screen on mobile, centred card on desktop */
.evf-dialog {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: #fff; color: #072366; flex-direction: column; overflow: hidden;
}
.evf-dialog[open] { display: flex; }
.evf-dialog::backdrop { background: rgba(7, 35, 102, .45); }
.evf-dialog__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid #e6ebe8;
}
.evf-dialog__head h2 { margin: 0; color: #072366; font-size: 20px; font-weight: 800; outline: 0; }
.evf-close {
  flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid #e6ebe8; border-radius: 999px; background: #fff; color: #072366; cursor: pointer;
}
.evf-close:hover { border-color: #0aae70; }
.evf-dialog__body { flex: 1 1 auto; overflow-y: auto; padding: 4px 20px 12px; }
.evf-sec { min-width: 0; margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid #e6ebe8; }
.evf-sec:last-child { border-bottom: 0; }
.evf-sec__title {
  display: block; float: none; width: 100%; margin: 0 0 12px; padding: 0;
  color: #072366; font-size: 15px; font-weight: 800; line-height: 1.4;
}
/* A legend sits in the fieldset's border box, so its top spacing lives on the legend itself. */
fieldset.evf-sec { padding-top: 0; }
legend.evf-sec__title { padding-top: 18px; }
.evf-sec__title span { margin-left: 6px; color: #777; font-size: 13px; font-weight: 600; }
.evf-sec .ifp-input { width: 100%; }
.evf-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.evf-dialog__foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid #e6ebe8; background: #fff; }
.evf-dialog__foot .ifp-btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }

@media (min-width: 681px) {
  .evf-dialog {
    width: min(600px, calc(100% - 48px)); height: auto; max-height: min(760px, calc(100% - 64px));
    margin: auto; border: 1px solid #e6ebe8; border-radius: 18px;
  }
  .evf-dialog__head { padding: 20px 24px; }
  .evf-dialog__body { padding: 4px 24px 12px; }
  .evf-dialog__foot { padding: 16px 24px; }
  .evf-dialog__foot .ifp-btn { flex: 0 0 auto; padding: 0 24px; }
  .evf-dialog__foot #evf-reset { margin-right: auto; }
}

/* Layout: search bar sits inside the grey area with proper breathing room */
.evl-body { padding-top: 32px; }
.evl-body .evf-bar { margin: 0 0 14px; }
@media (min-width: 900px) { .evl-body { padding-top: 40px; } }

/* List / Map switch */
.evl-switch { display: inline-flex; flex: none; padding: 3px; border-radius: 999px; background: #e9efec; }
.evl-switch button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
  background: transparent; color: #072366; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.evl-switch button[aria-selected="true"] { background: #fff; color: #078658; box-shadow: 0 1px 3px rgba(7, 35, 102, .15); }
.evl-switch button:focus-visible { outline: 3px solid rgba(10, 174, 112, .45); outline-offset: 2px; }

/* Map */
.evl-map { height: 62vh; min-height: 380px; max-height: 640px; overflow: hidden; border: 1px solid #e6ebe8; border-radius: 18px;
  background: #e9eeeb; box-shadow: 0 6px 20px rgba(7, 35, 102, .08); z-index: 0; }
.evl-note { margin: 12px 2px 0; color: #6b757c; font-size: 14px; }
.evl-note:empty { display: none; }

/* Associations list: List / Map switch rendered as links */
.evl-switch a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  color: #072366 !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
.evl-switch a[aria-current="page"] { background: #fff; color: #078658 !important; box-shadow: 0 1px 3px rgba(7, 35, 102, .15); }
.evl-switch a:focus-visible { outline: 3px solid rgba(10, 174, 112, .45); outline-offset: 2px; }

/* Associations page: filter bar spacing inside the grey area */
.asf { margin-bottom: 8px; font-size: 16px; }
.asf .evf-bar { margin: 0 0 14px; }
.asf .ifp-results { margin-bottom: 22px; }
