/* WIKO Avatar — WIFI Niederösterreich · Welcome Journey */
/* Version 1.4 */

#wiko-trigger {
  position: fixed; bottom: 18px; right: 24px;
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 6px; z-index: 9999;
  pointer-events: none;               /* nur sichtbare Teile klickbar, nicht der leere Spalten-Raum */
}
#wiko-trigger .wiko-ring, #wiko-trigger .wiko-tip { pointer-events: auto; }
#wiko-trigger:hover #wiko-svg-wrap { animation: wiko-hover 0.4s ease forwards !important; }
/* Raum-Infobox offen → WIKO in den Hintergrund (überlagert nicht mehr die Box) */
body.roombox-open #wiko-root { opacity: 0 !important; pointer-events: none !important; transition: opacity .2s ease; }

.wiko-ring {
  width: 74px; height: 74px; border-radius: 50%;
  background: rgba(78,154,35,0.2);
  border: 2px solid rgba(78,154,35,0.6);
  display: flex; align-items: center; justify-content: center;
  animation: wiko-pulse 2.5s ease-in-out infinite;
}

.wiko-tip {
  font-size: 13px; font-weight: 600; color: #294f12;
  background: rgba(255,255,255,0.85); padding: 3px 11px;
  border-radius: 12px; white-space: nowrap;
  font-family: 'Arsenal', sans-serif;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

#wiko-svg-wrap {
  animation: wiko-idle 3s ease-in-out infinite;
  transform-origin: center bottom;
  width: 58px; height: 58px;
}
#wiko-svg-wrap svg { width: 100%; height: 100%; }

#wiko-panel-wrap {
  animation: wiko-idle 3s ease-in-out infinite;
  transform-origin: center bottom;
  width: 44px !important; height: 44px !important;
  flex-shrink: 0;
}
#wiko-panel-wrap svg { width: 44px !important; height: 44px !important; display: block; }

#wiko-panel {
  position: fixed; top: 0; right: -400px;
  width: 360px; height: 100%;
  background: rgba(255,255,255,0.97);
  border-left: 1px solid rgba(78,154,35,0.4);
  transition: right 0.35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  /* padding-top in den Header verlagert, damit der sticky-Header bündig pinnt */
  gap: 10px; padding: 0 15px 15px;
  z-index: 9999;
  font-family: 'Arsenal', -apple-system, BlinkMacSystemFont, sans-serif;
  box-sizing: border-box; overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.08);
}
#wiko-panel.open { right: 0; }

