/**
 * voice-search.css
 * Stile pulsante ricerca vocale — brand THE Menu
 * Dark teal: #1B3A4B | Coral: #E8623D
 * Font: Poppins/Inter (eredita dal body, non forzato qui)
 */

#voice-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #1B3A4B; /* dark teal a riposo */
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

#voice-search-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.15s ease;
}

#voice-search-btn.voice-listening svg {
  transform: scale(1.1);
}

#voice-search-btn:hover:not(:disabled) {
  background-color: rgba(27, 58, 75, 0.08);
  transform: scale(1.05);
}

#voice-search-btn:active:not(:disabled) {
  transform: scale(0.95);
}

#voice-search-btn:disabled {
  color: #b0b8bc;
  cursor: not-allowed;
}

/* Stato attivo: in ascolto -> coral pulsante */
#voice-search-btn.voice-listening {
  color: #E8623D;
  background-color: rgba(232, 98, 61, 0.1);
}

#voice-search-btn.voice-listening::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #E8623D;
  animation: voice-pulse 1.4s ease-out infinite;
}

@keyframes voice-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Testo/feedback sotto o accanto al pulsante */
#voice-feedback {
  font-family: 'Inter', 'Poppins', sans-serif;
  font-size: 13px;
  color: #1B3A4B;
  opacity: 0.75;
  margin-left: 8px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Variante compatta per mobile: nasconde il feedback testuale, mantiene solo icona */
@media (max-width: 480px) {
  #voice-feedback {
    display: none;
  }
}
