/**
 * ChiliColectivo Voice – Floating Action Button & UI
 * Stil: dunkel, Tool-Akzentfarbe per --chillicollectivo-tool-accent
 */

:root {
  --chillicollectivo-tool-accent: #D46E6E;
  --chillicollectivo-tool-accent-rgb: 212, 110, 110;
  --chillicollectivo-tool-accent-light-rgb: 234, 176, 176;
  --chillicollectivo-tool-opacity: 1;
}

/* ── Floating Action Button ─────────────────────────────────────────────── */

.chillicollectivo-fab-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2147483647;
  pointer-events: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: max-content;
  opacity: var(--chillicollectivo-tool-opacity, 1);
}

.chillicollectivo-fab-wrap .chillicollectivo-fab {
  position: relative;
  bottom: auto;
  right: auto;
  left: auto;
  top: auto;
  pointer-events: auto;
}

.chillicollectivo-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #0A0A0B;
  color: var(--chillicollectivo-tool-accent);
  cursor: pointer;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  user-select: none;
  outline: none;
  overflow: visible;
  --chillicollectivo-voice-level: 0;
  --chillicollectivo-text-shake: 0;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.55),
    0 0 0 2px var(--chillicollectivo-tool-accent),
    0 0 14px rgba(var(--chillicollectivo-tool-accent-rgb), 0.35);
  transition: box-shadow 0.12s ease, transform 0.12s ease, background 0.15s ease;
  font-family: var(--chillicollectivo-font-family);
  animation: chillicollectivo-green-shimmer 2.8s ease-in-out infinite;
}

.chillicollectivo-fab::before {
  content: '';
  position: absolute;
  inset: calc(-8px - var(--chillicollectivo-voice-level) * 24px);
  border-radius: 50%;
  pointer-events: none;
  opacity: calc(var(--chillicollectivo-voice-level) * 0.92);
  box-shadow:
    0 0 calc(22px + var(--chillicollectivo-voice-level) * 110px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.22 + var(--chillicollectivo-voice-level) * 0.72)),
    0 0 calc(44px + var(--chillicollectivo-voice-level) * 170px) rgba(var(--chillicollectivo-tool-accent-light-rgb), calc(0.12 + var(--chillicollectivo-voice-level) * 0.58));
  transform: scale(calc(1 + var(--chillicollectivo-voice-level) * 0.48));
  transition: inset 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.chillicollectivo-fab:hover {
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.6),
    0 0 0 2px var(--chillicollectivo-tool-accent-light),
    0 0 20px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.5),
    0 0 36px rgba(var(--chillicollectivo-tool-accent-rgb), 0.28);
  transform: translateY(-2px) scale(1.04);
}

.chillicollectivo-fab:active {
  transform: scale(0.96);
}

@keyframes chillicollectivo-green-shimmer {
  0%, 100% {
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.55),
      0 0 0 2px var(--chillicollectivo-tool-accent),
      0 0 12px rgba(var(--chillicollectivo-tool-accent-rgb), 0.32);
  }
  50% {
    box-shadow:
      0 4px 18px rgba(0, 0, 0, 0.55),
      0 0 0 2px var(--chillicollectivo-tool-accent-light),
      0 0 22px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.55),
      0 0 40px rgba(var(--chillicollectivo-tool-accent-rgb), 0.22);
  }
}

/* States */

.chillicollectivo-fab.chillicollectivo-fab-recording,
.chillicollectivo-fab.chillicollectivo-fab-recording:hover,
.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking,
.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking:hover,
.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-voice-hot,
.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-voice-hot:hover,
.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-voice-blaze,
.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-voice-blaze:hover {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  animation: none;
}

.chillicollectivo-fab.chillicollectivo-fab-recording::before {
  display: none !important;
}

.chillicollectivo-fab-recording .chillicollectivo-fab-chili-img {
  filter:
    drop-shadow(0 0 2px rgba(var(--chillicollectivo-tool-accent-rgb), 0.55))
    drop-shadow(0 0 5px rgba(var(--chillicollectivo-tool-accent-rgb), 0.34))
    drop-shadow(0 0 10px rgba(var(--chillicollectivo-tool-accent-rgb), 0.18));
  opacity: 1;
  animation: chillicollectivo-chili-on-glimmer 2.8s ease-in-out infinite;
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-fab-chili-img {
  animation: none;
}

.chillicollectivo-fab-recording:has(.chillicollectivo-fab-chili-img) .chillicollectivo-spark {
  display: none;
}

@keyframes chillicollectivo-chili-on-glimmer {
  0%, 100% {
    filter:
      drop-shadow(0 0 2px rgba(var(--chillicollectivo-tool-accent-rgb), 0.5))
      drop-shadow(0 0 5px rgba(var(--chillicollectivo-tool-accent-rgb), 0.3))
      drop-shadow(0 0 10px rgba(var(--chillicollectivo-tool-accent-rgb), 0.15));
  }
  50% {
    filter:
      drop-shadow(0 0 3px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.72))
      drop-shadow(0 0 7px rgba(var(--chillicollectivo-tool-accent-rgb), 0.46))
      drop-shadow(0 0 14px rgba(var(--chillicollectivo-tool-accent-rgb), 0.24));
  }
}

/* Legacy recording ring – nur falls fab-recording-legacy gesetzt wird */
.chillicollectivo-fab.chillicollectivo-fab-recording-legacy,
.chillicollectivo-fab.chillicollectivo-fab-recording-legacy:hover {
  background: transparent;
  color: inherit;
  animation: chillicollectivo-recording-ring 2.2s ease-in-out infinite;
  box-shadow:
    0 0 0 2px rgba(var(--chillicollectivo-tool-accent-rgb), 0.92),
    0 0 14px rgba(var(--chillicollectivo-tool-accent-rgb), 0.32),
    0 0 26px rgba(var(--chillicollectivo-tool-accent-rgb), 0.14);
}

.chillicollectivo-fab.chillicollectivo-fab-recording-legacy.chillicollectivo-fab-speaking,
.chillicollectivo-fab.chillicollectivo-fab-recording-legacy.chillicollectivo-fab-speaking:hover {
  animation: chillicollectivo-green-shimmer-fast calc(1.4s - var(--chillicollectivo-voice-level) * 0.85s) ease-in-out infinite;
  box-shadow:
    0 4px calc(20px + var(--chillicollectivo-voice-level) * 34px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.36 + var(--chillicollectivo-voice-level) * 0.58)),
    0 0 0 calc(3px + var(--chillicollectivo-voice-level) * 5px) var(--chillicollectivo-tool-accent),
    0 0 calc(28px + var(--chillicollectivo-voice-level) * 88px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.52 + var(--chillicollectivo-voice-level) * 0.62)),
    0 0 calc(56px + var(--chillicollectivo-voice-level) * 140px) rgba(var(--chillicollectivo-tool-accent-light-rgb), calc(0.28 + var(--chillicollectivo-voice-level) * 0.68));
}

@keyframes chillicollectivo-fab-voice-shake {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(calc(1.15 + var(--chillicollectivo-voice-level) * 0.35)); }
}

@keyframes chillicollectivo-green-shimmer-fast {
  0%, 100% {
    box-shadow:
      0 4px calc(20px + var(--chillicollectivo-voice-level) * 28px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.34 + var(--chillicollectivo-voice-level) * 0.52)),
      0 0 0 calc(3px + var(--chillicollectivo-voice-level) * 4px) var(--chillicollectivo-tool-accent),
      0 0 calc(24px + var(--chillicollectivo-voice-level) * 68px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.48 + var(--chillicollectivo-voice-level) * 0.55)),
      0 0 calc(42px + var(--chillicollectivo-voice-level) * 100px) rgba(var(--chillicollectivo-tool-accent-light-rgb), calc(0.22 + var(--chillicollectivo-voice-level) * 0.52));
  }
  50% {
    box-shadow:
      0 4px calc(30px + var(--chillicollectivo-voice-level) * 46px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.5 + var(--chillicollectivo-voice-level) * 0.68)),
      0 0 0 calc(3px + var(--chillicollectivo-voice-level) * 6px) var(--chillicollectivo-tool-accent-light),
      0 0 calc(40px + var(--chillicollectivo-voice-level) * 112px) rgba(var(--chillicollectivo-tool-accent-light-rgb), calc(0.66 + var(--chillicollectivo-voice-level) * 0.62)),
      0 0 calc(68px + var(--chillicollectivo-voice-level) * 160px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.32 + var(--chillicollectivo-voice-level) * 0.68)),
      0 0 calc(104px + var(--chillicollectivo-voice-level) * 210px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(var(--chillicollectivo-voice-level) * 0.52));
  }
}

