/* ── Search Page Layout ── */
.frc-search-page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.frc-search-page__container {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.frc-search-page__sidebar {
  width: var(--frc-sidebar-w);
  background: #fff;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
  z-index: 10;
  flex-shrink: 0;
}

.frc-search-page__header {
  padding: 20px 24px 16px;
  background: #fff;
  flex-shrink: 0;
}

.frc-search-page__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.frc-search-page__intro {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--frc-border);
  border-radius: 20px;
  background: #f7f3eb;
}

.frc-search-page__intro-title {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.3;
}

.frc-search-page__intro-text {
  margin: 0;
  color: var(--frc-text-light);
  line-height: 1.6;
}

.frc-search-page__intro-highlights {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.frc-search-page__intro-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.frc-search-page__intro-card-title {
  margin: 0 0 6px;
  font-size: 14px;
}

.frc-search-page__intro-card-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--frc-text-light);
}

.frc-search-page__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 24px;
}

.frc-search-page__map {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.frc-search-page__map--unavailable {
  background: linear-gradient(180deg, #f6f2ea 0%, #efe7da 100%);
}

#frcMap {
  width: 100%;
  height: 100%;
}

.frc-search-page__map-empty {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
}

.frc-search-page__map-empty-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1f1f1f;
}

.frc-search-page__map-empty-text {
  max-width: 340px;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #5f5a52;
}

/* ── Active card (highlighted from map click) ── */
.frc-search-page .frc-card-run--active {
  background: #f0f7f1;
}

/* ── Search page card overrides ── */
.frc-search-page .frc-card-run__link {
  height: auto;
}

/* ── Card actions (search page only) ── */
.frc-search-page .frc-card-run__actions {
  position: relative;
  z-index: 1;
  padding: 0 14px 12px;
  display: flex;
  gap: 8px;
}

.frc-search-page .frc-card-run__map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}

.frc-search-page .frc-card-run__map-link:hover {
  border-color: #333;
  background: #f5f5f5;
}

/* ── Empty state ── */
.frc-search-empty {
  padding: 24px;
}

.frc-search-empty h5 {
  font-size: 16px;
  margin-bottom: 8px;
}

.frc-search-empty p {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.frc-search-empty a {
  text-decoration: underline;
}

/* ── Map markers ── */
.mapboxgl-marker {
  transition: none !important;
  will-change: transform;
}

.frc-marker-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-weight: 700;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.frc-marker-single {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.frc-marker-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frc-marker-single:hover,
.frc-marker-cluster:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-color: #999;
}

.frc-marker-single.is-active {
  border-color: var(--frc-green, #3d4f42);
  box-shadow: 0 0 0 3px rgba(61, 79, 66, 0.25);
}

/* Mapbox popup */
.mapboxgl-popup-content {
  padding: 0 !important;
  border-radius: 12px;
  overflow: hidden;
  max-width: 260px;
}

.mapboxgl-popup-close-button {
  display: none !important;
}

/* Popup card (replicates run card) */
.frc-popup-card {
  background: #fff;
  font-family: var(--frc-font-primary, "Plus Jakarta Sans", sans-serif);
}

.frc-popup-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--frc-border, #ebebeb);
}

.frc-popup-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frc-popup-card__thumb--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.frc-popup-card__thumb-bg {
  position: absolute;
  inset: -25%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(50px) saturate(1.4);
  opacity: 0.85;
  transform: scale(1.15);
  z-index: 0;
}

.frc-popup-card__thumb--fallback img {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

.frc-popup-card__body {
  padding: 10px 14px 14px;
}

.frc-popup-card__club-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.frc-popup-card__logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  flex-shrink: 0;
}

.frc-popup-card__club-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--frc-text, #1a1a1a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frc-popup-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #777;
  margin-bottom: 10px;
}

.frc-popup-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.frc-popup-card__meta-item + .frc-popup-card__meta-item::before {
  content: "\00b7";
  margin-right: 2px;
  color: #aaa;
  font-weight: 700;
}

.frc-popup-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.frc-popup-card__tag {
  font-size: 11px;
  color: #888;
}

