/* ── Single Run — Layout específico da página (herda cores/elementos do modal) ── */

/* ── Container ── */
.frc-single-run {
  padding: 0 0 80px;
  min-height: 60vh;
}

.frc-single-run__container {
  max-width: 900px;
}

/* ── Sections na página (o modal não usa essa classe) ── */
.frc-run-detail__section {
  margin-bottom: 20px;
}

/* ── Attendees ── */
.frc-single-run__attendees {
  display: flex;
  align-items: center;
  gap: 12px;
}

.frc-single-run__attendee-avatars {
  display: flex;
  padding-left: 6px;
}

.frc-single-run__attendee-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  margin-left: -10px;
  flex-shrink: 0;
}

.frc-single-run__attendee-count {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin: 0;
}

/* ── Share ── */
.frc-single-run__share {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.frc-single-run__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-single-run__share-btn:hover {
  background: #f8f9fa;
  border-color: #c0c9d0;
}

.frc-single-run__share-btn svg {
  flex-shrink: 0;
}

/* Native share icon button (mobile) */
.frc-single-run__share-wrap--native {
  display: flex;
  justify-content: flex-start;
}

.frc-single-run__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-single-run__share-icon-btn:hover {
  box-shadow: 0 4px 14px rgba(59, 76, 63, 0.35);
}

.frc-single-run__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-single-run__share-icon-menu.is-open {
  display: block;
}

.frc-single-run__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-single-run__share-icon-menu-item:hover {
  background: #f1f5f9;
}

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

/* ═══════════════════════════════════════
   RELATED RUNS — Swiper (uses card-run.php)
   ═══════════════════════════════════════ */

/* Swiper layout */
.frc-single-run__related-carousel {
  overflow: hidden;
}

.frc-single-run__related-carousel .swiper-wrapper {
  display: flex;
}

.frc-single-run__related-carousel .swiper-slide {
  width: auto;
  height: auto;
}

/* ── Card-Run styles (mirrors front-page.css) ── */
.frc-single-run__related-carousel .frc-card-run {
  position: relative;
  background: var(--frc-card-bg);
  border-radius: var(--frc-radius-card);
  border: 1px solid var(--frc-border);
  overflow: hidden;
  transition: box-shadow 0.2s;
  height: 100%;
  width: 400px;
}

.frc-single-run__related-carousel .frc-card-run:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.frc-single-run__related-carousel .frc-card-run__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Thumbnail */
.frc-single-run__related-carousel .frc-card-run__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--frc-border);
  border-radius: 12px;
  margin: 8px;
  width: calc(100% - 16px);
}

.frc-single-run__related-carousel .frc-card-run__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Fallback */
.frc-single-run__related-carousel .frc-card-run__thumb--fallback {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frc-single-run__related-carousel .frc-card-run__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-single-run__related-carousel .frc-card-run__thumb--fallback img {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  max-width: 70%;
  max-height: 70%;
  object-fit: contain;
}

/* Body */
.frc-single-run__related-carousel .frc-card-run__body {
  padding: 10px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Club row */
.frc-single-run__related-carousel .frc-card-run__club-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.frc-single-run__related-carousel .frc-card-run__logo {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

.frc-single-run__related-carousel .frc-card-run__club-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--frc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta */
.frc-single-run__related-carousel .frc-card-run__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: #777;
  margin-bottom: 10px;
}

.frc-single-run__related-carousel .frc-card-run__meta-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 12px;
  max-width: 100%;
  white-space: nowrap;
}

.frc-single-run__related-carousel .frc-card-run__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.frc-single-run__related-carousel .frc-card-run__meta-item svg {
  flex-shrink: 0;
}

.frc-single-run__related-carousel
  .frc-card-run__meta-item
  + .frc-card-run__meta-item::before {
  content: "·";
  margin-right: 4px;
  color: #bbb;
}

.frc-single-run__related-carousel
  .frc-card-run__meta-item
  + .frc-card-run__meta-group::before,
.frc-single-run__related-carousel
  .frc-card-run__meta-group
  + .frc-card-run__meta-item::before,
.frc-single-run__related-carousel
  .frc-card-run__meta-group
  .frc-card-run__meta-item
  + .frc-card-run__meta-item::before {
  content: "\00b7";
  margin-right: 4px;
  color: #bbb;
}

/* Tags */
.frc-single-run__related-carousel .frc-card-run__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.frc-single-run__related-carousel .frc-card-run__tag {
  display: inline-flex;
  font-size: 11px;
  font-weight: 600;
  color: #777;
}

.frc-single-run__related-carousel
  .frc-card-run__tag
  + .frc-card-run__tag::before {
  content: "·";
  margin-right: 6px;
  color: #bbb;
}

/* Fallback scroll when Swiper not loaded */
.frc-single-run__related-carousel:not(.swiper-initialized) {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.frc-single-run__related-carousel:not(.swiper-initialized)::-webkit-scrollbar {
  display: none;
}

.frc-single-run__related-carousel:not(.swiper-initialized) .swiper-wrapper {
  gap: 16px;
}

.frc-single-run__related-carousel:not(.swiper-initialized) .swiper-slide {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ── Sticky CTA Bar ── */
.frc-single-run__sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--frc-border);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.frc-single-run__sticky-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
}

.frc-single-run__sticky-bar .frc-btn--cta {
  flex: 1;
}

/* Sticky info — hidden on mobile, visible on desktop */
.frc-single-run__sticky-info {
  display: none;
}

.frc-single-run__sticky-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  line-height: 1.4;
}

