/* Frontend CSS for Voice Bridge */


.vb-container {
  position: fixed;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  bottom: 50px;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

.vb-pos-bottom-right {
  right: 24px;
  align-items: flex-end;
}

.vb-pos-bottom-left {
  left: 24px;
  align-items: flex-start;
}

.vb-mic-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 8px 24px rgba(15, 23, 42, 0.18));
}

.vb-mic-cluster {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 4px 20px rgba(15, 23, 42, 0.08);
  transition:
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.vb-container:not(.vb-has-avatar) .vb-mic-cluster {
  width: 74px;
  height: 74px;
  padding: 8px;
  border-radius: 50%;
}

.vb-container.vb-has-avatar .vb-mic-cluster {
  padding-left: 8px;
}

.vb-mic-cluster.vb-recording-active {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 0 0 2px rgba(255, 255, 255, 0.5),
    0 8px 28px rgba(15, 23, 42, 0.12);
}

.vb-mic-avatar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 4px 12px rgba(15, 23, 42, 0.12);
}

.vb-mic-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vb-mic-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.vb-mic-button {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;;
  border: none !important;
  color: #fff;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
  outline: none;
  padding:0 !important;
}

.vb-mic-button svg {
  width: 26px;
  height: 26px;
}

.vb-mic-button:hover {
  transform: scale(1.06);
}

.vb-mic-button:active {
  transform: scale(0.96);
}

.vb-recording-indicator {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  max-width: 180px;
  text-align: center;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.3;
  animation: vbFadePulse 1s ease-in-out infinite alternate;
}

.vb-mic-hint {
  position: absolute;
  bottom: -45px;
  left: 50%;
  --vb-hint-shift: 0px;
  transform: translateX(calc(-50% + var(--vb-hint-shift)));
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-radius: 25px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 8px 26px rgba(15, 23, 42, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 500;
  padding: 8px 14px;
  white-space: normal;
  box-sizing: border-box;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.vb-mic-hint-visible {
  opacity: 1;
}

.vb-wait-reply {
  background: rgba(241, 250, 255, 0.98);
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow:
    0 4px 20px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(15, 23, 42, 0.04);
  padding: 12px 16px;
  margin-bottom: 10px;
  width: min(300px, calc(100vw - 48px));
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: #0c4a6e;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vb-reply-toast {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  padding: 16px;
  margin-bottom: 10px;
  width: min(300px, calc(100vw - 48px));
  border: 1px solid rgba(226, 232, 240, 0.9);
  animation: vbSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vb-toast-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 14px;
  color: #0f172a;
  gap: 8px;
}

#vb-reply-toast-title {
  flex: 1;
  min-width: 0;
}

.vb-close-toast {
  background: rgba(241, 245, 249, 0.9) !important;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #64748b !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s ease,
    color 0.15s ease;
    padding: 2px 5px !important;
    border-radius: 50% !important;
}

.vb-close-toast:hover {
  background: #e2e8f0;
  color: #0f172a;
}

#vb-reply-audio {
  width: 100%;
  height: 40px;
}

@keyframes vbSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes vbFadePulse {
  from {
    opacity: 0.75;
  }
  to {
    opacity: 1;
  }
}