.frc-popup-card__tag + .frc-popup-card__tag::before {
  content: "\00b7";
  margin-right: 6px;
  color: #bbb;
  font-weight: 700;
}

/* ── Title row (title + mobile filter button) ── */
.frc-search-page__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.frc-search-page__filter_buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
}

/* ── Filter trigger button ── */
.frc-filters-mobile-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  font-family: var(--frc-font-primary);
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}

.frc-filters-mobile-btn:hover {
  border-color: #999;
}

.frc-filters-mobile-btn.has-active {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

/* Desktop: centre the filter button in the title row */
@media (min-width: 701px) {
  .frc-search-page__title-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .frc-search-page__title {
    grid-column: 1;
  }

  .frc-filters-mobile-btn {
    grid-column: 2;
    justify-self: center;
  }

  .frc-map-mobile-btn,
  .frc-map-mobile-close {
    display: none !important;
  }

  .frc-search-page__intro-highlights {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── Filter sheet header ── */
.frc-filters-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}

.frc-filters-sheet__header-title {
  font-family: var(--frc-font-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--frc-text, #1a1a1a);
  margin: 0;
}

.frc-filters-sheet__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: #333;
  transition: background 0.15s;
}

.frc-filters-sheet__close:hover {
  background: #f0f0f0;
}

/* ── Filter bottom sheet content ── */
.frc-filters-sheet__body {
  display: flex;
  flex-direction: column;
  padding: 0 16px;
  overflow-y: auto;
}

.frc-filters-sheet__group {
  padding: 4px 0;
  border-bottom: 1px solid var(--frc-border, #ebebeb);
}

.frc-filters-sheet__group:last-child {
  border-bottom: none;
}

.frc-filters-sheet__group-label {
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
}

/* Items inside the filter sheet */
.frc-filters-sheet__group .frc-bottom-sheet__item {
  display: flex;
  align-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  padding: 10px 12px;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: var(--frc-text, #1a1a1a);
}

.frc-filters-sheet__group .frc-bottom-sheet__item:hover {
  background: var(--frc-bg, #f5f5f5);
}

.frc-filters-sheet__group .frc-bottom-sheet__item.active {
  font-weight: 600;
  color: var(--frc-text, #1a1a1a);
  background: transparent;
}

/* Checkmark: hidden by default, shown when active */
.frc-filters-sheet__group .frc-bottom-sheet__check {
  display: none;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--frc-green-dark, #1a4d2e);
}

.frc-filters-sheet__group
  .frc-bottom-sheet__item.active
  .frc-bottom-sheet__check {
  display: block;
}

/* ── Filter sheet footer ── */
.frc-filters-sheet__footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--frc-border, #ebebeb);
}

.frc-filters-sheet__clear,
.frc-filters-sheet__apply {
  flex: 1;
  padding: 12px;
  font-family: var(--frc-font-primary);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--frc-radius-pill, 999px);
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.frc-filters-sheet__clear {
  color: #000;
  background: transparent;
  border: 1px solid #000;
}

.frc-filters-sheet__clear:hover {
  opacity: 0.8;
}

.frc-filters-sheet__apply {
  color: #fff;
  background: var(--frc-green, #3d4f42);
  border: none;
}

.frc-filters-sheet__apply:hover {
  background: var(--frc-green-dark, #3b4c3f);
}

/* ── Mobile city search bar (below header, above map) ── */
.frc-search-page__mobile-search {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Mobile search: full-width bar below header */
  .frc-search-page__mobile-search {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--frc-border, #ebebeb);
    padding: 0;
  }

  .frc-search-page__mobile-search .frc-search {
    max-width: none;
    margin: 0;
  }

  .frc-search-page__mobile-search .frc-search__box {
    box-shadow: none;
    border: 1px solid #d8d8d8;
    padding: 14px 16px;
    border-radius: 0;
  }
}

/* Desktop: turn filter sheet into a centred modal */
@media (min-width: 769px) {
  .frc-filters-sheet {
    align-items: center;
    justify-content: center;
  }

  .frc-filters-sheet .frc-bottom-sheet__panel {
    width: 420px;
    max-width: 90vw;
    max-height: 65vh;
    border-radius: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition:
      transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
      opacity 0.3s ease;
  }

  .frc-filters-sheet.is-open .frc-bottom-sheet__panel {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .frc-filters-sheet.is-closing .frc-bottom-sheet__panel {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition:
      transform 0.25s ease,
      opacity 0.2s ease;
  }

  .frc-filters-sheet .frc-bottom-sheet__handle {
    display: none;
  }
}

@media (max-width: 700px) {
  .frc-search-page {
    height: auto;
    overflow: visible;
  }

  .frc-search-page__container {
    flex-direction: column;
    height: auto;
  }

  .frc-search-page__sidebar {
    width: 100%;
    overflow: visible;
  }

  /* Desktop list visible on mobile by default */
  .frc-search-page__list {
    display: flex;
  }

  /* Map hidden by default on mobile */
  .frc-search-page__map {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 90;
    height: 100vh;
    width: 100vw;
    flex-direction: column;
  }

  /* Map visible when in fullscreen mode */
  .frc-search-page__map.is-open {
    display: flex;
  }

  .frc-search-page__map.is-open #frcMap {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    margin-top: 71px;
  }

  /* Disable direct map interaction on mobile */
  .frc-search-page__map #frcMap {
    pointer-events: none;
  }

  /* Close button inside fullscreen map */
  .frc-map-mobile-close {
    position: absolute;
    top: 78px;
    right: 16px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
  }

  /* Show filter button next to the title */
  .frc-filters-mobile-btn {
    display: inline-flex;
  }

  /* Map button next to filters */
  .frc-map-mobile-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 20px;
    font-family: var(--frc-font-primary);
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    transition:
      border-color 0.15s,
      background 0.15s,
      color 0.15s;
    white-space: nowrap;
  }

  .frc-map-mobile-btn:hover {
    border-color: #999;
  }

  .frc-map-mobile-btn.is-disabled,
  .frc-map-mobile-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  /* Swiper inside fullscreen map */
  .frc-search-page__map-list {
    display: none;
    flex-shrink: 0;
    padding: 0 0 12px;
    background: #fff;
    z-index: 95;
    pointer-events: auto;
    overflow: visible;
    height: auto;
  }

  .frc-search-page__map.is-open .frc-search-page__map-list {
    display: block;
    pointer-events: auto;
  }

  .frc-search-page__map-list-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    padding: 12px 16px 8px;
    color: var(--frc-text, #1a1a1a);
  }

  .frc-search-page__map-list .swiper {
    overflow: visible;
    touch-action: pan-x;
    pointer-events: auto;
  }

  .frc-search-page__map-list .swiper-wrapper {
    pointer-events: auto;
    align-items: flex-start;
  }

  .frc-search-page__map-list .swiper-slide {
    width: 85vw;
    max-width: 320px;
    pointer-events: auto;
    user-select: none;
    height: auto;
  }
}

@media (min-width: 701px) {
  .frc-search-page {
    height: auto;
    overflow: visible;
    position: relative;
  }

  .frc-search-page__container {
    display: flex;
    align-items: flex-start;
  }

  .frc-search-page__sidebar {
    width: var(--frc-sidebar-w, 420px);
    overflow-y: visible;
    flex-shrink: 0;
  }

  /* Pin the full Mapbox wrapper so canvas, controls, and markers stay in sync. */
  .frc-search-page__map {
    position: fixed;
    top: var(--frc-header-height, 60px);
    right: 0;
    width: calc(100% - var(--frc-sidebar-w, 420px));
    height: calc(100vh - var(--frc-header-height, 60px));
    min-height: calc(100vh - var(--frc-header-height, 60px));
    overflow: hidden;
    z-index: 5;
  }

  #frcMap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  /* Prevent grey gaps in Mapbox canvas */
  #frcMap .mapboxgl-canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
  }

  /* Hide mobile map list on desktop */
  .frc-search-page__map-list {
    display: none !important;
  }

  /* Hide footer on search page desktop */
  .page-search .frc-footer {
    display: none;
  }

  /* Keep header sticky on search page desktop */
  .page-search .frc-header {
    position: sticky;
    top: 0;
  }
}

/* ── Run Detail Side Panel ── */
.frc-run-detail {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  visibility: hidden;
}

.frc-run-detail.is-open {
  pointer-events: auto;
  visibility: visible;
}

.frc-run-detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.frc-run-detail.is-open .frc-run-detail__backdrop {
  opacity: 1;
}

.frc-run-detail__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 440px;
  max-width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.frc-run-detail.is-open .frc-run-detail__panel {
  transform: translateX(0);
}

/* Closing animation */
.frc-run-detail.is-closing .frc-run-detail__backdrop {
  opacity: 0;
}

.frc-run-detail.is-closing .frc-run-detail__panel {
  transform: translateX(100%);
}

/* Header */
.frc-run-detail__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--frc-border, #ebebeb);
  flex-shrink: 0;
}

.frc-run-detail__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: 50%;
  cursor: pointer;
  color: #333;
  transition: background 0.15s;
}

.frc-run-detail__close:hover {
  background: #f0f0f0;
}

.frc-run-detail__header-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--frc-text, #1a1a1a);
}

.frc-run-detail__header-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #555;
  transition: background 0.15s;
}