.chillicollectivo-fab.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-text-shake::before {
  animation: chillicollectivo-halo-broil calc(0.62s - var(--chillicollectivo-text-shake) * 0.42s) ease-in-out infinite;
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-text-shake .chillicollectivo-fab-icon-img {
  animation: chillicollectivo-icon-broil calc(0.58s - var(--chillicollectivo-text-shake) * 0.38s) ease-in-out infinite;
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-text-broil .chillicollectivo-fab-icon-img {
  animation: chillicollectivo-icon-broil calc(0.48s - var(--chillicollectivo-text-shake) * 0.32s) ease-in-out infinite;
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-text-broil-heavy .chillicollectivo-fab-icon-img {
  animation: chillicollectivo-icon-broil-heavy calc(0.32s - var(--chillicollectivo-text-shake) * 0.18s) ease-in-out infinite;
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-text-broil-heavy:not(:has(.chillicollectivo-fab-chili-img)) {
  animation:
    chillicollectivo-green-shimmer-fast calc(0.9s - var(--chillicollectivo-voice-level) * 0.45s) ease-in-out infinite,
    chillicollectivo-fab-body-broil calc(0.38s - var(--chillicollectivo-text-shake) * 0.2s) ease-in-out infinite;
}

@keyframes chillicollectivo-icon-broil {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20% { transform: translate(calc(-0.5px - var(--chillicollectivo-text-shake) * 2.5px), calc(var(--chillicollectivo-text-shake) * 1.5px)) rotate(calc(-0.8deg - var(--chillicollectivo-text-shake) * 2.5deg)); }
  40% { transform: translate(calc(0.5px + var(--chillicollectivo-text-shake) * 2.5px), calc(-0.5px - var(--chillicollectivo-text-shake) * 1.5px)) rotate(calc(0.8deg + var(--chillicollectivo-text-shake) * 2.5deg)); }
  60% { transform: translate(calc(-0.3px - var(--chillicollectivo-text-shake) * 1.5px), calc(var(--chillicollectivo-text-shake) * 1px)) rotate(calc(-0.4deg - var(--chillicollectivo-text-shake) * 1.5deg)); }
  80% { transform: translate(calc(0.3px + var(--chillicollectivo-text-shake) * 1.5px), calc(-0.3px)) rotate(calc(0.4deg + var(--chillicollectivo-text-shake) * 1.5deg)); }
}

@keyframes chillicollectivo-icon-broil-heavy {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
  15% { transform: translate(calc(-1px - var(--chillicollectivo-text-shake) * 4px), calc(1px + var(--chillicollectivo-text-shake) * 3px)) rotate(calc(-1.5deg - var(--chillicollectivo-text-shake) * 5deg)) scale(calc(1 + var(--chillicollectivo-text-shake) * 0.06)); }
  35% { transform: translate(calc(1px + var(--chillicollectivo-text-shake) * 4px), calc(-1px - var(--chillicollectivo-text-shake) * 3px)) rotate(calc(1.5deg + var(--chillicollectivo-text-shake) * 5deg)) scale(calc(1 + var(--chillicollectivo-text-shake) * 0.05)); }
  55% { transform: translate(calc(-0.8px - var(--chillicollectivo-text-shake) * 3px), calc(0.8px + var(--chillicollectivo-text-shake) * 2px)) rotate(calc(-1deg - var(--chillicollectivo-text-shake) * 4deg)); }
  75% { transform: translate(calc(0.8px + var(--chillicollectivo-text-shake) * 3px), calc(-0.8px)) rotate(calc(1deg + var(--chillicollectivo-text-shake) * 4deg)) scale(calc(1 + var(--chillicollectivo-text-shake) * 0.04)); }
}

@keyframes chillicollectivo-halo-broil {
  0%, 100% { transform: scale(calc(1 + var(--chillicollectivo-voice-level) * 0.4)) translate(0, 0); }
  33% { transform: scale(calc(1.05 + var(--chillicollectivo-voice-level) * 0.45 + var(--chillicollectivo-text-shake) * 0.15)) translate(calc(var(--chillicollectivo-text-shake) * -2px), calc(var(--chillicollectivo-text-shake) * 1px)); }
  66% { transform: scale(calc(1.03 + var(--chillicollectivo-voice-level) * 0.42 + var(--chillicollectivo-text-shake) * 0.1)) translate(calc(var(--chillicollectivo-text-shake) * 2px), calc(var(--chillicollectivo-text-shake) * -1px)); }
}

@keyframes chillicollectivo-fab-body-broil {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(calc(var(--chillicollectivo-text-shake) * -1.5px), calc(var(--chillicollectivo-text-shake) * 1px)); }
  50% { transform: translate(calc(var(--chillicollectivo-text-shake) * 1.5px), calc(var(--chillicollectivo-text-shake) * -1px)); }
  75% { transform: translate(calc(var(--chillicollectivo-text-shake) * -1px), calc(var(--chillicollectivo-text-shake) * 0.5px)); }
}

.chillicollectivo-fab.chillicollectivo-fab-loading,
.chillicollectivo-fab.chillicollectivo-fab-loading:hover {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  animation: none;
}

.chillicollectivo-fab.chillicollectivo-fab-loading::before {
  display: none;
}

.chillicollectivo-fab.chillicollectivo-fab-loading .chillicollectivo-fab-chili-img {
  filter:
    drop-shadow(0 0 2px rgba(255, 70, 70, 0.5))
    drop-shadow(0 0 5px rgba(255, 50, 50, 0.32))
    drop-shadow(0 0 9px rgba(255, 35, 35, 0.16));
  opacity: 0.82;
  animation: chillicollectivo-chili-off-glimmer 2.8s ease-in-out infinite;
}

.chillicollectivo-fab.chillicollectivo-fab-error,
.chillicollectivo-fab.chillicollectivo-fab-error:hover {
  background: transparent;
  color: inherit;
  animation: none;
  box-shadow: none;
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking.chillicollectivo-fab-voice-hot .chillicollectivo-spark {
  width: calc(4px + var(--chillicollectivo-voice-level) * 4px);
  height: calc(4px + var(--chillicollectivo-voice-level) * 4px);
  box-shadow: 0 0 calc(6px + var(--chillicollectivo-voice-level) * 16px) rgba(var(--chillicollectivo-tool-accent-light-rgb), calc(0.8 + var(--chillicollectivo-voice-level) * 0.2));
}

/* Sparks Particles (Funken) – nur während aktivem Sprechen */
.chillicollectivo-fab-recording:not(.chillicollectivo-fab-speaking) .chillicollectivo-spark {
  animation: none !important;
  opacity: 0;
}

.chillicollectivo-spark {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--chillicollectivo-tool-accent);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: -1;
  box-shadow: 0 0 6px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.8);
}

.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(1) {
  animation: chillicollectivo-spark-anim-1 2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(2) {
  animation: chillicollectivo-spark-anim-2 2.6s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(3) {
  animation: chillicollectivo-spark-anim-3 2.2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(4) {
  animation: chillicollectivo-spark-anim-4 3s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.5s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(5) {
  animation: chillicollectivo-spark-anim-5 2.4s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(6) {
  animation: chillicollectivo-spark-anim-6 2.8s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(7) {
  animation: chillicollectivo-spark-anim-7 2.1s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.3s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(8) {
  animation: chillicollectivo-spark-anim-8 3.2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(9) {
  animation: chillicollectivo-spark-anim-9 2.5s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(10) {
  animation: chillicollectivo-spark-anim-10 2.9s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(11) {
  animation: chillicollectivo-spark-anim-11 2.3s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(12) {
  animation: chillicollectivo-spark-anim-12 2.7s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.6s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(13) {
  animation: chillicollectivo-spark-anim-13 3.1s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(14) {
  animation: chillicollectivo-spark-anim-14 2.6s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.4s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(15) {
  animation: chillicollectivo-spark-anim-15 2.2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s;
}
.chillicollectivo-fab-recording.chillicollectivo-fab-speaking .chillicollectivo-spark:nth-of-type(16) {
  animation: chillicollectivo-spark-anim-16 3.0s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s;
}

@keyframes chillicollectivo-spark-anim-1 {
  0%   { opacity: 0; transform: translate(-24px, -24px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-30px, -28px) scale(0.8); }
}
@keyframes chillicollectivo-spark-anim-2 {
  0%   { opacity: 0; transform: translate(25px, -21px) scale(0.5); }
  20%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(32px, -25px) scale(0.9); }
}
@keyframes chillicollectivo-spark-anim-3 {
  0%   { opacity: 0; transform: translate(-21px, 25px) scale(0.5); }
  20%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(-28px, 31px) scale(0.7); }
}
@keyframes chillicollectivo-spark-anim-4 {
  0%   { opacity: 0; transform: translate(24px, 24px) scale(0.5); }
  20%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate(29px, 30px) scale(0.6); }
}
@keyframes chillicollectivo-spark-anim-5 {
  0%   { opacity: 0; transform: translate(6px, -27px) scale(0.5); }
  20%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(10px, -33px) scale(0.8); }
}
@keyframes chillicollectivo-spark-anim-6 {
  0%   { opacity: 0; transform: translate(27px, -6px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(34px, -3px) scale(0.9); }
}
@keyframes chillicollectivo-spark-anim-7 {
  0%   { opacity: 0; transform: translate(-8px, 27px) scale(0.5); }
  20%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(-14px, 34px) scale(0.7); }
}
@keyframes chillicollectivo-spark-anim-8 {
  0%   { opacity: 0; transform: translate(-27px, 6px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-33px, 12px) scale(0.9); }
}
@keyframes chillicollectivo-spark-anim-9 {
  0%   { opacity: 0; transform: translate(-15px, -26px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-21px, -33px) scale(0.7); }
}
@keyframes chillicollectivo-spark-anim-10 {
  0%   { opacity: 0; transform: translate(22px, -15px) scale(0.5); }
  20%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(30px, -18px) scale(0.8); }
}
@keyframes chillicollectivo-spark-anim-11 {
  0%   { opacity: 0; transform: translate(-18px, 21px) scale(0.5); }
  20%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(-24px, 28px) scale(0.9); }
}
@keyframes chillicollectivo-spark-anim-12 {
  0%   { opacity: 0; transform: translate(16px, 25px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(22px, 33px) scale(0.7); }
}
@keyframes chillicollectivo-spark-anim-13 {
  0%   { opacity: 0; transform: translate(-6px, -28px) scale(0.5); }
  20%  { opacity: 0.9; }
  100% { opacity: 0; transform: translate(-10px, -35px) scale(0.6); }
}
@keyframes chillicollectivo-spark-anim-14 {
  0%   { opacity: 0; transform: translate(28px, 6px) scale(0.5); }
  20%  { opacity: 0.7; }
  100% { opacity: 0; transform: translate(35px, 10px) scale(0.8); }
}
@keyframes chillicollectivo-spark-anim-15 {
  0%   { opacity: 0; transform: translate(8px, 27px) scale(0.5); }
  20%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(14px, 34px) scale(0.7); }
}
@keyframes chillicollectivo-spark-anim-16 {
  0%   { opacity: 0; transform: translate(-27px, -6px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(-34px, -10px) scale(0.9); }
}

/* Spin für Loading */
.chillicollectivo-spin {
  animation: chillicollectivo-spin 1s linear infinite;
}

@keyframes chillicollectivo-spin {
  to { transform: rotate(360deg); }
}

/* Icon */
.chillicollectivo-fab-icon {
  width: 26px;
  height: 26px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

.chillicollectivo-fab-icon-img:not(.chillicollectivo-fab-badge-img) {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(79%) sepia(45%) saturate(626%) hue-rotate(93deg) brightness(97%) contrast(92%) drop-shadow(0 0 5px rgba(var(--chillicollectivo-tool-accent-rgb), 0.55));
}

.chillicollectivo-fab-badge-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  transition: filter 0.1s ease, transform 0.1s ease;
}

.chillicollectivo-fab-chili-img {
  width: auto;
  height: 72px;
  max-width: 108px;
  max-height: 72px;
  border-radius: 0;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.chillicollectivo-fab-chili-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 72px;
  line-height: 0;
  flex-shrink: 0;
}

.chillicollectivo-fab-chili-wrap-on {
  filter: drop-shadow(0 0 8px rgba(var(--chillicollectivo-tool-accent-rgb), 0.35));
}

.chillicollectivo-fab-recording .chillicollectivo-fab-chili-wrap-on {
  filter: drop-shadow(0 0 10px rgba(var(--chillicollectivo-tool-accent-rgb), 0.45))
    drop-shadow(0 0 18px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.28));
  animation: chillicollectivo-chili-wrap-on-pulse 2.8s ease-in-out infinite;
}

@keyframes chillicollectivo-chili-wrap-on-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(var(--chillicollectivo-tool-accent-rgb), 0.38))
      drop-shadow(0 0 16px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.22));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.58))
      drop-shadow(0 0 22px rgba(var(--chillicollectivo-tool-accent-rgb), 0.34));
  }
}

/* Rote Chili (tot): ab und zu leicht zucken */
.chillicollectivo-fab-chili-wrap-off {
  transform-origin: 58% 72%;
  animation: chillicollectivo-chili-dead-wobble 6.8s ease-in-out infinite;
}

@keyframes chillicollectivo-chili-dead-wobble {
  0%, 74%, 100% {
    transform: rotate(0deg) translate(0, 0);
  }
  76% {
    transform: rotate(-1.3deg) translate(-0.8px, 0.5px);
  }
  78% {
    transform: rotate(1.1deg) translate(0.7px, -0.35px);
  }
  80% {
    transform: rotate(-0.7deg) translate(-0.45px, 0.25px);
  }
  82% {
    transform: rotate(0.45deg) translate(0.35px, 0.1px);
  }
  84% {
    transform: rotate(-0.25deg) translate(-0.15px, 0.05px);
  }
  86%, 100% {
    transform: rotate(0deg) translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chillicollectivo-fab-chili-wrap-off {
    animation: none !important;
  }
}

.chillicollectivo-fab-recording .chillicollectivo-fab-badge-img:not(.chillicollectivo-fab-chili-img) {
  opacity: 1;
  animation: chillicollectivo-mic-on-badge-glimmer 2.35s ease-in-out infinite;
}

@keyframes chillicollectivo-mic-on-badge-glimmer {
  0%, 100% {
    filter:
      brightness(1.04)
      drop-shadow(0 0 6px rgba(var(--chillicollectivo-tool-accent-rgb), 0.55))
      drop-shadow(0 0 14px rgba(var(--chillicollectivo-tool-accent-rgb), 0.32));
  }
  50% {
    filter:
      brightness(1.1)
      drop-shadow(0 0 11px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.9))
      drop-shadow(0 0 24px rgba(var(--chillicollectivo-tool-accent-rgb), 0.62))
      drop-shadow(0 0 38px rgba(var(--chillicollectivo-tool-accent-rgb), 0.3));
  }
}

@keyframes chillicollectivo-recording-ring {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(var(--chillicollectivo-tool-accent-rgb), 0.88),
      0 0 16px rgba(var(--chillicollectivo-tool-accent-rgb), 0.42),
      0 0 32px rgba(var(--chillicollectivo-tool-accent-rgb), 0.2),
      0 0 48px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.1);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(var(--chillicollectivo-tool-accent-light-rgb), 1),
      0 0 24px rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.58),
      0 0 44px rgba(var(--chillicollectivo-tool-accent-rgb), 0.32),
      0 0 64px rgba(var(--chillicollectivo-tool-accent-rgb), 0.16);
  }
}

/* Mikro AUS = Chili ohne Rahmen/Kreis – leichtes rotes Kanten-Glimmern */
.chillicollectivo-fab.chillicollectivo-fab-ready,
.chillicollectivo-fab.chillicollectivo-fab-error,
.chillicollectivo-fab.chillicollectivo-fab-locked {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  animation: none;
}

.chillicollectivo-fab.chillicollectivo-fab-error {
  animation: none;
}

.chillicollectivo-fab.chillicollectivo-fab-ready::before,
.chillicollectivo-fab.chillicollectivo-fab-error::before,
.chillicollectivo-fab.chillicollectivo-fab-locked::before {
  display: none;
}

.chillicollectivo-fab.chillicollectivo-fab-ready:hover,
.chillicollectivo-fab.chillicollectivo-fab-error:hover,
.chillicollectivo-fab.chillicollectivo-fab-locked:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: none;
  filter: none;
}

