/* Sleek, Simple, Minimal Prixest Live Call UI */

#liveCallTrigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

#liveCallTrigger:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.live-call-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
}

/* Call Modal Screen */
#liveCallModal {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 330px;
  max-width: calc(100vw - 40px);
  max-height: 500px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

#liveCallModal.live-call-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
}

/* Header */
.live-call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.live-call-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-call-title h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.live-call-timer {
  font-size: 11px;
  font-family: monospace;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 6px;
}

.live-call-timer.warning {
  color: #ef4444;
  background: #fee2e2;
}

.live-call-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-call-close-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

/* Visualizer / Minimal Pulse Sphere */
.live-call-visualizer {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fafafa;
}

.live-call-sphere {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #6366f1;
  transition: all 0.2s ease;
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
}

.live-call-sphere.listening {
  background: #10b981;
  animation: spherePulseGreen 1.5s infinite;
}

.live-call-sphere.processing {
  background: #f59e0b;
  animation: spherePulseAmber 1.2s infinite;
}

.live-call-sphere.speaking {
  background: #6366f1;
  animation: spherePulseIndigo 1.2s infinite;
}

@keyframes spherePulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes spherePulseAmber {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

@keyframes spherePulseIndigo {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(99, 102, 241, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.live-call-status-label {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-align: center;
}

/* Transcript Stream */
.live-call-transcript {
  flex: 1;
  min-height: 140px;
  max-height: 200px;
  overflow-y: auto;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.live-call-msg {
  word-break: break-word;
}

.live-call-msg strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 4px;
}

.live-call-msg.user strong {
  color: #059669;
}

.live-call-msg.ai strong {
  color: #4f46e5;
}

.live-call-msg.interim {
  opacity: 0.65;
  font-style: italic;
}

.live-call-notice {
  font-size: 11px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.4;
  text-align: center;
}

.live-call-notice a {
  color: #4338ca;
  font-weight: 600;
  text-decoration: underline;
}

/* Bottom Controls */
.live-call-controls {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #fafafa;
}

.live-call-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.live-call-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.live-call-btn.muted {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.live-call-btn.hangup {
  background: #ef4444;
  color: #ffffff;
  border: none;
}

.live-call-btn.hangup:hover {
  background: #dc2626;
}

/* Minimal Text Input Row */
.live-call-input-row {
  display: none;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  gap: 6px;
}

.live-call-input-row.active {
  display: flex;
}

.live-call-input-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  outline: none;
}

.live-call-input-row button {
  padding: 6px 12px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  #liveCallModal {
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}
