/* MAAA Club Finder - works alongside the UIkit / YOOtheme styles */
.cf-finder { --cf-map-height: 650px; }

.cf-map {
  position: relative;
  z-index: 0; /* keep Leaflet panes below sticky headers, dropdowns and modals */
  height: var(--cf-map-height);
  min-height: 320px;
  border-radius: 4px;
  background: #f3f3f3;
}

.cf-list {
  max-height: var(--cf-map-height);
  overflow-y: auto;
  margin: 0;
  padding-right: 4px;
  overscroll-behavior: contain;
}

/* On phones the list flows with the page instead of being a scroll box inside the scrolling page. */
@media (max-width: 959px) {
  .cf-map { height: auto; aspect-ratio: 1 / 1; }
  .cf-list { max-height: none; overflow-y: visible; padding-right: 0; }
}

/* The theme's meta grey is about 1.9:1 on white; this is the main search feedback, so keep it at WCAG AA (7.4:1). */
.cf-finder .cf-status { color: #555; }

.cf-item { padding: 8px; border-radius: 4px; transition: background-color .2s; }
.cf-item.cf-active { background: rgba(30, 135, 240, .08); }
.cf-item-title { font-weight: 600; font-size: 1rem; text-transform: none; }

.cf-card-header { gap: 8px; }
.cf-logo { width: 48px; height: 48px; object-fit: contain; flex: none; }
.cf-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cf-tag { color: #fff; font-size: .68rem; text-transform: none; line-height: 1.6; }
.cf-details { margin: 6px 0 0; }
.cf-details a { word-break: break-word; }
.cf-description { margin-top: 6px; }
.cf-description > :last-child { margin-bottom: 0; }
.cf-more summary { cursor: pointer; margin-top: 6px; color: #1e87f0; }

.cf-discipline-list { gap: 6px 16px; }
.cf-discipline { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cf-swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--cf-color, #1e87f0); flex: none; }

.cf-busy .cf-status::after {
  content: "";
  display: inline-block;
  width: .8em; height: .8em;
  margin-left: .5em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: -1px;
  animation: cf-spin .7s linear infinite;
}
@keyframes cf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cf-busy .cf-status::after { animation: none; } }

/* Markers and popups */
.cf-pin { background: none; border: 0; }
.cf-pin svg { display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.cf-finder .leaflet-popup-content { margin: 12px 14px; font-size: .875rem; line-height: 1.45; }
.cf-finder .leaflet-popup-content .uk-list > li { margin-top: 2px; }

/* Clusters in the UIkit primary colour */
.cf-finder .marker-cluster-small, .cf-finder .marker-cluster-medium, .cf-finder .marker-cluster-large { background-color: rgba(30, 135, 240, .3); }
.cf-finder .marker-cluster-small div, .cf-finder .marker-cluster-medium div, .cf-finder .marker-cluster-large div { background-color: rgba(30, 135, 240, .85); color: #fff; font-weight: 600; }

/* State filter: room for the longest name plus the dropdown arrow */
.cf-filters select.uk-select.uk-form-small[data-cf-region] {
  padding-left: 15px;
  padding-right: 25px;
}