.chillicollectivo-fab.chillicollectivo-fab-ready .chillicollectivo-fab-chili-img,
.chillicollectivo-fab.chillicollectivo-fab-error .chillicollectivo-fab-chili-img,
.chillicollectivo-fab.chillicollectivo-fab-locked .chillicollectivo-fab-chili-img {
  filter:
    drop-shadow(0 0 2px rgba(255, 70, 70, 0.5))
    drop-shadow(0 0 5px rgba(255, 50, 50, 0.32))
    drop-shadow(0 0 9px rgba(255, 35, 35, 0.16));
  opacity: 1;
  animation: chillicollectivo-chili-off-glimmer 2.8s ease-in-out infinite;
}

.chillicollectivo-fab.chillicollectivo-fab-ready:hover .chillicollectivo-fab-chili-img,
.chillicollectivo-fab.chillicollectivo-fab-error:hover .chillicollectivo-fab-chili-img,
.chillicollectivo-fab.chillicollectivo-fab-locked:hover .chillicollectivo-fab-chili-img {
  animation: chillicollectivo-chili-off-glimmer-hover 2.2s ease-in-out infinite;
}

.chillicollectivo-fab.chillicollectivo-fab-error .chillicollectivo-fab-badge-img:not(.chillicollectivo-fab-chili-img) {
  filter: none;
  opacity: 1;
}

