/* BRAINMORE - Conversacion por voz (v0.4.0) */

#brainmore-voice-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}

.bm-voice-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bm-voice-btn {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, #7A2C36 0%, #5C1F26 100%);
  box-shadow: 0 6px 22px rgba(122, 44, 54, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bm-voice-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(122, 44, 54, 0.55);
}

.bm-voice-btn:active {
  transform: scale(0.97);
}

.bm-voice-btn svg {
  width: 36px;
  height: 36px;
}

/* Estado recording: rojo pulsante */
.bm-state-recording {
  background: linear-gradient(135deg, #C0392B 0%, #922B21 100%);
  animation: bm-pulse 1.3s infinite;
}

@keyframes bm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.7), 0 6px 22px rgba(192, 57, 43, 0.4); }
  50% { box-shadow: 0 0 0 20px rgba(192, 57, 43, 0), 0 6px 22px rgba(192, 57, 43, 0.4); }
}

/* Estado processing: spinner */
.bm-state-processing {
  background: linear-gradient(135deg, #7A2C36 0%, #5C1F26 100%);
}

.bm-state-processing svg {
  display: none;
}

.bm-state-processing::after {
  content: '';
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: bm-spin 0.9s linear infinite;
}

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

/* Estado speaking: verde con ondas */
.bm-state-speaking {
  background: linear-gradient(135deg, #117A65 0%, #0E6655 100%);
  animation: bm-wave 1.6s infinite;
}

@keyframes bm-wave {
  0%, 100% { box-shadow: 0 0 0 0 rgba(17, 122, 101, 0.7), 0 6px 22px rgba(17, 122, 101, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(17, 122, 101, 0), 0 6px 22px rgba(17, 122, 101, 0.4); }
}

.bm-voice-reset {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(122, 44, 54, 0.15);
  background: white;
  color: #7A2C36;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.bm-voice-reset:hover {
  background: #F5E8EA;
}

.bm-voice-reset:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #F7F7F7;
}

.bm-voice-replay {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 15px;
}

.bm-play-fallback {
  background: #7A2C36;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 4px;
}

.bm-play-preview {
  font-size: 11px;
  color: #666;
  display: block;
  margin-top: 4px;
}

.bm-voice-status {
  padding: 7px 14px;
  background: white;
  border-radius: 16px;
  font-size: 13px;
  color: #333;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 240px;
  text-align: center;
  line-height: 1.35;
}