.frc-run-detail__header-link:hover {
  background: #f0f0f0;
}

/* Scrollable body */
.frc-run-detail__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Skeleton loading */
@keyframes frc-shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

.frc-skel {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: frc-shimmer 1.5s infinite ease-in-out;
  border-radius: 8px;
}

.frc-skel--image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.frc-skel__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.frc-skel--title {
  height: 22px;
  width: 70%;
}

.frc-skel--text-sm {
  height: 14px;
  width: 40%;
}

.frc-skel--block {
  height: 64px;
  border-radius: 12px;
}

.frc-skel--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.frc-skel--cell {
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: frc-shimmer 1.5s infinite ease-in-out;
}

.frc-skel--tags {
  display: flex;
  gap: 6px;
}

.frc-skel--tag {
  height: 28px;
  width: 72px;
  border-radius: 20px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: frc-shimmer 1.5s infinite ease-in-out;
}

.frc-skel--divider {
  height: 1px;
  background: #ebebeb;
  animation: none;
}

.frc-skel--text {
  height: 14px;
  width: 100%;
}

.frc-skel--text-short {
  height: 14px;
  width: 60%;
}

/* Card skeleton */
.frc-card-run--skeleton {
  pointer-events: none;
}

.frc-card-run--skeleton .frc-card-run__link {
  text-decoration: none;
}

