/**
 * Shared search-UI styles (Events / Studios / Teachers) — used on BOTH sites.
 * Moved verbatim from buddyboss-theme-child/assets/css/custom.css (2026-07-06).
 * The `.buddypress .buddypress-wrap` override rules at the bottom only match on
 * the community site and are harmless on insideyoga.org.
 */
/* ==========================================================================
   Shared search-page heading (Events / Studios / Teachers)
   ========================================================================== */
.iy-search-head {
  margin: 40px 0;
}
/* !important + double class to beat BuddyPress' `body.buddypress .buddypress-wrap h1…h6`
   margin override (specificity 0,2,2) on the Teachers directory. */
.iy-search-head .iy-search-head__title {
  margin: 0 0 4px !important;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bb-headings-color, #1c2b2c);
}
.iy-search-head .iy-search-head__subtitle {
  margin: 0 !important;
  font-size: 15px;
  line-height: 1.5;
  color: var(--bb-alternate-text-color, #6b6b6b);
}

/* insideyoga.org (remote mode, body class from includes/assets.php): heading in
   the style of the other Divi subpages (measured on /all-studios/ 16.11.2026:
   H1 40/56 700 black centred, intro 20/28 400 black centred, max 850px),
   100px space above the footer, and inputs hardened against Divi's
   `input[type=text] { padding: 2px }` reset (placeholder sat on the border). */
.iy-disc-remote .iy-search-head {
  margin: 40px auto 56px;
  text-align: center;
}
.iy-disc-remote .iy-search-head .iy-search-head__title {
  margin: 0 0 24px !important;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.4;
  color: #000;
  text-align: center;
  padding: 0;
}
.iy-disc-remote .iy-search-head .iy-search-head__subtitle {
  max-width: 850px;
  margin: 0 auto !important;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4;
  color: #000;
  text-align: center;
  padding: 0;
}
.iy-disc-remote .iy-sdir,
.iy-disc-remote .iy-event-search,
.iy-disc-remote .iy-mdir {
  margin-bottom: 100px;
}
.iy-disc-remote .iy-sdir .iy-sdir-filter-input {
  padding: 10px 14px;
  border: 1px solid var(--bb-content-border-color, #e4e4e4);
  border-radius: 12px;
}
/* Head background (mockup variant A, Alessio 16.11.2026): the site's beige
   fading to white behind heading and filter box; the box gets a soft shadow. */
.iy-disc-remote #main-content:has(.iy-search-head) {
  background: linear-gradient(180deg, #f4f1ed 0, #f6f3ef 300px, #fff 560px) no-repeat #fff;
}
.iy-disc-remote .iy-search-filters {
  box-shadow: 0 10px 34px rgba(60, 45, 20, 0.07);
}
@media (max-width: 600px) {
  .iy-disc-remote .iy-search-head .iy-search-head__title {
    font-size: 30px;
    margin-bottom: 16px !important;
  }
  .iy-disc-remote .iy-search-head .iy-search-head__subtitle {
    font-size: 17px;
  }
  .iy-disc-remote .iy-sdir,
  .iy-disc-remote .iy-event-search,
  .iy-disc-remote .iy-mdir {
    margin-bottom: 64px;
  }
}

/* Shared white filter box wrapping filters + footer (Events / Studios / Teachers) */
.iy-search-filters {
  background: var(--iy-card, #fff);
  border: 1px solid var(--iy-line, #e4e4e4);
  border-radius: 16px; /* matches result cards */
  padding: 20px 24px;
  margin-bottom: 20px;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Shared footer row inside the filter box: info left, actions right */
.iy-search-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--bb-content-border-color, #e4e4e4);
  padding-top: 16px;
}
.iy-search-foot__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Shared result count text (icon + text) */
.iy-search-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--bb-alternate-text-color, #6b6b6b);
}
.iy-search-count i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
}
.iy-search-count svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Shared level/filter pill (Studios / Teachers) — base, hover, active.
   !important on the contested visual props makes these win on ANY page,
   independent of BuddyBoss's high-specificity `button`/`.buddypress-wrap` rules. */
.iy-search-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 14px !important;
  border: 1px solid var(--bb-content-border-color, #e4e4e4) !important;
  border-radius: 100px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500 !important;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: var(--bb-body-text-color, #555) !important;
  background: var(--bb-body-background-color, #fafafa) !important;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: none !important;
}
.iy-search-pill:hover,
.iy-search-pill:focus {
  border-color: var(--bb-primary-color, #3b6063) !important;
  color: var(--bb-primary-color, #3b6063) !important;
  background: var(--bb-body-background-color, #fafafa) !important;
}
/* Active state — Studios toggles .is-active on the pill; Teachers uses a checked
   checkbox sibling (.iy-filter-pill__input:checked + .iy-search-pill). */
.iy-search-pill.is-active,
.iy-search-pill.is-active:hover,
.iy-filter-pill__input:checked + .iy-search-pill {
  background: var(--bb-primary-color, #3b6063) !important;
  border-color: var(--bb-primary-color, #3b6063) !important;
  color: #fff !important;
}

/* Shared "Open Map" toggle — solid teal pill (Events / Studios / Teachers) */
.iy-search-maptoggle {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 20px !important;
  border: none !important;
  border-radius: 100px;
  background-color: var(--iy-teal, #3b6063) !important;
  color: #fff !important;
  font-size: 13px !important; /* BB's #buddypress button rules override it on /members/ */
  font-weight: 500 !important;
  line-height: 1.4;
  white-space: nowrap !important;
  cursor: pointer;
  transition: background-color 0.2s ease;
  box-shadow: none !important;
}
.iy-search-maptoggle svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.iy-search-maptoggle:hover:not(:disabled),
.iy-search-maptoggle:focus,
.iy-search-maptoggle.is-active {
  background-color: color-mix(in srgb, var(--iy-teal, #3b6063) 85%, #000) !important;
  color: #fff !important;
}
.iy-search-maptoggle:disabled,
.iy-search-maptoggle.is-inactive {
  opacity: 0.5;
  cursor: default;
}

/* Shared reset link — red text with X icon (Events / Studios / Teachers) */
.iy-search-reset {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  font-size: 13px;
  font-weight: 500 !important;
  text-decoration: none;
  color: #d94040 !important;
  cursor: pointer;
  transition: color 0.15s ease;
  box-shadow: none !important;
}
.iy-search-reset svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.iy-search-reset:hover,
.iy-search-reset:focus {
  color: #b52e2e !important;
  background: transparent !important;
  text-decoration: none;
}
.iy-search-reset.is-inactive {
  color: var(--bb-content-border-color, #ccc) !important;
  pointer-events: none;
  cursor: default;
}

/* ----------------------------------------------------------------------------
   BuddyPress override guard (Teachers directory).
   BuddyBoss wraps directories in `.buddypress .buddypress-wrap` and applies
   high-specificity generic button/link rules (e.g.
   `.buddypress .buddypress-wrap button:hover` = 0,3,1) plus base button styles
   that hijack display/white-space/background on our single-class shared
   components — causing the map toggle to wrap and hovers to look wrong. Re-assert
   the shared look at matching/higher specificity, scoped to those pages only.
   ---------------------------------------------------------------------------- */
.buddypress .buddypress-wrap .iy-search-maptoggle {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none !important;
  border-radius: 100px;
  background-color: var(--iy-teal, #3b6063) !important;
  color: #fff !important;
  font-weight: 500;
  white-space: nowrap !important;
  line-height: 1.4;
}
.buddypress .buddypress-wrap .iy-search-maptoggle:hover,
.buddypress .buddypress-wrap .iy-search-maptoggle:focus,
.buddypress .buddypress-wrap .iy-search-maptoggle.is-active {
  background-color: color-mix(in srgb, var(--iy-teal, #3b6063) 85%, #000) !important;
  color: #fff !important;
  border: none !important;
}
.buddypress .buddypress-wrap .iy-search-pill:hover,
.buddypress .buddypress-wrap .iy-search-pill:focus {
  border-color: var(--bb-primary-color, #3b6063) !important;
  color: var(--bb-primary-color, #3b6063) !important;
  background: var(--bb-body-background-color, #fafafa) !important;
}
.buddypress .buddypress-wrap .iy-search-pill.is-active,
.buddypress .buddypress-wrap .iy-filter-pill__input:checked + .iy-search-pill {
  background: var(--bb-primary-color, #3b6063) !important;
  border-color: var(--bb-primary-color, #3b6063) !important;
  color: #fff !important;
}
.buddypress .buddypress-wrap .iy-search-reset:hover,
.buddypress .buddypress-wrap .iy-search-reset:focus {
  background: transparent !important;
  color: #b52e2e !important;
}

/* ----------------------------------------------------------------------------
   Phones (≤ 600px, ticket 3 mobile pass, 2026-10-12): the footer row (count |
   reset + map toggle) did not fit — the count wrapped into three lines and the
   map toggle ran past the screen edge. Wrap the actions onto their own full
   row, keep labels on one line, and give the touch targets ~44px for 40+.
   ---------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .iy-search-head {
    margin: 24px 0;
  }
  .iy-search-filters {
    padding: 16px;
  }
  .iy-search-foot {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .iy-search-foot__actions {
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .iy-search-count {
    font-size: 14px;
    white-space: nowrap;
  }
  .iy-search-reset {
    min-height: 44px;
    font-size: 14px;
    white-space: nowrap;
  }
  .iy-search-maptoggle {
    min-height: 44px;
    padding: 10px 20px !important;
    font-size: 14px !important;
  }
  .iy-search-pill {
    min-height: 40px;
    padding: 8px 16px !important;
    font-size: 14px;
  }

  /* Google Places suggestions (appended to <body>, so not scopable): rows were
     ~30px high with 13px text. Applies to every Places field on the site. */
  .pac-item {
    padding: 8px 10px;
    font-size: 14px;
    line-height: 26px;
  }
  .pac-item-query {
    font-size: 15px;
  }
}

/* Leaflet gives its panes/controls z-index 400–1000, so while scrolling the
   zoom buttons slid OVER the sticky site header. isolation keeps all of that
   inside the map's own stacking context (ticket 3, all widths). */
.iy-event-search__map,
.iy-sdir-map,
.iy-mdir-map {
  isolation: isolate;
}

/* Leaflet zoom buttons (30px by default) are too small to hit on a phone.
   (Detail maps carry the same rule in their own CSS: detail pages do not load
   this file in remote mode.) */
@media (max-width: 768px) {
  .iy-event-search__map .leaflet-bar a,
  .iy-sdir-map .leaflet-bar a,
  .iy-mdir-map .leaflet-bar a {
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 20px;
  }
}

/* OSM tiles in Positron-grey: CARTO watermarks its free basemaps since 2026
   ("API KEY REQUIRED"), so we serve OSM and grey it client-side. */
.iy-tile-gray {
  filter: grayscale(1) contrast(0.92) brightness(1.06);
}