.chillicollectivo-fab.chillicollectivo-fab-locked .chillicollectivo-fab-chili-img {
  filter:
    grayscale(0.35) brightness(0.82)
    drop-shadow(0 0 6px rgba(251, 191, 36, 0.55))
    drop-shadow(0 0 14px rgba(245, 158, 11, 0.35));
  opacity: 0.88;
}

@keyframes chillicollectivo-chili-off-glimmer {
  0%, 100% {
    filter:
      drop-shadow(0 0 2px rgba(255, 68, 68, 0.48))
      drop-shadow(0 0 5px rgba(255, 45, 45, 0.28))
      drop-shadow(0 0 10px rgba(255, 32, 32, 0.14));
  }
  50% {
    filter:
      drop-shadow(0 0 3px rgba(255, 88, 88, 0.62))
      drop-shadow(0 0 7px rgba(255, 55, 55, 0.38))
      drop-shadow(0 0 13px rgba(255, 38, 38, 0.2));
  }
}

@keyframes chillicollectivo-chili-off-glimmer-hover {
  0%, 100% {
    filter:
      drop-shadow(0 0 3px rgba(255, 78, 78, 0.58))
      drop-shadow(0 0 7px rgba(255, 52, 52, 0.36))
      drop-shadow(0 0 12px rgba(255, 36, 36, 0.18));
  }
  50% {
    filter:
      drop-shadow(0 0 4px rgba(255, 95, 95, 0.72))
      drop-shadow(0 0 9px rgba(255, 58, 58, 0.46))
      drop-shadow(0 0 16px rgba(255, 40, 40, 0.24));
  }
}

/* Aufnahme = grüner Halo-Schein (nur Legacy-Badge ohne Chili-Grafik) */
.chillicollectivo-fab.chillicollectivo-fab-recording-legacy::before {
  z-index: 1;
  display: block;
  content: '';
  position: absolute;
  inset: calc(-6px - var(--chillicollectivo-voice-level) * 14px);
  border-radius: 50%;
  pointer-events: none;
  opacity: calc(0.62 + var(--chillicollectivo-voice-level) * 0.28);
  animation: chillicollectivo-mic-on-halo 2.35s ease-in-out infinite;
  background: radial-gradient(
    circle,
    rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.36 + var(--chillicollectivo-voice-level) * 0.22)) 0%,
    rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.14 + var(--chillicollectivo-voice-level) * 0.16)) 52%,
    transparent 72%
  );
  box-shadow:
    0 0 calc(18px + var(--chillicollectivo-voice-level) * 70px) rgba(var(--chillicollectivo-tool-accent-rgb), calc(0.24 + var(--chillicollectivo-voice-level) * 0.45)),
    0 0 calc(36px + var(--chillicollectivo-voice-level) * 110px) rgba(var(--chillicollectivo-tool-accent-light-rgb), calc(0.14 + var(--chillicollectivo-voice-level) * 0.35));
  transform: scale(calc(1 + var(--chillicollectivo-voice-level) * 0.18));
  transition: inset 0.1s ease, opacity 0.1s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

@keyframes chillicollectivo-mic-on-halo {
  0%, 100% {
    opacity: calc(0.58 + var(--chillicollectivo-voice-level) * 0.18);
    transform: scale(calc(0.98 + var(--chillicollectivo-voice-level) * 0.12));
  }
  50% {
    opacity: calc(0.92 + var(--chillicollectivo-voice-level) * 0.08);
    transform: scale(calc(1.07 + var(--chillicollectivo-voice-level) * 0.22));
  }
}

/* ── Chilliblatt-Button (Einstellungen) ─────────────────────────────────── */

.chillicollectivo-fab-gear {
  position: absolute;
  bottom: -1px;
  left: -3px;
  width: 17.5px;
  height: 17.5px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2147483647;
  padding: 0;
  transition: transform 0.2s ease;
}

.chillicollectivo-fab-gear:hover {
  transform: scale(1.22);
}

.chillicollectivo-fab-gear-img {
  width: 17.5px;
  height: 17.5px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  transition: transform 0.2s ease, filter 0.2s ease;
  filter: brightness(1) saturate(1);
  border: none;
  outline: none;
  box-shadow: none;
}

.chillicollectivo-fab-gear-leaf {
  width: 21px;
  height: 21px;
  left: 6px;
  bottom: 0;
}

.chillicollectivo-fab-gear-leaf .chillicollectivo-fab-gear-img {
  width: 21px;
  height: 21px;
}

.chillicollectivo-fab-gear-leaf:hover .chillicollectivo-fab-gear-img {
  transform: scale(1.08);
  filter:
    brightness(1.45)
    saturate(1.25)
    drop-shadow(0 0 5px rgba(255, 80, 80, 0.9))
    drop-shadow(0 0 12px rgba(255, 50, 50, 0.65))
    drop-shadow(0 0 20px rgba(220, 30, 30, 0.4));
}

.chillicollectivo-fab-gear-mic {
  width: 24px;
  height: 24px;
  bottom: 0;
  left: 3px;
}

.chillicollectivo-fab-gear-mic .chillicollectivo-fab-gear-img {
  width: 24px;
  height: 24px;
}