.frc-skel--card-thumb {
  width: calc(100% - 16px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  margin: 8px;
}

.frc-skel--card-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.frc-skel--card-name {
  height: 14px;
  width: 120px;
  border-radius: 4px;
}

.frc-skel--card-meta {
  height: 12px;
  width: 80%;
  border-radius: 4px;
  margin-top: 8px;
}

.frc-skel--card-tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

/* Hero image / logo */
.frc-run-detail__hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--frc-bg, #fafafa);
}

.frc-run-detail__hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.frc-run-detail__hero--logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.single-run .frc-run-detail__hero--logo {
  border-radius: 10px;
}

.frc-run-detail__hero-bg {
  position: absolute;
  inset: -25%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(50px) saturate(1.4);
  opacity: 0.85;
  transform: scale(1.15);
  z-index: 0;
}

.frc-run-detail__hero-logo {
  position: relative;
  margin: auto;
  max-width: 35%;
  max-height: 50%;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Content area */
.frc-run-detail__content {
  padding: 15px;
  background: var(--frc-bg);
}

.frc-run-detail__title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--frc-text, #1a1a1a);
}

.frc-run-detail__subtitle {
  font-size: 14px;
  color: #777;
  margin: 0 0 20px;
}

/* Start / Finish locations */
.frc-run-detail__locations {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--frc-bg, #fafafa);
  border-radius: 12px;
}

.frc-run-detail__location-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.frc-run-detail__location-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2.5px solid var(--frc-green, #3d4f42);
}

.frc-run-detail__location-marker--start {
  background: var(--frc-green, #3d4f42);
}

.frc-run-detail__location-marker--finish {
  background: #fff;
}

.frc-run-detail__location-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.frc-run-detail__location-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
}