.wp-header {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(78,154,35,0.2);
  padding-bottom: 12px;
  /* Header fixiert: scrollt nicht mit, wenn der Chat länger wird */
  position: sticky; top: 0; z-index: 5;
  /* gleicher Hintergrund wie Panel, damit Chat-Text sauber drunter verschwindet */
  background: rgba(255,255,255,0.97);
  /* volle Breite (seitliches Panel-Padding überdecken); kein negativer Top-Margin,
     sonst drückt die Margin-Box den sticky-Header beim Scrollen nach unten */
  box-sizing: border-box;
  margin: 0 -15px 0; padding: 18px 15px 12px;
}
.wp-title { font-size: 15px; font-weight: 600; color: #3a7219; }
.wp-sub { font-size: 11.5px; color: #888; margin-top: 2px; }
.wp-reset, .wp-close {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.06); border: 1px solid #e5e7eb;
  color: #888; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.wp-reset { margin-left: auto; font-size: 15px; line-height: 1; }
.wp-close { margin-left: 6px; }
.wp-reset:hover, .wp-close:hover { background: rgba(0,0,0,0.12); }

.wp-section {
  background: #f5faf2; border-radius: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(78,154,35,0.2);
}
.wp-slabel {
  font-size: 10px; font-weight: 600; color: #4E9A23;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px;
}
.wp-text { font-size: 13px; color: #333; line-height: 1.65; }

.wp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.wp-chip {
  font-size: 11px; padding: 3px 9px; border-radius: 20px;
  background: #edf7e6; color: #3a7219;
  border: 1px solid rgba(78,154,35,0.3);
}

.wp-qbtns { display: flex; flex-direction: column; gap: 5px; }
.wp-qbtn {
  background: #fff; border: 1px solid rgba(78,154,35,0.4);
  border-radius: 20px; padding: 7px 13px;
  font-size: 12.5px; color: #3a7219;
  cursor: pointer; text-align: left;
  font-family: inherit; transition: background 0.15s;
}
.wp-qbtn:hover { background: #edf7e6; }

.wp-typing { display: none; align-items: center; gap: 4px; padding: 6px 2px; }
.wp-typing.show { display: flex; }
.wp-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4E9A23;
  animation: wdot 1.2s ease-in-out infinite;
}
.wp-dot:nth-child(2) { animation-delay: 0.2s; }
.wp-dot:nth-child(3) { animation-delay: 0.4s; }

.wp-ai {
  background: #edf7e6; border-radius: 10px;
  padding: 11px 13px;
  border: 1px solid rgba(78,154,35,0.25);
  font-size: 13px; color: #2d5a0e;
  line-height: 1.65; display: none;
}
.wp-ai.show { display: block; }

.wp-inputrow { display: flex; gap: 7px; margin-top: auto; padding-top: 4px; }
.wp-input {
  flex: 1; background: #fff;
  border: 1px solid rgba(78,154,35,0.4);
  border-radius: 22px; padding: 9px 13px;
  font-size: 13px; color: #333; outline: none;
  font-family: inherit;
}
.wp-input::placeholder { color: #aaa; }
.wp-input:focus { border-color: #4E9A23; }
.wp-send {
  width: 36px; height: 36px;
  background: #4E9A23; border: none;
  border-radius: 50%; cursor: pointer; flex-shrink: 0;
  color: #fff; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.wp-send:hover { background: #3a7219; }

/* ── WIKO als Loader (statt grünem Punkt) ── */
.wiko-loader {
  width: 72px; height: 72px;
  animation: wiko-idle 3s ease-in-out infinite, wiko-loader-pulse 1.6s ease-in-out infinite;
  transform-origin: center bottom;
  filter: drop-shadow(0 6px 16px rgba(78, 154, 35, 0.4));
}
.wiko-loader svg { width: 100%; height: 100%; }
.wiko-loader.big { width: 110px; height: 110px; }

@keyframes wiko-loader-pulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; filter: drop-shadow(0 6px 18px rgba(78, 154, 35, 0.6)); }
}

/* ── Eye blink ── */
.wiko-eye-l { animation: wiko-blink 4s ease-in-out infinite; transform-origin: center; }
.wiko-eye-r { animation: wiko-blink 4s ease-in-out infinite; transform-origin: center; }

/* ── Animations ── */
@keyframes wiko-pulse  { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
@keyframes wiko-idle   { 0%,100%{transform:translateY(0) rotate(0deg)} 25%{transform:translateY(-4px) rotate(-1deg)} 75%{transform:translateY(-2px) rotate(1deg)} }
@keyframes wiko-hover  { 0%{transform:scale(1) rotate(0)} 30%{transform:scale(1.15) rotate(-8deg)} 60%{transform:scale(1.1) rotate(6deg)} 100%{transform:scale(1.08) rotate(0)} }
@keyframes wiko-jump   { 0%{transform:translateY(0) scale(1)} 30%{transform:translateY(-14px) scale(1.1)} 60%{transform:translateY(-4px) scale(0.97)} 80%{transform:translateY(-8px) scale(1.05)} 100%{transform:translateY(0) scale(1)} }
@keyframes wiko-speak  { 0%,100%{transform:translateY(0) scale(1)} 20%{transform:translateY(-3px) scale(1.04)} 40%{transform:translateY(0) scale(0.98)} 60%{transform:translateY(-2px) scale(1.03)} }
@keyframes wiko-attention { 0%,100%{transform:translateY(0) rotate(0)} 10%{transform:translateY(-8px) rotate(-6deg)} 20%{transform:translateY(0) rotate(6deg)} 30%{transform:translateY(-6px) rotate(-4deg)} 40%{transform:translateY(0) rotate(0)} }
@keyframes wiko-blink  { 0%,90%,100%{transform:scaleY(1)} 95%{transform:scaleY(0.05)} }
@keyframes wdot        { 0%,100%{opacity:0.3;transform:scale(0.8)} 50%{opacity:1;transform:scale(1)} }

/* ── Mobile ── */
@media (max-width: 768px) {
  #wiko-panel {
    top: auto; right: 0; bottom: -72%;
    width: 100%; height: 72%;
    border-left: none;
    border-top: 2px solid rgba(78,154,35,0.4);
    border-radius: 18px 18px 0 0;
    transition: bottom 0.35s ease;
  }
  #wiko-panel.open { bottom: 0; right: 0; }
  #wiko-trigger { bottom: 16px; right: 16px; }
  .wiko-ring { width: 64px; height: 64px; }
  #wiko-svg-wrap { width: 50px; height: 50px; }
}