.chillicollectivo-fab-gear-mic:hover .chillicollectivo-fab-gear-img {
  transform: scale(1.08);
  filter:
    brightness(1.15)
    drop-shadow(0 0 2px rgba(var(--chillicollectivo-tool-accent-rgb), 0.65))
    drop-shadow(0 0 5px rgba(var(--chillicollectivo-tool-accent-rgb), 0.42))
    drop-shadow(0 0 9px rgba(var(--chillicollectivo-tool-accent-rgb), 0.22));
}

/* ── Dropdown-Menü ──────────────────────────────────────────────────────── */

.chillicollectivo-fab-menu {
  position: absolute;
  min-width: 228px;
  background: #111113;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 0;
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 2px 8px rgba(0,0,0,0.4);
  z-index: 2147483646;
  display: none;
  font-family: var(--chillicollectivo-font-family);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition: opacity 0.14s ease, transform 0.14s ease;
  pointer-events: none;
}

.chillicollectivo-fab-menu-visible {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chillicollectivo-fab-menu-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(74,222,128,0.55);
  padding: 2px 14px 8px;
}

.chillicollectivo-fab-menu-info {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  padding: 2px 14px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chillicollectivo-fab-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.chillicollectivo-fab-menu-row:hover {
  background: rgba(255,255,255,0.04);
}

.chillicollectivo-fab-menu-row span {
  font-size: 13px;
  color: #d4cfe8;
  user-select: none;
}

.chillicollectivo-fab-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 6px 0;
}

.chillicollectivo-fab-menu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  background: none;
  border: none;
  color: rgba(74,222,128,0.75);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.chillicollectivo-fab-menu-link:hover {
  background: rgba(74,222,128,0.06);
  color: var(--chillicollectivo-tool-accent);
}

/* ── Erweitertes Einstellungs-Panel ─────────────────────────────────────── */

.chillicollectivo-fab-menu-wide {
  position: fixed;
  min-width: 320px;
  width: 340px;
  max-height: min(82vh, 560px);
  overflow-y: auto;
  padding: 12px 0 14px;
}

.chillicollectivo-fab-menu-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
}

.chillicollectivo-fab-menu-field-block {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.chillicollectivo-fab-menu-label {
  font-size: 12px;
  color: #d4cfe8;
  user-select: none;
}

.chillicollectivo-fab-menu-hint {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
}

.chillicollectivo-fab-menu-select,
.chillicollectivo-fab-menu-input,
.chillicollectivo-fab-menu-textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #f2e9ff;
  font-size: 12px;
  font-family: inherit;
  padding: 6px 8px;
  outline: none;
  transition: border-color 0.15s ease;
}

.chillicollectivo-fab-menu-select:focus,
.chillicollectivo-fab-menu-input:focus,
.chillicollectivo-fab-menu-textarea:focus {
  border-color: rgba(74,222,128,0.45);
}

.chillicollectivo-fab-menu-select {
  min-width: 148px;
  cursor: pointer;
}

.chillicollectivo-fab-menu-textarea {
  width: 100%;
  resize: vertical;
  min-height: 56px;
  line-height: 1.4;
}

.chillicollectivo-fab-menu-input {
  width: 100%;
}

.chillicollectivo-fab-menu-hotkey {
  padding: 4px 14px 6px;
}

.chillicollectivo-fab-menu-hotkey-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.chillicollectivo-fab-menu-hotkey-value {
  flex: 1;
  font-size: 12px;
  color: rgba(74,222,128,0.85);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chillicollectivo-fab-menu-btn {
  background: rgba(74,222,128,0.12);
  border: 1px solid rgba(74,222,128,0.25);
  border-radius: 6px;
  color: var(--chillicollectivo-tool-accent);
  font-size: 11px;
  font-family: inherit;
  padding: 4px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease;
}

.chillicollectivo-fab-menu-btn:hover {
  background: rgba(74,222,128,0.2);
}

.chillicollectivo-fab-menu-btn-muted {
  color: rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.chillicollectivo-fab-menu-btn-muted:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
}

.chillicollectivo-fab-menu-token {
  padding-top: 2px;
}

/* ── Toggle-Switch ──────────────────────────────────────────────────────── */

.chillicollectivo-toggle {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chillicollectivo-toggle-on {
  background: var(--chillicollectivo-tool-accent);
}

.chillicollectivo-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), background 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.chillicollectivo-toggle-on .chillicollectivo-toggle-thumb {
  transform: translateX(14px);
  background: #0A0A0B;
}

/* ── Vorschau-Overlay (zentriert, groß – wie TalkFlowX) ─────────────────── */

.chillicollectivo-voice-overlay {
  position: fixed;
  isolation: isolate;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 900px;
  width: 82%;
  box-sizing: border-box;
  padding: var(--chillicollectivo-preview-padding-y, 16px) var(--chillicollectivo-preview-padding-x, 24px);
  background: linear-gradient(145deg, rgba(10,10,11,0.96), rgba(17,17,18,0.98));
  color: var(--chillicollectivo-preview-text, #F2E9FF);
  font-size: var(--chillicollectivo-preview-font-size, 22px);
  font-weight: var(--chillicollectivo-preview-font-weight, 300);
  line-height: 1.5;
  text-align: center;
  text-transform: none;
  font-variant: normal;
  z-index: 2147483647;
  border-radius: 16px;
  border: 1px solid var(--chillicollectivo-preview-border, rgba(74,222,128,0.28));
  box-shadow: none;
  white-space: pre-wrap;
  word-break: break-word;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  font-family: 'ChilliPreview', Verdana, Geneva, sans-serif;
  --chillicollectivo-voice-level: 0;
  --chillicollectivo-text-shake: 0;
  --chillicollectivo-preview-opacity: 1;

  /* Versteckt per default */
  display: none;
  opacity: 0;
  transition: opacity 0.32s ease, box-shadow 0.55s ease-in-out, border-color 0.55s ease-in-out;
}

.chillicollectivo-voice-overlay-drag-enabled {
  pointer-events: auto;
}

.chillicollectivo-voice-overlay-drag-enabled:not(.chillicollectivo-voice-overlay-editable) .chillicollectivo-voice-overlay-content {
  pointer-events: none;
}

.chillicollectivo-voice-overlay-drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: -6px 0 8px;
  padding: 2px 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), 0.18);
  color: rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), 0.72);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.chillicollectivo-voice-overlay-drag-enabled .chillicollectivo-voice-overlay-drag-handle {
  display: flex;
}

.chillicollectivo-voice-overlay-dragging .chillicollectivo-voice-overlay-drag-handle {
  cursor: grabbing;
}

.chillicollectivo-voice-overlay-pinned .chillicollectivo-voice-overlay-drag-handle {
  display: none !important;
}

.chillicollectivo-voice-overlay-content {
  display: block;
  width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.chillicollectivo-voice-overlay-custom-size {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chillicollectivo-voice-overlay-custom-size .chillicollectivo-voice-overlay-content {
  flex: 1 1 auto;
}

.chillicollectivo-voice-overlay-resize-handle {
  display: none;
  position: absolute;
  right: 4px;
  bottom: 2px;
  width: 20px;
  height: 20px;
  color: rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), 0.72);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: nwse-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  z-index: 3;
}

.chillicollectivo-voice-overlay-drag-enabled .chillicollectivo-voice-overlay-resize-handle {
  display: block;
}

.chillicollectivo-voice-overlay-pinned .chillicollectivo-voice-overlay-resize-handle {
  display: none !important;
}

.chillicollectivo-voice-overlay-resizing .chillicollectivo-voice-overlay-resize-handle {
  cursor: nwse-resize;
}

.chillicollectivo-voice-overlay-custom-pos {
  transform: none !important;
}


.chillicollectivo-voice-overlay-send-glow {
  --send-glow-a: calc(0.42 + var(--chillicollectivo-send-glow-strength, 1) * 0.58);
  color: #fef9c3;
  border-color: rgba(253, 224, 71, 0.55);
}

