/* Floating voice button - Easy Touch style */
.gm-voice-float {
  position: fixed;
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(20, 16, 32, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.4s ease, transform 0.15s ease, box-shadow 0.3s ease;
  opacity: 0.55;
}
.gm-voice-float:active { transform: scale(0.92); }
.gm-voice-float.idle { opacity: 0.35; }
.gm-voice-float.active { opacity: 1; }
.gm-voice-float[hidden] { display: none !important; }
/* Mic icon inside float */
.gm-voice-float .gm-vf-icon {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #8b5cf6, #d946ef);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 17v4'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='9' y='2' width='6' height='12' rx='3'/%3E%3Cpath d='M5 10a7 7 0 0 0 14 0M12 17v4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.gm-voice-float.mic-on .gm-vf-icon {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
}
.gm-voice-float.mic-on {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 16px rgba(52, 211, 153, 0.35);
}
/* Speaking pulse */
.gm-voice-float.speaking::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.7);
  animation: gm-vf-pulse 1.2s ease-out infinite;
}
@keyframes gm-vf-pulse {
  0% { transform: scale(0.95); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}
/* Expanded control panel */
.gm-voice-panel {
  position: fixed;
  z-index: 91;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 20px;
  background: rgba(20, 16, 32, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(139, 92, 246, 0.2);
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gm-voice-panel.open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.gm-voice-panel[hidden] { display: none !important; }
.gm-voice-panel button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 22px;
}
.gm-voice-panel button:active { transform: scale(0.9); }
/* One-shot flash when a voice control is toggled (pulseControl in game-voice.js) */
.gm-voice-panel button.gm-voice-flash { animation: gm-voice-flash 0.45s ease-out; }
@keyframes gm-voice-flash {
  0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.55); }
  100% { box-shadow: 0 0 0 12px rgba(139, 92, 246, 0); }
}
.gm-voice-panel #gm-voice-mic[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.3), rgba(16, 185, 129, 0.3));
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.4);
}
.gm-voice-panel #gm-voice-spk[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(217, 70, 239, 0.3));
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}
.gm-voice-panel #gm-voice-mic[aria-pressed="false"],
.gm-voice-panel #gm-voice-spk[aria-pressed="false"] {
  opacity: 0.5;
}
.gm-voice-panel button svg {
  width: 26px;
  height: 26px;
  display: block;
  color: #fff;
}
/* Legacy bar hidden */
