/* CODSHIPX AI CRM R57-R1-R3
   Floating realtime voice orb for Quick Codi.
   Isolated presentation layer only. */

#cx-r57-voice-dock[hidden] {
  display: none !important;
}

.cx-r57-voice-dock {
  --cx-r57-energy: 0;
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(13,18,19,.88);
  box-shadow:
    0 18px 48px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  color: #f5fbf7;
  font: 600 12px/1.2 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .01em;
  user-select: none;
}

.cx-r57-voice-orb {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.40), rgba(255,255,255,0) 22%),
    radial-gradient(circle at 50% 55%, #33e37b 0%, #13b95d 46%, #08773d 76%, #064e2c 100%);
  box-shadow:
    0 0 calc(18px + (var(--cx-r57-energy) * 24px)) rgba(40,225,118,.38),
    0 0 0 calc(3px + (var(--cx-r57-energy) * 5px)) rgba(72,239,139,.10),
    inset 0 0 18px rgba(255,255,255,.15);
  transform: scale(calc(1 + (var(--cx-r57-energy) * .08)));
  transition: transform 90ms linear, box-shadow 110ms linear, filter 160ms ease;
  outline: none;
}

.cx-r57-voice-orb::before,
.cx-r57-voice-orb::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 1px solid rgba(70,238,138,.26);
  opacity: calc(.36 + (var(--cx-r57-energy) * .45));
  transform: scale(calc(1 + (var(--cx-r57-energy) * .12)));
  pointer-events: none;
}

.cx-r57-voice-orb::after {
  inset: -10px;
  opacity: calc(.12 + (var(--cx-r57-energy) * .24));
}

.cx-r57-voice-orb-core {
  position: absolute;
  inset: 14px;
  display: block;
  border-radius: 50%;
  background: rgba(235,255,243,.94);
  box-shadow:
    0 0 12px rgba(255,255,255,.58),
    0 0 22px rgba(52,232,127,.54);
}

.cx-r57-voice-dock[data-status="connecting"] .cx-r57-voice-orb,
.cx-r57-voice-dock[data-status="thinking"] .cx-r57-voice-orb {
  animation: cx-r57-breathe 1.35s ease-in-out infinite;
}

.cx-r57-voice-dock[data-status="speaking"] .cx-r57-voice-orb {
  filter: saturate(1.15) brightness(1.05);
}

.cx-r57-voice-dock-label {
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 2px;
  color: rgba(245,251,247,.90);
}

.cx-r57-voice-orb:focus-visible {
  box-shadow:
    0 0 0 3px rgba(255,255,255,.82),
    0 0 0 6px rgba(43,226,121,.34),
    0 18px 48px rgba(0,0,0,.34);
}

@keyframes cx-r57-breathe {
  0%, 100% { transform: scale(.98); }
  50% { transform: scale(1.055); }
}

@media (max-width: 640px) {
  .cx-r57-voice-dock {
    right: 14px;
    bottom: 16px;
    min-height: 58px;
    padding: 6px 10px 6px 6px;
  }

  .cx-r57-voice-orb {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .cx-r57-voice-dock-label {
    max-width: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cx-r57-voice-orb {
    animation: none !important;
    transition: none !important;
  }
}