.frc-run-detail__location-address {
  font-size: 14px;
  font-weight: 500;
  color: var(--frc-text, #1a1a1a);
}

.frc-run-detail__location-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #666;
  transition: background 0.15s;
}

.frc-run-detail__location-link:hover {
  background: #e8e8e8;
  color: #333;
}

.frc-run-detail__location-connector {
  width: 2px;
  height: 16px;
  background: var(--frc-border, #dce4e8);
  margin-left: 5px;
}

/* Data grid (date, time, type) */
.frc-run-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--frc-bg, #fafafa);
  border-radius: 12px;
}

.frc-run-detail__grid-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frc-run-detail__grid-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
}

.frc-run-detail__grid-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--frc-text, #1a1a1a);
}

/* Tags section */
.frc-run-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.frc-run-detail__tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--frc-bg, #fafafa);
  border: 1px solid var(--frc-border, #dce4e8);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
}

/* Divider */
.frc-run-detail__divider {
  height: 1px;
  background: var(--frc-border, #ebebeb);
  margin: 0 0 20px;
}

/* Description section */
.frc-run-detail__section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--frc-text, #1a1a1a);
}

.frc-run-detail__description {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin-bottom: 20px;
}

.frc-run-detail__description p {
  margin: 0 0 8px;
}

.frc-run-detail__description ul {
  padding-left: 18px;
  margin: 0 0 8px;
}

/* Date & time */
.frc-run-detail__datetime {
  margin-bottom: 20px;
}

.frc-run-detail__datetime-text {
  font-size: 14px;
  color: #444;
  margin: 0;
}

/* Features */
.frc-run-detail__features {
  margin-bottom: 20px;
}

