/* Language Switcher */
.language-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--white);
  border: 1px solid var(--green-light);
  border-radius: 50px;
  color: var(--green-deep);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  background: var(--green-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.lang-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  color: var(--text-dark);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.lang-option:hover {
  background: var(--green-pale);
}

.lang-option.active {
  background: var(--green-mid);
  color: var(--white);
}

.lang-flag {
  font-size: 1.2rem;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--green-pale);
  border-top-color: var(--green-mid);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Voice Assistant */
.voice-assistant {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.voice-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-mid), var(--green-light));
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(46, 125, 79, 0.3);
  transition: all 0.3s ease;
  animation: pulse-voice 2s infinite;
}

.voice-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(46, 125, 79, 0.4);
}

@keyframes pulse-voice {
  0% {
    box-shadow: 0 0 0 0 rgba(46, 125, 79, 0.4);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(46, 125, 79, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 125, 79, 0);
  }
}

.voice-panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 300px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
  animation: slideIn 0.3s ease;
}

.voice-panel.show {
  display: block;
}

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

.voice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--green-deep), var(--green-mid));
  color: var(--white);
}

.voice-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.voice-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.voice-close:hover {
  opacity: 1;
}

.voice-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--green-pale);
  color: var(--green-deep);
  font-size: 0.9rem;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-mid);
  transition: all 0.3s ease;
}

.voice-status.listening .status-indicator {
  background: var(--red-alert);
  animation: pulse-listening 1s infinite;
}

@keyframes pulse-listening {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.voice-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px;
}

.voice-control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--green-light);
  border-radius: 8px;
  background: none;
  color: var(--green-deep);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.voice-control-btn:hover {
  background: var(--green-pale);
  transform: translateY(-1px);
}

.voice-control-btn:nth-child(3) {
  grid-column: span 2;
}

.voice-commands {
  padding: 16px;
  background: var(--cream);
  border-top: 1px solid rgba(46, 125, 79, 0.1);
}

.commands-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 8px;
}

.voice-commands ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.voice-commands li {
  font-size: 0.8rem;
  color: var(--text-mid);
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}

.voice-commands li::before {
  content: '🎤';
  position: absolute;
  left: 0;
  font-size: 0.7rem;
  opacity: 0.6;
}

/* Translation transition */
[data-i18n] {
  transition: opacity 0.2s ease;
}

[data-i18n].translating {
  opacity: 0.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .language-switcher {
    top: 70px;
    right: 10px;
  }
  
  .voice-panel {
    width: 280px;
    right: 0;
    bottom: 70px;
  }
  
  .voice-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
}

@media (max-width: 600px) {
  .language-switcher {
    position: static;
    margin: 10px;
  }
  
  .lang-toggle {
    width: 100%;
    justify-content: center;
  }
  
  .lang-dropdown {
    width: 100%;
    position: static;
    margin-top: 5px;
  }
}
/* Language Dropdown */
.lang-select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 0.85rem;
  background: white;
  cursor: pointer;
}

/* Voice Button */
.voice-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #1e6b45, #3d9b6e);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: all .3s ease;
  z-index: 1000;
}

.voice-btn.listening {
  animation: pulseMic 1.2s infinite;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
}

@keyframes pulseMic {
  0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.6); }
  70% { box-shadow: 0 0 0 20px rgba(220,38,38,0); }
  100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

/* RH Voice Assistant */

.rh-mic{
  position:fixed;
  bottom:30px;
  right:30px;
  width:70px;
  height:70px;
  background:linear-gradient(135deg,#1e6b45,#3d9b6e);
  color:white;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:28px;
  cursor:pointer;
  box-shadow:0 10px 30px rgba(0,0,0,.3);
  transition:.3s;
  z-index:9999;
}

.rh-mic.listening{
  animation:rhPulse 1.2s infinite;
  background:#dc2626;
}

@keyframes rhPulse{
  0%{box-shadow:0 0 0 0 rgba(220,38,38,.7);}
  70%{box-shadow:0 0 0 25px rgba(220,38,38,0);}
  100%{box-shadow:0 0 0 0 rgba(220,38,38,0);}
}
/* symptoms */
