/* „Frag den JUICER" — Chat-Fenster und Figur (Schritt 1, Platzhalter-Figur).
   Farben hängen an den Akzent-Variablen der Seite (Fallback Orange), damit
   die Casino-Hülle (Gold) und die v2-Seiten (Orange) je ihr Gesicht behalten.
   Kein Layout-Einfluss auf die Seite: alles ist fixed. */
.jc { position: fixed; right: 18px; bottom: 18px; z-index: 1040; font-family: inherit; }

.jc-maskottchen {
    position: relative; width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
    background: radial-gradient(circle at 35% 30%, #ffd08a, var(--accent, #f97316) 60%, #b45309);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 255, 255, 0.08);
    display: grid; place-items: center; font-size: 34px; line-height: 1;
    animation: jc-schweben 3.6s ease-in-out infinite;
}
.jc-maskottchen:hover, .jc-maskottchen:focus-visible { transform: scale(1.06); outline: 3px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }
.jc-maskottchen__figur { display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.4)); }

/* Schritt 2 — Verhalten der Figur (public/js/juicer-figur.js). Das Skript
   setzt translateX auf .jc (Gleiten am unteren Rand) und --jc-dauer (Fahrt-
   dauer); die Fahrt selbst macht der Übergang hier. Nach rechts wird das
   Grundbild gespiegelt, weil der Roboter im Bild nach links schaut. */
.jc { transition: transform var(--jc-dauer, 0ms) linear; will-change: transform; }
.jc--rechts .jc-maskottchen__figur { transform: scaleX(-1); }
.jc--schlaeft .jc-maskottchen { filter: brightness(0.65) saturate(0.7); animation-duration: 6s; }

/* Bildmodus: sobald ruhe.webp geladen ist, verschwindet die Orange-Scheibe —
   der Roboter bringt seinen Lichtring selbst mit. */
.jc-figur { display: block; height: 108px; width: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.jc-figur[hidden] { display: none; }
.jc--bilder .jc-maskottchen { width: auto; min-width: 96px; height: 116px; padding: 4px; border-radius: 16px; background: none; box-shadow: none; }
.jc--bilder .jc-figur-emoji { display: none; }
.jc--bilder .jc-maskottchen__figur { filter: none; }
.jc--bilder .jc-maskottchen__blase { right: calc(100% + 8px); bottom: 50%; }
.jc--bilder .jc-panel { bottom: 128px; }
.jc-maskottchen__blase {
    position: absolute; right: 74px; bottom: 14px; white-space: nowrap;
    background: #fff; color: #1a1a1a; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: 14px 14px 4px 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); opacity: 0; transform: translateX(8px); pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.jc-maskottchen__blase--sichtbar { opacity: 1; transform: translateX(0); }

.jc-panel {
    position: absolute; right: 0; bottom: 78px; width: min(380px, calc(100vw - 36px)); max-height: min(560px, calc(100vh - 120px));
    display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
    background: rgba(18, 18, 24, 0.96); color: #f3f3f3; border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); backdrop-filter: blur(12px);
}
.jc-panel[hidden] { display: none; }
.jc-panel__kopf { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: linear-gradient(90deg, rgba(249, 115, 22, 0.35), transparent); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.jc-panel__titel { font-weight: 700; letter-spacing: 0.02em; }
.jc-panel__zu { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 8px; border-radius: 8px; }
.jc-panel__zu:hover, .jc-panel__zu:focus-visible { background: rgba(255, 255, 255, 0.12); outline: none; }
.jc-panel__hinweis { margin: 0; padding: 8px 14px; font-size: 12px; color: rgba(243, 243, 243, 0.7); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.jc-panel__hinweis a, .jc-link { color: var(--accent, #fbbf24); text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.jc-panel__verlauf { flex: 1 1 auto; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.jc-nachricht { max-width: 92%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.jc-nachricht--user { align-self: flex-end; background: var(--accent, #f97316); color: #1a1a1a; border-bottom-right-radius: 4px; }
.jc-nachricht--ki { align-self: flex-start; background: rgba(255, 255, 255, 0.08); border-bottom-left-radius: 4px; }
.jc-nachricht--system { align-self: center; background: transparent; color: rgba(243, 243, 243, 0.75); font-size: 13px; text-align: center; }
.jc-nachricht--wartet { opacity: 0.6; font-style: italic; }
.jc-panel__zustand { padding: 10px 14px; font-size: 14px; background: rgba(249, 115, 22, 0.12); border-top: 1px solid rgba(255, 255, 255, 0.06); }
.jc-panel__eingabe { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.jc-panel__eingabe[hidden] { display: none; }
.jc-panel__eingabe textarea { flex: 1 1 auto; resize: none; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(0, 0, 0, 0.35); color: inherit; padding: 8px 10px; font: inherit; font-size: 14px; }
.jc-panel__eingabe textarea:focus-visible { outline: 2px solid var(--accent, #f97316); }
.jc-btn { border: 0; border-radius: 12px; padding: 0 14px; font-weight: 700; cursor: pointer; background: var(--accent, #f97316); color: #1a1a1a; }
.jc-btn:disabled { opacity: 0.5; cursor: default; }
.jc-panel__fuss { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px 10px; font-size: 12px; color: rgba(243, 243, 243, 0.7); }

@keyframes jc-schweben {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (max-width: 480px) {
    .jc { right: 10px; bottom: 10px; }
    .jc-panel { width: calc(100vw - 20px); bottom: 74px; max-height: calc(100vh - 100px); }
}

@media (prefers-reduced-motion: reduce) {
    .jc { transition: none; }
    .jc-maskottchen { animation: none; }
    .jc-maskottchen:hover, .jc-maskottchen:focus-visible { transform: none; }
    .jc-maskottchen__blase { transition: none; }
}