.frc-run-detail__features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.frc-run-detail__feature {
  padding: 14px;
  background: var(--frc-bg, #fafafa);
  border-radius: 12px;
  border: 1px solid var(--frc-border, #dce4e8);
}

.frc-run-detail__feature--full {
  grid-column: 1 / -1;
  margin-top: 8px;
}

.frc-run-detail__feature strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
  font-weight: 700;
  margin-bottom: 4px;
}

.frc-run-detail__feature p {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  color: var(--frc-text, #1a1a1a);
}

/* Yes / No blocks */
.frc-run-detail__yesno {
  margin-bottom: 20px;
}

.frc-run-detail__yesno-answer {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.frc-run-detail__yesno-answer--yes {
  color: var(--frc-green, #5a7c5a);
}

.frc-run-detail__yesno-answer--no {
  color: #999;
}

/* Captains */
.frc-run-detail__captains {
  margin-bottom: 20px;
}

.frc-run-detail__captains-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.frc-run-detail__captain {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--frc-bg, #fafafa);
  border-radius: 12px;
  border: 1px solid var(--frc-border, #dce4e8);
}

.frc-run-detail__captain-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.frc-run-detail__captain-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--frc-text, #1a1a1a);
}

/* Location blocks (meeting / finish) */
.frc-run-detail__location-block {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--frc-bg, #fafafa);
  border-radius: 12px;
  border: 1px solid var(--frc-border, #dce4e8);
}

.frc-run-detail__location-name {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--frc-text, #1a1a1a);
}

.frc-run-detail__map {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.frc-run-detail__map iframe {
  display: block;
}

.frc-run-detail__map-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid var(--frc-border, #dce4e8);
  background: #fff;
  color: var(--frc-text, #1a1a1a);
  text-decoration: none;
  transition: background 0.15s;
}

.frc-run-detail__map-link:hover {
  background: var(--frc-bg, #fafafa);
}

/* About club section */
.frc-run-detail__club {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--frc-bg, #fafafa);
  border-radius: 12px;
  margin-bottom: 20px;
}

.frc-run-detail__club-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--frc-border, #dce4e8);
  flex-shrink: 0;
}

.frc-run-detail__club-info {
  flex: 1;
  min-width: 0;
}

.frc-run-detail__club-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--frc-text, #1a1a1a);
  display: block;
}

.frc-run-detail__club-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.frc-run-detail__club-profile-link {
  font-size: 13px;
  color: var(--frc-green, #5a7c5a);
  text-decoration: none;
  font-weight: 500;
}

.frc-run-detail__club-profile-link:hover {
  text-decoration: underline;
}

.frc-run-detail__follow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  border: 1.5px solid var(--frc-green, #5a7c5a);
  background: var(--frc-green, #5a7c5a);
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}

.frc-follow-state__spinner,
.frc-follow-state__check {
  display: none;
  flex: 0 0 auto;
}

.frc-follow-state__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.frc-follow-state__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: frc-follow-spin 0.8s linear infinite;
}

.frc-follow-state__check {
  width: 14px;
  height: 14px;
}

.frc-follow-state__check svg {
  display: block;
  width: 100%;
  height: 100%;
}

.frc-run-detail__follow.is-loading .frc-follow-state__spinner {
  display: inline-block;
}

.frc-run-detail__follow.is-success .frc-follow-state__check {
  display: inline-block;
  animation: frc-follow-pop 0.26s ease-out;
}

.frc-run-detail__follow:hover {
  background: var(--frc-green, #5a7c5a);
  color: #fff;
}

.frc-run-detail__follow--active {
  background: var(--frc-green, #5a7c5a);
  color: #fff;
}

.frc-run-detail__follow--active:hover {
  background: transparent;
  color: var(--frc-green, #5a7c5a);
}

@keyframes frc-follow-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes frc-follow-pop {
  0% {
    transform: scale(0.72);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Sticky footer CTA */
.frc-run-detail__footer {
  padding: 16px 20px;
  border-top: 1px solid var(--frc-border, #ebebeb);
  background: #fff;
  flex-shrink: 0;
  display: none;
}

.frc-run-detail__footer.has-link {
  display: block;
}

.frc-run-detail__footer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.frc-run-detail__cta {
  display: block;
  flex: 1;
  padding: 14px;
  color: var(--frc-green, #3d4f42);
  background: var(--frc-primary-color);
  border: none;
  border-radius: var(--frc-radius-pill, 40px);
  font-family: var(--frc-font-primary, "Plus Jakarta Sans", sans-serif);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.frc-run-detail__cta:hover {
  background: var(--frc-green-dark, #3b4c3f);
  color: #fff;
}

/* Registered state */
.frc-run-detail__cta--registered {
  background: transparent;
  color: var(--frc-green, #3d4f42);
  border: 2px solid var(--frc-green, #3d4f42);
}

.frc-run-detail__cta--registered:hover {
  background: #fef2f2;
  border-color: #dc3545;
  color: #dc3545;
}

/* Full state */
.frc-run-detail__cta--full {
  background: #e0e0e0;
  color: #999;
  cursor: not-allowed;
}

.frc-run-detail__cta--full:hover {
  background: #e0e0e0;
  color: #999;
}

/* Registration count */
.frc-run-detail__reg-count {
  display: block;
  text-align: center;
  font-size: 13px;
  color: #777;
  margin-top: 6px;
}

/* ═══════════════════════════════════════
   RUN DETAIL — New Design (mirrors single-run)
   ═══════════════════════════════════════ */

/* Club header */
.frc-run-detail__club-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 16px;
  margin-bottom: 16px;
}

.frc-run-detail__club-row {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.frc-run-detail__club-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--frc-border);
  flex-shrink: 0;
}

.frc-run-detail__club-avatar--placeholder {
  background: linear-gradient(135deg, var(--frc-border) 0%, #eef2f5 100%);
}

.frc-run-detail__club-name {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Highlights grid */
.frc-run-detail__highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.frc-run-detail__highlight-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--frc-border);
  border-radius: 12px;
  position: relative;
}

.frc-run-detail__highlight-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--frc-primary-color);
  background: var(--frc-green-dark);
}

.frc-run-detail__highlight-text {
  min-width: 0;
}

.frc-run-detail__highlight-primary {
  font-size: 14px;
  font-weight: 700;
  color: var(--frc-text);
  line-height: 1.3;
}

.frc-run-detail__highlight-secondary {
  font-size: 13px;
  color: #777;
  margin-top: 2px;
}

/* Location actions (more button) */
.frc-run-detail__loc-actions {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.frc-run-detail__loc-more {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(90deg);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
  color: #999;
  border: 0;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.frc-run-detail__loc-more:hover {
  background: #f1f5f9;
  color: var(--frc-text);
}

.frc-run-detail__loc-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--frc-border);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}

.frc-run-detail__loc-actions:hover .frc-run-detail__loc-menu,
.frc-run-detail__loc-actions:focus-within .frc-run-detail__loc-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.frc-run-detail__loc-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--frc-text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.frc-run-detail__loc-menu-item:hover {
  background: #f1f5f9;
}

/* Sections */
.frc-run-detail__section {
  margin-bottom: 24px;
  padding-bottom: 24px;
}

.frc-run-detail__section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.frc-run-detail__section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--frc-text);
  letter-spacing: -0.01em;
}

.frc-run-detail__section-title--small {
  font-size: 15px;
}

/* Description */
.frc-run-detail__description {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
}

/* Stats grid */
.frc-run-detail__stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.frc-run-detail__stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--frc-border);
  border-radius: 12px;
}

@media (max-width: 399px) {
  .frc-run-detail__stat-item {
    flex-direction: column;
  }

  .frc-run-detail__stat-text {
    text-align: center;
  }
}

.frc-run-detail__stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--frc-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--frc-green-dark);
  flex-shrink: 0;
}

.frc-run-detail__stat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.frc-run-detail__stat-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--frc-text);
}

.frc-run-detail__stat-label {
  font-size: 12px;
  color: #888;
  font-weight: 500;
}

/* Paces */
.frc-run-detail__paces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.frc-run-detail__pace-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--frc-green-dark, #3b4c3f);
  border-radius: var(--frc-radius-pill, 40px);
}

/* Amenities */
.frc-run-detail__amenities {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.frc-run-detail__amenity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--frc-border);
  border-radius: 12px;
}

.frc-run-detail__amenity-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  color: var(--frc-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--frc-green-dark);
  flex-shrink: 0;
}

.frc-run-detail__amenity-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.frc-run-detail__amenity-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #999;
}

.frc-run-detail__amenity-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--frc-text);
}

