/* Race Calendar favourites widget styles. Pairs with rc-favourites.js. */

.rc-fav-heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  color: #e5484d;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.rc-fav-heart:hover { background: #fff; }
.rc-fav-heart:active { transform: scale(0.85); }
.rc-h-icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.rc-fav-heart .rc-h-off, .rc-fav-heart .rc-h-on { display: none !important; }
.rc-fav-heart.is-on { color: #e5484d; }
.rc-fav-heart.is-on .rc-h-icon { fill: #e5484d; stroke: #e5484d; }
.rc-fav-heart.rc-pop { animation: rc-pop 0.3s ease; }
@keyframes rc-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Ensure the card is a positioning context for the absolute heart. Harmless if already set. */
.event-card { position: relative; }

/* Toast */
.rc-fav-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9999;
  background: #111827;
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 88%;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, bottom 0.2s ease;
}
.rc-fav-toast.show { opacity: 1; bottom: 34px; }

/* Saved events header link + count badge */
.rc-fav-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  vertical-align: middle;
}
.rc-fav-badge.rc-has-count { display: inline-block; }

.rc-mylist-state { text-align: center; }
.rc-mylist-state p { margin: 0 auto 8px; max-width: 320px; }
.rc-mylist-state .load-more-btn { margin-top: 8px; }

/* ============================================================
   Header account dropdown (person icon -> menu). Desktop + mobile.
   ============================================================ */
.rc-acct { position: relative; display: inline-flex; }

.rc-acct-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 0;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 300;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
}
.rc-acct-trigger:hover { background: rgba(255, 255, 255, 0.12); }
.rc-acct-trigger .rc-acct-ico { width: 18px; height: 18px; }
.rc-acct-trigger .rc-acct-name { white-space: nowrap; }
.rc-acct-trigger .rc-acct-caret { font-size: 0.7rem; opacity: 0.85; transition: transform 0.15s ease; }
.rc-acct.open .rc-acct-trigger .rc-acct-caret { transform: rotate(180deg); }

/* count badge on the trigger */
.rc-acct-trigger .rc-fav-badge {
  display: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.rc-acct-trigger .rc-fav-badge.rc-has-count { display: inline-block; }

/* the dropdown menu */
.rc-acct-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(16, 24, 40, 0.18);
  padding: 6px;
  display: none;
  z-index: 300;
}
.rc-acct.open .rc-acct-menu { display: block; }
.rc-acct-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.rc-acct-menu a:hover { background: var(--gray-100); color: var(--green-dark); }
.rc-acct-sep { height: 1px; background: var(--gray-200); margin: 6px 4px; }
.rc-acct-menu .rc-fav-badge {
  display: none;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.rc-acct-menu .rc-fav-badge.rc-has-count { display: inline-block; }

/* On mobile hide the name, keep icon + badge compact */
@media (max-width: 900px) {
  .rc-acct-trigger .rc-acct-name,
  .rc-acct-trigger .rc-acct-caret { display: none; }
  .rc-acct-trigger { padding: 6px; }
}

/* ============================================================
   One-row header helpers (logo left, nav, account right).
   Scoped so they only affect the favourites-era header markup.
   ============================================================ */
.header-inner.rc-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  border-bottom: none;
}
.header-inner.rc-row .logo img { height: 80px; padding-top: 5px; padding-bottom: 5px; }
.header.compact .header-inner.rc-row .logo img { height: 48px; }

.header-inner.rc-row .rc-header-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 1;
  justify-content: center;
}
.header-inner.rc-row .rc-header-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 300;
  white-space: nowrap;
}
.header-inner.rc-row .rc-header-nav a:hover { opacity: 0.8; }

.header-inner.rc-row .rc-header-right { display: flex; align-items: center; gap: 0.5rem; }

/* Mobile: centre the logo, show icons on the right, hide the inline nav */
@media (max-width: 900px) {
  .header-inner.rc-row .rc-header-nav { display: none; }
  .header-inner.rc-row { justify-content: center; }
  .header-inner.rc-row .rc-header-right {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
  }
  .header-inner.rc-row .logo img { height: 60px; }
}

/* Hamburger lives inside the right group now; neutralise its old absolute position */
.header-inner.rc-row .mobile-menu-btn { position: static; transform: none; display: none; }
@media (max-width: 900px) {
  .header-inner.rc-row .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
}

/* Homepage tagline strip below the one-row header bar */
.header .rc-tagline {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 300;
  padding: 0 1rem 0.6rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) { .header .rc-tagline { display: none; } }