/* ============================================================
   17. mai-feiring — konfetti i flaggfarger + festlig pille
   Aktiveres automatisk 16–18. mai, eller via ?17mai=1
============================================================ */

/* Konfetti-canvas legges på toppen av alt — pekerblokk fri */
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.confetti-canvas.is-on { opacity: 1; }

/* Festlig pille (øverst til høyre, under nav) */
.maipille {
  position: fixed;
  top: 86px;
  right: 24px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 14px;
  background: linear-gradient(90deg, #BA0C2F 0%, #BA0C2F 33%, #FFFFFF 33%, #FFFFFF 66%, #00205B 66%, #00205B 100%);
  border-radius: 100px;
  box-shadow: 0 12px 32px -10px rgba(0, 32, 91, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border: 0;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease, cubic-bezier(.2,.8,.2,1)), box-shadow 0.3s ease;
  font-family: var(--sans, 'Inter', sans-serif);
}
.maipille.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.maipille:hover {
  box-shadow: 0 18px 40px -10px rgba(0, 32, 91, 0.55);
  transform: translateY(-2px) scale(1.02);
}
.maipille__inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--rik-blue-dark, #003888);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.maipille__flag {
  font-size: 14px;
  line-height: 1;
}
.maipille__close {
  position: absolute;
  top: -6px; right: -6px;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--rik-slate, #1a1b2e);
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.maipille:hover .maipille__close { opacity: 1; }
.maipille__close:hover { background: var(--rik-cream, #EAE1CE); }

@media (max-width: 640px) {
  .maipille {
    top: auto;
    bottom: 80px;
    right: 16px;
    padding: 8px 14px 8px 12px;
  }
  .maipille__inner { font-size: 11.5px; padding: 3px 10px; }
}

/* Respekter reduced-motion — vis bare pillen, ingen konfetti */
@media (prefers-reduced-motion: reduce) {
  .confetti-canvas { display: none !important; }
}