.chillicollectivo-voice-overlay-send-glow-hold {
  border-color: rgba(254, 240, 138, 0.78);
  box-shadow:
    0 0 0 1px rgba(253, 224, 71, 0.42),
    0 0 24px 10px rgba(254, 240, 138, 0.48),
    0 0 52px 20px rgba(253, 224, 71, 0.28),
    0 0 84px 32px rgba(250, 204, 21, 0.16);
  animation: chillicollectivo-preview-send-glow-breathe 2.4s ease-in-out infinite;
}

.chillicollectivo-voice-overlay-send-glow-fade {
  animation: chillicollectivo-preview-send-glow-fade-out 1.1s ease-in-out forwards;
}

@keyframes chillicollectivo-preview-send-glow-breathe {
  0%, 100% {
    border-color: rgba(254, 240, 138, 0.68);
    box-shadow:
      0 0 0 1px rgba(253, 224, 71, 0.34),
      0 0 20px 8px rgba(254, 240, 138, 0.38),
      0 0 44px 16px rgba(253, 224, 71, 0.22),
      0 0 70px 26px rgba(250, 204, 21, 0.12);
  }
  50% {
    border-color: rgba(255, 247, 181, 0.92);
    box-shadow:
      0 0 0 1px rgba(253, 224, 71, 0.55),
      0 0 30px 14px rgba(254, 240, 138, 0.58),
      0 0 64px 24px rgba(253, 224, 71, 0.36),
      0 0 96px 36px rgba(250, 204, 21, 0.2);
  }
}

@keyframes chillicollectivo-preview-send-glow-fade-out {
  0% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(0.992);
  }
}

.chillicollectivo-voice-overlay-custom-pos.chillicollectivo-voice-overlay-send-glow-fade {
  animation: chillicollectivo-preview-send-glow-fade-out-custom 1.1s ease-in-out forwards;
}

@keyframes chillicollectivo-preview-send-glow-fade-out-custom {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.992);
  }
}

.chillicollectivo-voice-overlay-border-snake {
  position: absolute;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

.chillicollectivo-voice-overlay-send-border-pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  background: transparent;
  animation: chillicollectivo-preview-border-soft-pulse 1.05s cubic-bezier(0.22, 1, 0.36, 1) 1 forwards;
}

@keyframes chillicollectivo-preview-border-soft-pulse {
  0% {
    opacity: 0;
    transform: scale(0.992);
    box-shadow:
      0 0 0 0 rgba(255, 251, 235, 0),
      0 0 0 0 rgba(254, 249, 195, 0);
  }
  24% {
    opacity: 1;
    transform: scale(1);
    box-shadow:
      0 0 18px 6px rgba(255, 251, 235, 0.62),
      0 0 36px 14px rgba(254, 249, 195, 0.48),
      0 0 58px 22px rgba(253, 224, 71, 0.24);
  }
  62% {
    opacity: 0.92;
    transform: scale(1.002);
    box-shadow:
      0 0 22px 8px rgba(255, 251, 235, 0.52),
      0 0 42px 16px rgba(254, 249, 195, 0.38),
      0 0 64px 24px rgba(253, 224, 71, 0.18);
  }
  100% {
    opacity: 0;
    transform: scale(1.004);
    box-shadow:
      0 0 10px 3px rgba(255, 251, 235, 0.14),
      0 0 22px 8px rgba(254, 249, 195, 0.08);
  }
}

@keyframes chillicollectivo-preview-border-snake-run {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -100; }
}

.chillicollectivo-voice-overlay-send-glow .chillicollectivo-voice-overlay-committed,
.chillicollectivo-voice-overlay-send-glow .chillicollectivo-voice-overlay-interim {
  text-shadow:
    0 0 14px rgba(253, 224, 71, calc(var(--send-glow-a, 0.5) * 0.42)),
    0 0 28px rgba(254, 240, 138, calc(var(--send-glow-a, 0.5) * 0.24));
}


.chillicollectivo-voice-overlay-editable {
  pointer-events: auto;
  text-align: left;
  cursor: text;
  transition: opacity 0.32s ease;
}

.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-preview-body {
  display: block;
}

.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-committed {
  outline: none;
  min-height: 1.2em;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  white-space: pre-wrap;
  word-break: break-word;
}

.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-committed:focus {
  outline: 1px solid var(--chillicollectivo-preview-focus, rgba(var(--chillicollectivo-tool-accent-rgb), 0.45));
  border-radius: 8px;
}

.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-interim,
.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-enter-hint,
.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-sendword,
.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-charcount {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.chillicollectivo-voice-overlay-charcount {
  display: block;
  width: 100%;
  text-align: center;
  font-size: var(--chillicollectivo-preview-aux-font-size, 14px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.08em;
  color: var(--chillicollectivo-preview-hint, rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), 0.88));
  margin: 0 0 10px;
}

.chillicollectivo-voice-overlay-charcount-ready {
  color: #bbf7d0;
}

.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-interim,
.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-enter-hint,
.chillicollectivo-voice-overlay-editable .chillicollectivo-voice-overlay-sendword {
  text-align: center;
}

.chillicollectivo-voice-overlay-visible {
  display: block;
  opacity: var(--chillicollectivo-preview-opacity, 1);
}

.chillicollectivo-fab-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(8px) scale(0.9);
  z-index: 2147483647;
  pointer-events: none;
  display: none;
  width: max-content;
  max-width: min(300px, 88vw);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1.05, 0.32, 1);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.48));
}

.chillicollectivo-fab-tip-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.chillicollectivo-fab-tip-bubble {
  background: linear-gradient(155deg, rgba(7, 24, 12, 0.97), rgba(12, 46, 24, 0.98));
  border: 2px solid rgba(74, 222, 128, 0.82);
  color: #ecfdf5;
  font-family: var(--chillicollectivo-font-family, system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.38;
  padding: 11px 15px;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(134, 239, 172, 0.18) inset,
    0 0 22px rgba(74, 222, 128, 0.32);
  text-align: center;
  letter-spacing: 0.01em;
}

.chillicollectivo-fab-tip-tail {
  width: 14px;
  height: 14px;
  margin: -7px auto 0;
  transform: rotate(45deg);
  background: rgba(12, 46, 24, 0.98);
  border-right: 2px solid rgba(74, 222, 128, 0.82);
  border-bottom: 2px solid rgba(74, 222, 128, 0.82);
  box-shadow: 4px 4px 12px rgba(74, 222, 128, 0.18);
}

.chillicollectivo-fab-tip-word,
.chillicollectivo-fab-tip-letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  animation: chillicollectivo-fab-tip-word-in 0.42s cubic-bezier(0.22, 1.12, 0.32, 1) forwards;
}

.chillicollectivo-fab-tip-bubble-milestone-1 {
  animation: chillicollectivo-fab-tip-milestone-pulse-1 1.8s ease-in-out infinite;
}

.chillicollectivo-fab-tip-bubble-milestone-2 {
  animation: chillicollectivo-fab-tip-milestone-pulse-2 1.5s ease-in-out infinite;
  border-color: rgba(110, 231, 183, 0.92);
}

.chillicollectivo-fab-tip-bubble-milestone-3 {
  animation: chillicollectivo-fab-tip-milestone-pulse-3 1.25s ease-in-out infinite;
  border-color: rgba(52, 211, 153, 0.95);
  box-shadow:
    0 0 0 1px rgba(167, 243, 208, 0.24) inset,
    0 0 28px rgba(52, 211, 153, 0.42);
}

.chillicollectivo-fab-tip-bubble-milestone-4 {
  animation: chillicollectivo-fab-tip-milestone-shake 0.82s ease-in-out infinite;
  border-color: rgba(250, 204, 21, 0.9);
  color: #fef9c3;
}

