/* ── MotoGP teaser icon — sits a short gap after "Formula 1 · Year" ─────── */
#motogp-teaser-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative; /* anchors the teaser tip */
  transition: background 0.15s ease, transform 0.15s ease;
}

#motogp-teaser-btn:hover {
  background: var(--bg-pill-hover);
  transform: scale(1.08);
}

#motogp-teaser-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  -webkit-user-drag: none;
}

/* On mobile there's no fixed "short distance" spot worth targeting — the
   header is already tight — so instead of hugging header-event, the
   button centers itself within whatever space naturally sits between it
   and header-right (which is always pushed to the far edge via its own
   margin-left: auto). */
@media (max-width: 480px) {
  #motogp-teaser-btn {
    margin: 0 auto;
  }
}


/* ── Teaser tip — small bubble under the icon with the "Read more" link ──
   position:fixed + appended to document.body (not nested in #header),
   since #header's own z-index:10 creates a local stacking context that
   would otherwise trap this below the map regardless of z-index value. */
.motogp-teaser-tip {
  position: fixed;
  width: max-content;
  max-width: 190px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  text-align: center;
  box-shadow: var(--shadow-float);
  z-index: 6000;
}




.motogp-read-more {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin-left: 3px;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  font-size: inherit;
  font-family: inherit;
}

/* ── Popup ────────────────────────────────────────────────────────────── */
#motogp-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 5000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#motogp-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

#motogp-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(320px, calc(100vw - 40px));
  z-index: 5001;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-float);
  padding: 22px 20px 20px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.94);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

#motogp-modal.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: all;
}

#motogp-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-pill);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

#motogp-modal-close:hover {
  background: var(--bg-pill-hover);
  color: var(--text-primary);
}

#motogp-modal-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  margin-bottom: 10px;
}

#motogp-modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-right: 20px;
}

#motogp-modal-text {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--text-secondary);
}