/* Captains */
.frc-run-detail__captains {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.frc-run-detail__captain-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.frc-run-detail__captain-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--frc-border);
}

.frc-run-detail__captain-avatar--initials {
  background: var(--frc-green-dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.frc-run-detail__captain-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--frc-text);
}

/* Maps */
.frc-run-detail__map-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--frc-border);
}

.frc-run-detail__map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--frc-border);
  position: relative;
}

.frc-run-detail__map-wrap iframe {
  display: block;
  width: 100%;
  border: 0;
}

.frc-run-detail__map-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.4) 60%,
    transparent 100%
  );
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.frc-run-detail__map-overlay-address {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.frc-run-detail__map-overlay-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--frc-text);
  background: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition:
    background 0.15s,
    transform 0.1s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.frc-run-detail__map-overlay-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
}

/* Share */
.frc-run-detail__share {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.frc-run-detail__share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  background: #fff;
  border: 1px solid var(--frc-border);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.frc-run-detail__share-btn:hover {
  background: #f8f9fa;
  border-color: #c0c9d0;
}

/* Native share icon button */
.frc-run-detail__share-wrap--native {
  display: flex;
  justify-content: flex-start;
}

.frc-run-detail__share-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ececec;
  color: #202020;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.frc-run-detail__share-icon-btn:hover {
  box-shadow: 0 4px 14px rgba(59, 76, 63, 0.35);
}

.frc-run-detail__share-icon-menu {
  display: none;
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--frc-border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.frc-run-detail__share-icon-menu.is-open {
  display: block;
}

.frc-run-detail__share-icon-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--frc-text);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s;
  background: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.frc-run-detail__share-icon-menu-item:hover {
  background: #f1f5f9;
}

.frc-run-detail__share-icon-menu-item svg {
  flex-shrink: 0;
  color: var(--frc-green-dark);
}

/* Footer share menu opens upward */
.frc-run-detail__footer .frc-run-detail__share-wrap--native {
  position: relative;
}

.frc-run-detail__footer .frc-run-detail__share-icon-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 180px;
  margin-top: 0;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .frc-run-detail__panel {
    width: 100%;
  }
}