.chillicollectivo-fab-tip-bubble-milestone-5 {
  animation: chillicollectivo-fab-tip-milestone-glow-5 1.1s ease-in-out infinite;
  border-color: rgba(251, 191, 36, 0.95);
  background: linear-gradient(155deg, rgba(40, 18, 4, 0.98), rgba(82, 32, 8, 0.98));
  color: #fde68a;
}

.chillicollectivo-fab-tip-bubble-milestone-6 {
  animation: chillicollectivo-fab-tip-milestone-glow-6 0.85s ease-in-out infinite;
  border-color: rgba(248, 113, 113, 0.95);
  background: linear-gradient(155deg, rgba(48, 8, 8, 0.98), rgba(92, 18, 12, 0.98));
  color: #fecaca;
  font-size: 14px;
}

.chillicollectivo-fab-tip-milestone-4.chillicollectivo-fab-tip-visible,
.chillicollectivo-fab-tip-milestone-5.chillicollectivo-fab-tip-visible,
.chillicollectivo-fab-tip-milestone-6.chillicollectivo-fab-tip-visible {
  filter: drop-shadow(0 12px 30px rgba(250, 204, 21, 0.35));
}

@keyframes chillicollectivo-fab-tip-word-in {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes chillicollectivo-fab-tip-milestone-pulse-1 {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

@keyframes chillicollectivo-fab-tip-milestone-pulse-2 {
  0%, 100% { transform: scale(1); box-shadow: 0 0 18px rgba(74, 222, 128, 0.28); }
  50% { transform: scale(1.035); box-shadow: 0 0 26px rgba(110, 231, 183, 0.45); }
}

@keyframes chillicollectivo-fab-tip-milestone-pulse-3 {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.04) rotate(-0.4deg); }
  75% { transform: scale(1.04) rotate(0.4deg); }
}

@keyframes chillicollectivo-fab-tip-milestone-shake {
  0%, 100% { transform: translateX(0) scale(1.03); }
  20% { transform: translateX(-1px) scale(1.04); }
  40% { transform: translateX(1px) scale(1.04); }
  60% { transform: translateX(-1px) scale(1.03); }
  80% { transform: translateX(1px) scale(1.04); }
}

@keyframes chillicollectivo-fab-tip-milestone-glow-5 {
  0%, 100% {
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.35), 0 0 0 1px rgba(253, 224, 71, 0.2) inset;
    transform: scale(1.04);
  }
  50% {
    box-shadow: 0 0 34px rgba(251, 191, 36, 0.62), 0 0 0 2px rgba(253, 224, 71, 0.35) inset;
    transform: scale(1.07);
  }
}

@keyframes chillicollectivo-fab-tip-milestone-glow-6 {
  0%, 100% {
    box-shadow: 0 0 20px rgba(248, 113, 113, 0.45), 0 0 0 1px rgba(252, 165, 165, 0.25) inset;
    transform: scale(1.05) rotate(0deg);
  }
  33% {
    box-shadow: 0 0 40px rgba(248, 113, 113, 0.75), 0 0 0 2px rgba(252, 165, 165, 0.4) inset;
    transform: scale(1.09) rotate(-0.6deg);
  }
  66% {
    box-shadow: 0 0 36px rgba(250, 204, 21, 0.55), 0 0 0 2px rgba(253, 224, 71, 0.35) inset;
    transform: scale(1.08) rotate(0.6deg);
  }
}

.chillicollectivo-voice-overlay-send-crumble {
  animation: chillicollectivo-preview-crumble-fall 0.78s cubic-bezier(0.2, 0.75, 0.28, 1) forwards;
  overflow: visible;
}

.chillicollectivo-voice-overlay-send-crumble .chillicollectivo-voice-overlay-committed,
.chillicollectivo-voice-overlay-send-crumble .chillicollectivo-voice-overlay-interim {
  display: inline-block;
  animation: chillicollectivo-preview-text-crack 0.44s ease-out forwards;
}

.chillicollectivo-voice-overlay-crack {
  position: absolute;
  z-index: 2;
  height: 2px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 0 5%, rgba(255, 255, 255, 0.98) 8% 24%, transparent 26% 31%, rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.95) 34% 62%, transparent 65% 70%, rgba(255, 255, 255, 0.9) 74% 100%);
  box-shadow:
    0 0 6px rgba(255, 255, 255, 0.9),
    0 0 14px rgba(var(--chillicollectivo-tool-accent-rgb), 0.65),
    0 1px 0 rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform-origin: center;
  animation: chillicollectivo-preview-crack-line 0.74s cubic-bezier(0.2, 0.8, 0.22, 1) forwards;
  animation-delay: var(--crack-delay, 0ms);
}

.chillicollectivo-voice-overlay-shard {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: linear-gradient(145deg, rgba(242, 233, 255, 0.9), rgba(var(--chillicollectivo-tool-accent-rgb), 0.55));
  box-shadow: 0 0 7px rgba(var(--chillicollectivo-tool-accent-rgb), 0.38);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  animation: chillicollectivo-preview-shard-fall 0.68s ease-in forwards;
  animation-delay: var(--shard-delay, 0ms);
}

@keyframes chillicollectivo-preview-crumble-fall {
  0% {
    opacity: var(--chillicollectivo-preview-opacity, 1);
    transform: translateX(-50%) translateY(0) scale(1);
    filter: blur(0);
  }
  22% {
    opacity: var(--chillicollectivo-preview-opacity-95, 0.95);
    transform: translateX(-50%) translateY(8px) scale(0.99);
    filter: blur(0);
  }
  48% {
    opacity: var(--chillicollectivo-preview-opacity-62, 0.62);
    transform: translateX(-50%) translateY(26px) scale(0.97);
    filter: blur(0.6px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(62px) scale(0.92);
    filter: blur(2px);
  }
}

.chillicollectivo-voice-overlay-custom-pos.chillicollectivo-voice-overlay-send-crumble {
  animation: chillicollectivo-preview-crumble-fall-custom 0.78s cubic-bezier(0.2, 0.75, 0.28, 1) forwards;
}

@keyframes chillicollectivo-preview-crumble-fall-custom {
  0% {
    opacity: var(--chillicollectivo-preview-opacity, 1);
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  22% {
    opacity: var(--chillicollectivo-preview-opacity-95, 0.95);
    transform: translateY(8px) scale(0.99);
    filter: blur(0);
  }
  48% {
    opacity: var(--chillicollectivo-preview-opacity-62, 0.62);
    transform: translateY(26px) scale(0.97);
    filter: blur(0.6px);
  }
  100% {
    opacity: 0;
    transform: translateY(62px) scale(0.92);
    filter: blur(2px);
  }
}

@keyframes chillicollectivo-preview-text-crack {
  0% {
    opacity: 1;
    transform: translate(0, 0) skew(0deg);
    letter-spacing: 0;
  }
  42% {
    opacity: 0.9;
    transform: translate(-2px, 2px) skew(-2deg);
    letter-spacing: 0.02em;
  }
  100% {
    opacity: 0.25;
    transform: translate(3px, 18px) skew(5deg);
    letter-spacing: 0.12em;
  }
}

@keyframes chillicollectivo-preview-crack-line {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--crack-rotate, 0deg)) scaleX(0);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--crack-rotate, 0deg)) scaleX(1);
  }
  55% {
    opacity: 0.86;
    transform: translate(-50%, 14px) rotate(var(--crack-rotate, 0deg)) scaleX(1.08);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, 48px) rotate(var(--crack-rotate, 0deg)) scaleX(0.65);
  }
}

@keyframes chillicollectivo-preview-shard-fall {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(0deg);
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--shard-x, 0px)), calc(-50% + var(--shard-y, 46px))) scale(0.12) rotate(var(--shard-rotate, 24deg));
  }
}