.frc-single-run__sticky-info-row svg {
  flex-shrink: 0;
  color: var(--frc-green-dark);
}

/* Sticky actions wrapper */
.frc-single-run__sticky-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

/* Round share button in sticky bar */
.frc-single-run__sticky-share-wrap {
  position: relative;
  flex-shrink: 0;
}

.frc-single-run__sticky-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ececec;
  color: #202020;
  border: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.frc-single-run__sticky-share-btn:hover {
  box-shadow: 0 4px 14px rgba(59, 76, 63, 0.35);
}

/* Share context menu (same pattern as location menu) */
.frc-single-run__sticky-share-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  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-single-run__sticky-share-wrap:hover .frc-single-run__sticky-share-menu,
.frc-single-run__sticky-share-wrap:focus-within
  .frc-single-run__sticky-share-menu,
.frc-single-run__sticky-share-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.frc-single-run__sticky-share-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-single-run__sticky-share-menu-item:hover {
  background: #f1f5f9;
}

.frc-single-run__sticky-share-menu-item svg {
  flex-shrink: 0;
  color: var(--frc-green-dark);
}

/* CTA Button */
.frc-btn--cta {
  width: 100%;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 800;
  border-radius: var(--frc-radius-pill, 40px);
  background: var(--frc-green-dark, #3b4c3f);
  color: #fff;
  border: 0;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 14px rgba(59, 76, 63, 0.25);
}

.frc-btn--cta:hover {
  box-shadow: 0 6px 20px rgba(59, 76, 63, 0.35);
}

.frc-btn--cta:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(59, 76, 63, 0.25);
}

.frc-btn--cta:disabled {
  background: #c5c5c5;
  color: #888;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.frc-btn--cta.frc-btn--registered {
  background: #e8f5e9;
  color: var(--frc-green-dark);
  box-shadow: 0 2px 8px rgba(59, 76, 63, 0.1);
}

.frc-btn--cta.frc-btn--registered:hover {
  background: #d4edda;
  box-shadow: 0 4px 12px rgba(59, 76, 63, 0.15);
}

/* ── Responsive ── */
@media (min-width: 768px) {
  .frc-single-run {
    padding: 24px 0 80px;
  }

  .frc-single-run__related-carousel .frc-card-run {
    width: 400px;
  }

  /* Hide share section on desktop */
  .frc-single-run__share-section {
    display: none;
  }

  /* Sticky bar desktop layout */
  .frc-single-run__sticky-inner {
    justify-content: space-between;
    max-width: 1100px;
  }

  .frc-single-run__sticky-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .frc-single-run__sticky-actions {
    flex: 0 0 auto;
  }

  .frc-single-run__sticky-bar .frc-btn--cta {
    max-width: 280px;
    flex: 0 0 auto;
  }
}

@media (min-width: 992px) {
  .frc-single-run__container {
    max-width: 1100px;
  }

  .frc-single-run__related-carousel .frc-card-run {
    width: 420px;
  }
}
