/**
 * Equalaw UI Components
 * Language suggestion toast, language picker, voice button styles
 */

/* ============================================
   Language Suggestion Toast
   ============================================ */

.lang-suggestion-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 1rem;
  max-width: 320px;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: 'Outfit', sans-serif;
}

.toast-content > span {
  font-size: 0.9375rem;
  color: #1e293b;
  line-height: 1.5;
  font-weight: 500;
}

.toast-buttons {
  display: flex;
  gap: 0.5rem;
}

.toast-buttons button {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

.btn-switch {
  background: #0061cc;
  color: white;
}

.btn-switch:hover {
  background: #004da3;
  transform: translateY(-1px);
}

.btn-switch:active {
  transform: scale(0.98);
}

.btn-dismiss {
  background: #f1f5f9;
  color: #64748b;
}

.btn-dismiss:hover {
  background: #e2e8f0;
}

/* ============================================
   Floating Language Picker
   ============================================ */

#lang-picker {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 50;
  font-family: 'Outfit', sans-serif;
}

#lang-toggle {
  background: white;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  font-family: 'Outfit', sans-serif;
}

#lang-toggle:hover {
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

#lang-toggle:active {
  transform: translateY(0);
}

#lang-dropdown {
  position: absolute;
  bottom: 100%;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 140px;
  margin-bottom: 0.5rem;
  display: none;
  animation: slideUp 0.2s ease-out;
}

#lang-dropdown.open {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#lang-dropdown button {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  border: none;
  background: white;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: 'Outfit', sans-serif;
}

#lang-dropdown button:hover {
  background: #f1f5f9;
  color: #0061cc;
}

#lang-dropdown button[selected] {
  background: #eff6ff;
  color: #0061cc;
  font-weight: 600;
}

#lang-dropdown button:last-child {
  border-bottom: none;
}

/* ============================================
   Voice Button Styles
   ============================================ */

.voice-btn {
  background: white;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
}

.voice-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.voice-btn:active {
  transform: scale(0.98);
}

.voice-btn.recording {
  background: #ef4444;
  color: white;
  border-color: #dc2626;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.voice-indicator {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 49%, 100% {
    opacity: 1;
  }
  50%, 99% {
    opacity: 0.3;
  }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 640px) {
  .lang-suggestion-toast {
    top: 60px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  #lang-picker {
    bottom: 10px;
    right: 10px;
  }

  #lang-toggle {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}
