/* ============================================
   Integrative Resets -- Voice Chat Overlay
   Full-screen overlay for AI voice assistant
   ============================================ */

.ir-voice-overlay {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background: rgba(29, 64, 38, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  overflow-y: auto;
}

.ir-voice-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ir-voice-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.ir-voice-close:hover { color: #fff; }

.ir-voice-content {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ir-voice-title {
  font-family: 'Philosopher', serif;
  font-size: 1.8rem;
  color: #fff;
  text-align: center;
  margin-bottom: 0.3rem;
}

.ir-voice-subtitle {
  font-family: 'Lato', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-main);
  margin-bottom: 3rem;
}

.ir-voice-status {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin-bottom: 1.5rem;
  transition: color 0.3s;
  min-height: 1.2em;
}

.ir-voice-status.active { color: var(--color-main); }

.ir-voice-mic-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.ir-voice-mic-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(92, 146, 105, 0.25);
  background: rgba(92, 146, 105, 0.05);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  position: relative;
  z-index: 2;
}

.ir-voice-mic-btn:hover {
  border-color: var(--color-main);
  background: rgba(92, 146, 105, 0.1);
}

.ir-voice-mic-btn svg {
  width: 32px;
  height: 32px;
  fill: rgba(255, 255, 255, 0.45);
  transition: fill 0.3s;
}

.ir-voice-mic-btn:hover svg { fill: var(--color-main); }

.ir-voice-mic-btn.recording {
  border-color: var(--color-main);
  background: rgba(92, 146, 105, 0.15);
}

.ir-voice-mic-btn.recording svg { fill: var(--color-main); }

.ir-voice-mic-btn.speaking {
  border-color: #7bb88a;
  background: rgba(92, 146, 105, 0.08);
  animation: ir-glow 2s ease-in-out infinite;
}

.ir-voice-mic-btn.speaking svg { fill: #7bb88a; }
.ir-voice-mic-btn:disabled { opacity: 0.25; cursor: not-allowed; }

.ir-voice-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 96px;
  height: 96px;
  margin-top: -48px;
  margin-left: -48px;
  border-radius: 50%;
  border: 1px solid rgba(92, 146, 105, 0.25);
  pointer-events: none;
  opacity: 0;
}

.ir-voice-mic-wrap.recording .ir-voice-ring {
  animation: ir-ring-expand 2.4s ease-out infinite;
}

.ir-voice-ring:nth-child(2) { animation-delay: 0s; }
.ir-voice-ring:nth-child(3) { animation-delay: 0.8s; }
.ir-voice-ring:nth-child(4) { animation-delay: 1.6s; }

@keyframes ir-ring-expand {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes ir-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(92, 146, 105, 0.08); }
  50% { box-shadow: 0 0 45px rgba(92, 146, 105, 0.25); }
}

.ir-voice-response {
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
  text-align: center;
  max-width: 520px;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
}

@media (max-width: 768px) {
  .ir-voice-title { font-size: 1.4rem; }
  .ir-voice-overlay { padding: 2rem; }
  .ir-voice-mic-wrap { width: 160px; height: 160px; }
  .ir-voice-mic-btn { width: 80px; height: 80px; }
  .ir-voice-mic-btn svg { width: 28px; height: 28px; }
  .ir-voice-ring { width: 80px; height: 80px; margin-top: -40px; margin-left: -40px; }
}
