/**
 * AUDIO BUTTON - Microlins Bauru Centro
 * Botão de controle de áudio com animações
 */

.audio-toggle-btn {
  position: fixed;
  bottom: 120px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #003399, #0a3fa8);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.3);
  transition: all 0.3s ease;
  z-index: 998;
  animation: slideUp 0.3s ease-out;
  overflow: hidden;
}

/* Animação de entrada */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estado padrão (mudo) */
.audio-toggle-btn {
  opacity: 0.7;
}

/* Hover */
.audio-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 51, 153, 0.5);
  opacity: 1;
}

/* Estado ativo (tocando) */
.audio-toggle-btn.playing {
  background: linear-gradient(135deg, #FFCC00, #e6b800);
  color: #003399;
  opacity: 1;
  animation: pulse 2s ease-in-out infinite;
}

.audio-toggle-btn.playing:hover {
  box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6);
}

/* Ícones */
.audio-toggle-btn .audio-icon,
.audio-toggle-btn .audio-icon-muted {
  width: 24px;
  height: 24px;
  stroke-width: 2;
  animation: inherit;
}

/* Animação de pulsação */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
  }
  50% {
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.6);
  }
}

/* Animação do ícone quando tocando */
.audio-toggle-btn.playing .audio-icon {
  animation: soundWave 0.6s ease-in-out infinite;
}

@keyframes soundWave {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Active state */
.audio-toggle-btn:active {
  transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
  .audio-toggle-btn {
    bottom: 100px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .audio-toggle-btn .audio-icon,
  .audio-toggle-btn .audio-icon-muted {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .audio-toggle-btn {
    bottom: 90px;
    right: 15px;
    width: 48px;
    height: 48px;
  }

  .audio-toggle-btn .audio-icon,
  .audio-toggle-btn .audio-icon-muted {
    width: 18px;
    height: 18px;
  }
}

/* Tooltip ao hover */
.audio-toggle-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  margin-bottom: 8px;
  font-weight: 500;
}

.audio-toggle-btn:hover::before {
  opacity: 1;
}

/* Print: esconder */
@media print {
  .audio-toggle-btn {
    display: none !important;
  }
}
