/* ==========================================================================
   GLOBAL FLOATING ACTION BUTTONS (MİKROFON & AHİZE / TTS) - TEK MERKEZİ KONTROL
   ========================================================================== */

/* 🎤 1. MİKROFON / SESLİ ARAMA BUTONU (.voice-search-fab, #voiceSearchFab) */
.voice-search-fab {
  position: fixed !important;
  right: 16px !important;
  bottom: 62px !important;
  top: auto !important;
  transform: none !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  z-index: 10050 !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.voice-search-fab:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5) !important;
}

.voice-search-fab.listening {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  animation: voicePulse 1.5s infinite !important;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 4px 32px rgba(239, 68, 68, 0.6); }
}

/* 🔊 2. AHİZE / SESLİ OKUMA BUTONU (#ttsButton) */
#ttsButton {
  position: fixed !important;
  right: 16px !important;
  bottom: 108px !important;
  top: auto !important;
  transform: none !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4) !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
  z-index: 10049 !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#ttsButton:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.6) !important;
}

#ttsButton.playing {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  animation: ttsPulse 1.5s infinite !important;
}

@keyframes ttsPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.6), 0 0 0 8px rgba(245, 158, 11, 0.15); }
}

/* 📱 3. MOBİL UYUMLULUK (Tüm Sayfalarda Tek Merkezden Kontrol) */
@media (max-width: 768px) {
  .voice-search-fab {
    bottom: 112px !important;
    right: 16px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 0.95rem !important;
  }

  #ttsButton {
    bottom: 160px !important;
    right: 16px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 0.95rem !important;
  }
}

/* 🎙️ 4. VOICE SEARCH OVERLAY & MODAL STYLES */
.voice-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.voice-search-overlay.active {
  display: flex;
}
.voice-search-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}
.voice-search-content h2 {
  font-size: 1.5rem;
  color: var(--text-main);
  margin-bottom: 20px;
}
.voice-search-content p {
  color: var(--text-muted);
  margin-bottom: 30px;
  font-size: 1.1rem;
}
.voice-search-result {
  background: #f1f5f9;
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
  display: none;
}
.voice-search-result.active {
  display: block;
}
.voice-search-result h3 {
  color: var(--text-main);
  margin-bottom: 10px;
}
.voice-search-result a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}
.voice-search-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}