/* Leuchten wenn Effekt aktiv */
.chillicollectivo-voice-overlay-glow {
  box-shadow:
    0 0 calc(18px + var(--chillicollectivo-voice-level) * 40px) rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), calc(0.55 + var(--chillicollectivo-voice-level) * 0.35)),
    0 0 calc(44px + var(--chillicollectivo-voice-level) * 80px) rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), calc(0.30 + var(--chillicollectivo-voice-level) * 0.4)),
    0 0 calc(80px + var(--chillicollectivo-voice-level) * 120px) rgba(var(--chillicollectivo-preview-accent-rgb, 74, 222, 128), calc(0.15 + var(--chillicollectivo-voice-level) * 0.35));
}

.chillicollectivo-voice-overlay-glow.chillicollectivo-voice-overlay-hot {
  border-color: var(--chillicollectivo-preview-border, rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.55));
}

/* Interim-Text (noch nicht final) etwas dimmer */
.chillicollectivo-voice-overlay-interim {
  color: var(--chillicollectivo-preview-interim, rgba(242,233,255,0.72));
  font-style: normal;
  font-family: 'ChilliPreview', Verdana, Geneva, sans-serif !important;
  font-size: inherit;
  font-weight: var(--chillicollectivo-preview-font-weight, 300);
  text-transform: none !important;
  font-variant: normal;
  font-synthesis: none;
}

/* Sendewort-Badge in der Vorschau – Smileys aus den Optionen haben Vorrang */
.chillicollectivo-voice-overlay-sendword {
  display: inline-block;
  margin-left: 0.35em;
  color: #ff2d2d;
  font-size: 1.55em;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(255, 45, 45, 0.45);
  vertical-align: baseline;
}

.chillicollectivo-voice-overlay-enter-hint {
  display: block;
  margin-top: 0.45em;
  color: var(--chillicollectivo-preview-hint, rgba(var(--chillicollectivo-tool-accent-light-rgb), 0.88));
  font-size: 0.82em;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Direktmodus: einheitliche Vorschau-Farbe – kein Gruen/Weiss-Wechsel */
.chillicollectivo-voice-overlay-dictation-unified .chillicollectivo-voice-overlay-committed,
.chillicollectivo-voice-overlay-dictation-unified .chillicollectivo-voice-overlay-interim {
  color: var(--chillicollectivo-preview-text, #F2E9FF);
}

/* Committed-Text (bereits final, noch sichtbar im Overlay) */
.chillicollectivo-voice-overlay-committed {
  color: var(--chillicollectivo-preview-text, #F2E9FF);
  font-style: normal;
  font-family: 'ChilliPreview', Verdana, Geneva, sans-serif !important;
  font-size: inherit;
  font-weight: var(--chillicollectivo-preview-font-weight, 300);
  text-transform: none !important;
  font-variant: normal;
  font-synthesis: none;
}


.chillicollectivo-voice-icon {
  position: absolute;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: 2147483647;
  pointer-events: auto;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
}

.chillicollectivo-voice-icon:hover {
  transform: translateY(-50%) scale(1.1);
}

.chillicollectivo-voice-icon svg {
  width: 24px;
  height: 24px;
  display: block;
  margin: auto;
}

/* Ready State - Schwarzer Hintergrund mit grünem Mikrofon */
.chillicollectivo-state-ready {
  background-color: #0A0A0B;
  color: var(--chillicollectivo-tool-accent);
}

.chillicollectivo-state-ready:hover {
  background-color: #0A0A0B;
  color: var(--chillicollectivo-tool-accent);
  transform: translateY(-50%) scale(1.1);
}

/* Recording State - Grüner Schimmer-Rahmen */
.chillicollectivo-state-recording {
  background-color: #0A0A0B;
  color: var(--chillicollectivo-tool-accent);
  animation: pulse-recording 2s ease-in-out infinite;
  box-shadow: 0 0 0 2px var(--chillicollectivo-tool-accent), 0 0 14px rgba(var(--chillicollectivo-tool-accent-rgb), 0.4);
}

.chillicollectivo-state-recording:hover {
  background-color: #0A0A0B;
  color: var(--chillicollectivo-tool-accent-light);
}

@keyframes pulse-recording {
  0%, 100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.05);
  }
}

/* Loading State – transparent wie bereit, kein schwarzer Kreis */
.chillicollectivo-state-loading {
  background-color: transparent;
  color: inherit;
}

.chillicollectivo-state-loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Error State - Rotes Ausrufezeichen */
.chillicollectivo-state-error {
  color: #F87171;
}

.chillicollectivo-state-error:hover {
  color: #EF4444;
  background-color: rgba(248, 113, 113, 0.1);
}

/* Tooltip Enhancement */
.chillicollectivo-voice-icon::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  right: 0;
  background-color: #1A1A1C;
  color: #FFFFFF;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--chillicollectivo-font-family);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2147483647;
  margin-bottom: 4px;
  border: 1px solid #2A2A2C;
}

.chillicollectivo-voice-icon:hover::after {
  opacity: 1;
  transform: translateY(-8px);
}

/* Fade in animation when icon appears */
.chillicollectivo-voice-icon {
  animation: chillicollectivo-fade-in 0.3s ease-out;
}

@keyframes chillicollectivo-fade-in {
  from {
    opacity: 0;
    transform: translateY(calc(-50% - 2px)) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Ensure icon is visible above other elements */
.chillicollectivo-voice-icon {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chillicollectivo-voice-icon:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Live-Vorschau (oben, bearbeitbar) */
.chillicollectivo-live-preview {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2147483645;
  width: min(920px, calc(100vw - 24px));
  max-height: min(42vh, 360px);
  display: none;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(var(--cc-live-preview-accent-rgb, 74, 222, 128), 0.34);
  background: rgba(8, 18, 12, calc(var(--cc-live-preview-opacity, 1) * 0.92));
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(var(--cc-live-preview-accent-rgb, 74, 222, 128), 0.08);
  backdrop-filter: blur(8px);
  color: #f2e9ff;
  overflow: hidden;
}

.chillicollectivo-live-preview.is-visible {
  display: flex;
}

.chillicollectivo-live-preview.has-custom-pos {
  transform: none;
}

.chillicollectivo-live-preview-handle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--cc-live-preview-accent-rgb, 74, 222, 128), 0.72);
  border-bottom: 1px solid rgba(var(--cc-live-preview-accent-rgb, 74, 222, 128), 0.16);
  cursor: grab;
  user-select: none;
}

.chillicollectivo-live-preview.is-movable .chillicollectivo-live-preview-handle {
  display: flex;
}

.chillicollectivo-live-preview.is-dragging .chillicollectivo-live-preview-handle {
  cursor: grabbing;
}

.chillicollectivo-live-preview-editor {
  flex: 1 1 auto;
  min-height: 72px;
  max-height: calc(min(42vh, 360px) - 56px);
  overflow: auto;
  padding: 14px 18px 10px;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: var(--cc-live-preview-font-size, 22px);
  font-weight: var(--cc-live-preview-font-weight, 800);
  line-height: 1.35;
  color: #f8f4ff;
}

.chillicollectivo-live-preview-editor:empty::before {
  content: 'Sprich ins Mikro – Text erscheint hier live …';
  color: rgba(242, 233, 255, 0.42);
}

.chillicollectivo-live-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 14px 10px;
  border-top: 1px solid rgba(var(--cc-live-preview-accent-rgb, 74, 222, 128), 0.12);
}

.chillicollectivo-live-preview-footer .chillicollectivo-voice-overlay-charcount {
  font-size: 12px;
  font-weight: 700;
  color: rgba(var(--cc-live-preview-accent-rgb, 74, 222, 128), 0.9);
}

.chillicollectivo-live-preview-footer .chillicollectivo-voice-overlay-enter-hint {
  font-size: 12px;
  color: rgba(242, 233, 255, 0.72);
}

.chillicollectivo-live-preview-resize {
  display: none;
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 14px;
  height: 14px;
  cursor: nwse-resize;
  opacity: 0.55;
}

.chillicollectivo-live-preview.is-movable .chillicollectivo-live-preview-resize {
  display: block;
}

.chillicollectivo-live-preview.is-movable.has-custom-size {
  max-height: none;
}
