/* ==========================================================================
   Scavenger Hunt styles
   Loaded separately (not in bundle) — only when a hunt is active.
   ========================================================================== */

/* ── Hidden eggs on pages ─────────────────────────────────── */
.hunt-egg {
  position: absolute;
  z-index: 99999;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.4s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  animation: hunt-egg-wobble 3s ease-in-out infinite;
}
.hunt-egg:hover {
  animation: none;
  transform: scale(1.15);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.3));
}
.hunt-egg:active {
  transform: scale(0.95);
}
.hunt-egg svg { display: block; }

/* Size classes */
.hunt-egg--sm svg { width: 32px; height: 42px; }
.hunt-egg--md svg { width: 40px; height: 52px; }
.hunt-egg--lg svg { width: 48px; height: 62px; }
.hunt-egg--xl svg { width: 56px; height: 73px; }

/* Subtle wobble animation to help players notice eggs */
@keyframes hunt-egg-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hunt-egg, .hunt-fab { animation: none !important; }
}

/* ── Floating Action Button (left side) ───────────────────── */
.hunt-fab {
  position: fixed;
  left: 16px;
  bottom: 20px;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: hunt-fab-pulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, #FF69B4, #FFB6C1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 105, 180, 0.35);
}
.hunt-fab:hover {
  transform: scale(1.05);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 105, 180, 0.45);
}
.hunt-fab:focus {
  color: #fff;
  outline: 2px solid #FF69B4;
  outline-offset: 2px;
}
.hunt-fab-icon {
  display: flex;
  align-items: center;
}
.hunt-fab-icon svg { display: block; }
.hunt-fab-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #dc3545;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.hunt-fab-timer {
  display: inline-block;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
  min-width: 36px;
  text-align: center;
}
.hunt-fab-timer:empty { display: none; }

@keyframes hunt-fab-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(255, 105, 180, 0.35); }
  50% { box-shadow: 0 4px 12px rgba(255, 105, 180, 0.35), 0 0 0 8px rgba(255, 105, 180, 0); }
}

@media (max-width: 575.98px) {
  .hunt-fab {
    padding: 8px 12px;
    font-size: 0.75rem;
  }
}

/* ── Leaderboard: egg thumbnails ──────────────────────────── */
.hunt-egg-thumb {
  display: inline-block;
  width: 24px;
  height: 31px;
  vertical-align: middle;
}
.hunt-egg-thumb svg {
  width: 100%;
  height: 100%;
}
.hunt-egg-thumb--grid {
  width: 32px;
  height: 42px;
  margin: 4px;
}
.hunt-inline-eggs {
  display: inline-flex;
  gap: 4px;
  margin-left: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.hunt-egg-thumb-more {
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
  color: var(--pms-text-muted, #6c757d);
}
.lb-entry-wrap.lb-expanded .hunt-egg-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 8px 12px;
  gap: 4px;
}

/* ── Leaderboard: your collection card ────────────────────── */
.hunt-your-card {
  padding: 16px;
  border-radius: 12px;
}

/* ── Reserved egg (anonymous user holding it) ────────────── */
.hunt-egg--reserved {
  opacity: 0.4;
  filter: grayscale(0.8) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
  animation: none;
  cursor: default;
}
.hunt-egg-reserve-badge {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── Splash announcement modal ────────────────────────────── */
.hunt-splash-popup {
  border-radius: 16px !important;
  max-width: 520px !important;
  width: calc(100% - 24px) !important;
  margin: 12px !important;
}
@media (max-width: 575.98px) {
  .hunt-splash-popup {
    font-size: 0.9rem !important;
    padding: 16px 12px !important;
  }
  .hunt-splash-popup h2 {
    font-size: 1.15rem !important;
  }
  .hunt-splash-eggs svg {
    width: 20px;
    height: 26px;
  }
}
.hunt-splash-eggs {
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 8px 0;
}
.hunt-splash-eggs svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
  animation: hunt-egg-wobble 3s ease-in-out infinite;
}
.hunt-splash-eggs svg:nth-child(even) {
  animation-delay: -1.5s;
}
.hunt-splash-content {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 12px;
}
.hunt-splash-countdown {
  text-align: center;
  font-size: 1.1rem;
  color: #FF69B4;
  margin: 12px 0;
}
.hunt-splash-prize {
  text-align: center;
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 8px;
  font-size: 0.9rem;
}
[data-theme="dark"] .hunt-splash-prize {
  background: linear-gradient(135deg, #3d3500, #4a3f00);
  color: #FFD700;
}

/* ── Last finder banner ──────────────────────────────────── */
.hunt-last-find {
  text-align: center;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.08), rgba(255, 182, 193, 0.12));
  border: 1px solid rgba(255, 105, 180, 0.2);
  font-size: 0.9rem;
}
.hunt-last-find-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #FF69B4;
}
.hunt-last-find-name {
  font-weight: 700;
  color: #FF69B4;
}
.hunt-last-find-time {
  font-size: 0.8rem;
}
[data-theme="dark"] .hunt-last-find {
  background: linear-gradient(135deg, rgba(192, 64, 122, 0.15), rgba(232, 127, 170, 0.1));
  border-color: rgba(192, 64, 122, 0.3);
}

/* ── Nav icon ─────────────────────────────────────────────── */
.hunt-nav-icon { color: #FF69B4; }

/* ── Theme support ────────────────────────────────────────── */
[data-theme="dark"] .hunt-fab {
  background: linear-gradient(135deg, #c0407a, #e87faa);
  box-shadow: 0 4px 12px rgba(192, 64, 122, 0.35);
}
[data-theme="dark"] .hunt-egg {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}
