/* Maanvosje — overlay metgezel */

#vosje-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
  max-width: 320px;
}
#vosje-wrap.links { right: auto; left: 20px; align-items: flex-start; }

.vosje-ballon {
  background: white;
  color: var(--tekst);
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 15px;
  box-shadow: var(--sch-mid);
  max-width: 260px;
  position: relative;
  pointer-events: auto;
  cursor: pointer;
  display: none;
  line-height: 1.4;
}
.vosje-ballon.tonen { display: block; animation: ballon-pop 0.3s ease; }
.vosje-ballon::after {
  content: '';
  position: absolute;
  bottom: -8px; right: 22px;
  width: 0; height: 0;
  border: 8px solid transparent;
  border-top-color: white;
}
#vosje-wrap.links .vosje-ballon::after { right: auto; left: 22px; }

.vosje-ballon .sluit {
  position: absolute; top: 4px; right: 6px;
  background: none; border: none; cursor: pointer;
  font-size: 14px; opacity: 0.5;
}
.vosje-ballon .sluit:hover { opacity: 1; }

@keyframes ballon-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

#vosje {
  width: 90px; height: 90px;
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
  transition: transform 0.2s;
  animation: zacht-zweven 4s ease-in-out infinite;
}
#vosje:hover { transform: scale(1.08); }
#vosje.slapend { animation: ademen-zacht 4s ease-in-out infinite; }
#vosje.knipoog { animation: knipoog 0.5s ease; }

@keyframes zacht-zweven {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes ademen-zacht {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.96); opacity: 0.85; }
}
@keyframes knipoog {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.15) rotate(-5deg); }
}

/* Stemmingen via een data-attribute */
#vosje[data-stemming="bezorgd"] .ogen { fill: #d97b3a; }
#vosje[data-stemming="trots"] { animation: zweef-trots 2s ease-in-out infinite; }
@keyframes zweef-trots {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

#vosje[data-stemming="slapend"] .ogen { ry: 1; }

/* zzz icoon bij slapend */
.zzz {
  position: absolute;
  top: -8px; right: 0;
  font-size: 18px;
  color: var(--donker-accent);
  display: none;
  animation: zzz-drift 3s ease-in-out infinite;
}
#vosje-wrap.slapend .zzz { display: block; }
@keyframes zzz-drift {
  0% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-12px); opacity: 1; }
  100% { transform: translateY(-24px); opacity: 0; }
}

@media (max-width: 600px) {
  #vosje { width: 70px; height: 70px; }
  .vosje-ballon { font-size: 14px; max-width: 200px; }
  #vosje-wrap { bottom: 12px; right: 12px; }
}

/* Weetjes hebben aparte styling */
.vosje-ballon.weetje {
  background: linear-gradient(135deg, #fff5e0, #ffe0b8);
  border: 2px solid var(--licht-accent);
}
.vosje-ballon.weetje strong { color: var(--licht-3); }
