/* Facilities browse — calm list-first chrome (matches Events / Groups) */

.fac-browse-panel {
  position: relative;
  z-index: 6;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, #f0faf4 100%);
  border: 1px solid rgba(46, 125, 50, 0.12);
  box-shadow: 0 4px 18px rgba(30, 58, 138, 0.06);
  isolation: isolate;
}

.fac-browse-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: stretch;
}
.fac-browse-head .fac-browse-primary {
  display: contents;
}

.fac-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 8px 10px;
  border: 2px solid rgba(30, 58, 138, 0.1);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  text-align: left;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  min-width: 0;
}
.fac-pill:hover {
  background: #fff;
  border-color: rgba(46, 125, 50, 0.28);
}
.fac-pill.on {
  background: linear-gradient(145deg, #1b5e20 0%, #2e7d32 100%);
  border-color: #1b5e20;
  color: #fff;
  box-shadow: 0 6px 18px rgba(27, 94, 32, 0.3);
}
.fac-pill:not(.on) .fac-pill-label {
  color: #1e3a8a;
}
.fac-pill:not(.on) .fac-pill-hint {
  color: #475569;
  opacity: 1;
}
.fac-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(46, 125, 50, 0.1);
  flex-shrink: 0;
  font-size: 17px;
}
.fac-pill.on .fac-pill-icon {
  background: rgba(255, 255, 255, 0.22);
  color: var(--py, #f9a825);
}
.fac-pill-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}
.fac-pill-label {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.fac-pill-hint {
  font-size: 9px;
  font-weight: 600;
  line-height: 1.25;
}
.fac-pill.on .fac-pill-label,
.fac-pill.on .fac-pill-hint {
  color: #fff;
}
.fac-pill.on .fac-pill-hint {
  opacity: 0.95;
}

.fac-refine-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: linear-gradient(145deg, #66bb6a 0%, #43a047 55%, #2e7d32 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
  grid-column: 4;
  grid-row: 1;
}
.fac-refine-trigger[hidden] { display: none !important; }
.fac-refine-trigger:hover { transform: translateY(-1px); }
.fac-refine-trigger.is-open {
  background: linear-gradient(145deg, var(--pn) 0%, #2a4fad 100%);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.28), inset 0 0 0 2px rgba(129, 199, 132, 0.5);
}
.fac-refine-trigger-icon { font-size: 22px; line-height: 1; }
.fac-refine-active-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #2e7d32;
}
.fac-refine-active-dot[hidden] { display: none !important; }

.fac-browse-extra {
  display: none;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(46, 125, 50, 0.1);
}
.fac-browse-extra.is-open { display: flex; }
.fac-browse-extra[hidden] { display: none !important; }

.fac-browse-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fac-sec-wrap {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.fac-sec-wrap .fac-sec-btn {
  flex: 1;
  min-width: 0;
}
.fac-tip-btn {
  flex-shrink: 0;
  align-self: stretch;
  width: 36px;
  min-height: 40px;
  padding: 0;
  border: 1.5px solid rgba(30, 58, 138, 0.12);
  border-radius: 10px;
  background: #fff;
  color: #2e7d32;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.fac-tip-btn:hover,
.fac-tip-btn:focus-visible {
  background: #e8f5e9;
  border-color: rgba(46, 125, 50, 0.35);
  color: #1b5e20;
}
.fac-tip-btn.is-open {
  background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #43a047;
  color: #1b5e20;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.22);
}
.fac-tip-btn i { pointer-events: none; }
.fac-sec-wrap:has(.fac-sec-btn.on) .fac-tip-btn {
  border-color: rgba(46, 125, 50, 0.28);
}
.fac-sec-btn {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1.5px solid rgba(30, 58, 138, 0.12);
  border-radius: 10px;
  background: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.fac-sec-btn i { font-size: 14px; opacity: 0.85; }
.fac-sec-btn:hover {
  background: #f1f8e9;
  border-color: rgba(46, 125, 50, 0.25);
  color: var(--pgd);
}
.fac-sec-btn.on {
  background: #e8f5e9;
  border-color: var(--pg);
  color: var(--pgd);
  font-weight: 700;
}
/* Tools row */
.fac-tools-bar {
  position: relative;
  margin-bottom: 0;
  z-index: 2;
}
.fac-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fac-tools-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(30, 58, 138, 0.08), inset 0 0 0 1px rgba(30, 58, 138, 0.1);
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
  cursor: pointer;
  min-width: 0;
}
.fac-tools-btn.is-open {
  box-shadow: 0 4px 14px rgba(46, 125, 50, 0.18), inset 0 0 0 2px rgba(249, 168, 37, 0.4);
}
.fac-tools-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(46, 125, 50, 0.1);
  font-size: 15px;
  flex-shrink: 0;
}
.fac-tools-btn.is-open .fac-tools-btn-icon {
  background: linear-gradient(145deg, var(--pgd) 0%, #43a047 100%);
  color: #fff;
}
.fac-tools-btn-label {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fac-tools-btn.has-active {
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.2), inset 0 0 0 1px rgba(76, 175, 80, 0.35);
}
.fac-tools-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1335;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(2px);
}
.fac-tools-backdrop.open { display: block; }

.fac-tools-popover {
  display: none;
  position: fixed;
  z-index: 1338;
  margin: 0;
  padding: 0;
  border-radius: 16px;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 48%, #f1f8e9 100%);
  border: 1px solid rgba(30, 58, 138, 0.1);
  box-shadow:
    0 4px 6px rgba(30, 58, 138, 0.04),
    0 20px 48px rgba(30, 58, 138, 0.16);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1), transform 0.24s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.fac-tools-popover.open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translateY(0) scale(1);
}
.fac-tools-popover-hd {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
  background: linear-gradient(135deg, rgba(241, 248, 233, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  border-bottom: 1px solid rgba(46, 125, 50, 0.12);
}
.fac-tools-popover-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #1b5e20;
}
.fac-tools-popover-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -6px -8px -6px 0;
  border: none;
  border-radius: 10px;
  background: rgba(46, 125, 50, 0.08);
  color: var(--pgd);
  font-size: 18px;
  cursor: pointer;
}
.fac-tools-popover-ft {
  flex-shrink: 0;
  padding: 10px 14px 14px;
  border-top: 0.5px solid var(--pb);
}
.fac-tools-popover-ft .btn { width: 100%; min-height: 44px; }

.fac-filters-popover .fac-filters-panel,
.fac-filters-popover .module-filters-panel {
  display: block !important;
  border: none !important;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.fac-filters-popover:not(.open) .fac-filters-panel { display: none !important; }

.fac-search-popover .fac-sw {
  margin: 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(30, 58, 138, 0.12);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}
.fac-search-popover .fac-sw:focus-within {
  border-color: rgba(46, 125, 50, 0.45);
  box-shadow: 0 0 0 3px rgba(129, 199, 132, 0.2);
}
.fac-search-popover .fac-sw i { color: #2e7d32; }
.fac-search-popover .fac-sw input {
  font-size: 14px;
  color: #0f172a;
}

.fac-sort-section {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30, 58, 138, 0.08);
  background: rgba(255, 255, 255, 0.6);
}
.fac-sort-section .filter-panel-label {
  margin-bottom: 6px;
  color: #334155;
  font-weight: 700;
}
.fac-sort-section .fi {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
}

.fac-qf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 8px;
  background: rgba(255, 255, 255, 0.5);
}
.fac-filters-popover .fac-qf-chip {
  background: #fff;
  color: #334155;
  border: 1.5px solid rgba(30, 58, 138, 0.12);
  font-size: 11px;
  font-weight: 600;
}
.fac-filters-popover .fac-qf-chip.on {
  background: #e8f5e9;
  border-color: #43a047;
  color: #1b5e20;
}
.fac-filters-popover .filter-panel-label {
  color: #475569;
  font-weight: 700;
}
.fac-filters-popover .filter-panel-section {
  padding-left: 14px;
  padding-right: 14px;
}
.fac-filters-popover .fac-amenity-chip,
.fac-filters-popover .fac-type-chip {
  color: #334155;
}

@media (max-width: 767px) {
  .fac-browse-head {
    grid-template-columns: 1fr 1fr auto;
  }
  .fac-browse-head .fac-pill--bookings {
    grid-column: 1 / -1;
  }
  .fac-refine-trigger {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: stretch;
  }
}

@media (min-width: 1024px) {
  .fac-browse-panel { padding: 14px 16px; }
  .fac-pill-label { font-size: 13px; }
  .fac-pill-hint { font-size: 10px; }
}

/* Calendar / Insights hover tooltips (fac-tooltips.js) */
.fac-tip-popover {
  position: fixed;
  z-index: 1342;
  max-width: min(292px, calc(100vw - 24px));
  border-radius: 14px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 42%, #f1f8e9 100%);
  border: 1px solid rgba(46, 125, 50, 0.22);
  box-shadow:
    0 4px 8px rgba(30, 58, 138, 0.06),
    0 16px 40px rgba(30, 58, 138, 0.14);
}
.fac-tip-popover--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.fac-tip-popover--above {
  transform: translateY(-6px) scale(0.98);
}
.fac-tip-popover--above.fac-tip-popover--visible {
  transform: translateY(0) scale(1);
}
.fac-tip-popover-accent {
  height: 4px;
  background: linear-gradient(90deg, #43a047 0%, #66bb6a 50%, #2e7d32 100%);
}
.fac-tip-popover-inner {
  padding: 12px 14px 13px;
}
.fac-tip-popover-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.fac-tip-popover-hd-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.fac-tip-popover-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -4px -6px 0 0;
  border: none;
  border-radius: 8px;
  background: rgba(46, 125, 50, 0.1);
  color: #1b5e20;
  font-size: 16px;
  cursor: pointer;
}
.fac-tip-popover-close:hover {
  background: rgba(46, 125, 50, 0.18);
}
.fac-tip-popover-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
  color: #1b5e20;
  font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.fac-tip-popover-title {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: #1b5e20;
  letter-spacing: 0.01em;
}
.fac-tip-popover-body {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55;
  color: #334155;
}
.fac-tip-popover-foot {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(46, 125, 50, 0.12);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: #64748b;
}
.fac-tip-popover-foot[hidden] {
  display: none;
}
