/* ========================================================
   Ground Up Tasks — Voice Assistant Styles
   FAB, overlay, timers, TTS toast
   ======================================================== */

/* ---- Floating Action Button (Mic) ---- */
.voice-fab {
  position: fixed;
  bottom: 100px;
  left: 50%;
  margin-left: 170px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border: none;
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4), 0 0 0 0 rgba(99, 102, 241, 0.3);
  z-index: 200;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fabPulse 3s ease-in-out infinite;
}

.voice-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.voice-fab:active { transform: scale(0.95); }
.voice-fab .material-icons { font-size: 30px; }

.voice-fab.active {
  animation: none;
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 8px 32px rgba(220, 38, 38, 0.4);
}

@keyframes fabPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4), 0 0 0 0 rgba(99, 102, 241, 0.3); }
  50%      { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4), 0 0 0 12px rgba(99, 102, 241, 0); }
}

/* ---- Voice Overlay ---- */
.voice-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.voice-overlay.active {
  display: flex;
  animation: screenFadeIn 0.3s ease;
}

.voice-wave-container {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 32px;
}

.voice-wave-container::before,
.voice-wave-container::after {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.3);
  animation: voiceWaveRing 2s ease-out infinite;
}

.voice-wave-container::after { animation-delay: 0.6s; }

.voice-wave-container .material-icons {
  font-size: 48px;
  color: #a78bfa;
  animation: micBounce 1.5s ease-in-out infinite;
}

@keyframes voiceWaveRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes micBounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

.voice-status-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  margin-bottom: 12px;
}

.voice-transcript-text {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  min-height: 48px;
  max-width: 320px;
  line-height: 1.5;
}

.voice-cancel-btn {
  margin-top: 40px;
  padding: 14px 40px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.voice-cancel-btn:hover { background: rgba(255, 255, 255, 0.15); }

.voice-result-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 20px 24px;
  margin-top: 24px;
  text-align: center;
  max-width: 340px;
  width: 100%;
}

.voice-result-card .result-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.voice-result-card .result-msg {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  line-height: 1.5;
}

/* ---- Text Command Input Fallback ---- */
.voice-text-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  max-width: 340px;
  width: 100%;
}

.voice-text-input {
  flex: 1;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  transition: all 0.3s;
}

.voice-text-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.voice-text-input:focus {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.voice-text-send {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.voice-text-send:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.voice-text-send .material-icons {
  font-size: 20px;
}
/* ---- Active Timers Panel ---- */
.timers-section {
  margin-bottom: 28px;
  display: none;
}

.timers-section.has-timers { display: block; }

.timer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s;
}

.timer-card.alarm {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.04);
  animation: timerAlarm 0.5s ease infinite alternate;
}

@keyframes timerAlarm {
  0%   { transform: scale(1); }
  100% { transform: scale(1.01); box-shadow: 0 0 24px rgba(239, 68, 68, 0.15); }
}

.timer-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.timer-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.timer-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.timer-countdown {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.timer-card.alarm .timer-countdown { color: var(--accent-red); }

.timer-dismiss-btn {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.timer-dismiss-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent-red);
}

/* ---- TTS Toast Notification ---- */
.tts-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  color: #fff;
  padding: 12px 24px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 360px;
  pointer-events: none;
}

.tts-toast.show {
  transform: translateX(-50%) translateY(0);
}

.tts-toast .material-icons {
  font-size: 20px;
  color: #a78bfa;
  animation: ttsIconPulse 1s ease-in-out infinite;
}

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