/* ==========================================================================
   VSDHS Organic - Voice Typing & Speech-to-Text Component Styles
   Supports Voice Input for Contact Form Fields (Name, Phone, Email, Message)
   ========================================================================== */

/* Language Selection Bar */
.v-voice-lang-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
}

.v-voice-lang-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 6px;
}

.v-voice-lang-options {
  display: flex;
  align-items: center;
  gap: 6px;
}

.v-lang-chip {
  background: #ffffff;
  border: 1.5px solid #d1fae5;
  color: #065f46;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.v-lang-chip:hover {
  background: #d1fae5;
  border-color: #10b981;
  transform: translateY(-1px);
}

.v-lang-chip.active {
  background: #10b981;
  border-color: #059669;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

/* Field Header with Label and Mic Button */
.calc-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: nowrap;
  gap: 8px;
}

.calc-field-header .calc-field-label {
  margin-bottom: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-dark, #0f172a);
}

/* Container for inputs with mic inside at the end (Right Side) */
.v-input-with-mic {
  position: relative;
  display: block;
  width: 100%;
}

.v-input-with-mic .calc-input {
  width: 100%;
  padding-right: 48px !important;
}

.v-input-with-mic .v-field-mic-btn {
  position: absolute;
  right: 8px;
  top: 0;
  bottom: 0;
  margin-top: auto;
  margin-bottom: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: #f0fdf4;
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: #047857;
  padding: 0;
  border-radius: 50%;
  font-size: 0.96rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.12);
  user-select: none;
  outline: none;
  z-index: 3;
  transform-origin: center center;
}

.v-input-with-mic .v-field-mic-btn:hover {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(16, 185, 129, 0.3);
}

/* Multi-line textarea mic placed at top-right */
.v-input-with-mic.v-textarea-with-mic .v-field-mic-btn {
  top: 10px;
  bottom: auto;
  margin-top: 0;
  margin-bottom: 0;
  transform: none;
}

.v-input-with-mic.v-textarea-with-mic .v-field-mic-btn:hover {
  transform: scale(1.08);
}

.v-field-mic-btn i {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.v-field-mic-btn:hover i {
  transform: scale(1.1);
}

/* Active / Listening State */
.v-field-mic-btn.listening {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: vMicPulse 1.25s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.v-field-mic-btn.listening i {
  color: #ef4444;
  animation: vIconBlink 0.8s infinite alternate;
}

@keyframes vMicPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    transform: scale(1);
  }
}

@keyframes vIconBlink {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.3; transform: scale(1.25); }
}

/* Focused / Active Input Highlight while Listening */
.calc-input.v-speech-active {
  border-color: #10b981 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25) !important;
  transition: all 0.25s ease;
}

/* Live Voice Status Indicator Toast */
.v-voice-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 30px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 99999;
  font-size: 0.88rem;
  max-width: 90vw;
  transform: translateY(120px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.v-voice-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.v-voice-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  flex-shrink: 0;
  animation: vIconBlink 0.8s infinite alternate;
}

.v-voice-toast-content {
  flex: 1;
  line-height: 1.3;
}

.v-voice-toast-title {
  font-weight: 700;
  color: #6ee7b7;
  font-size: 0.8rem;
  display: block;
}

.v-voice-toast-text {
  color: #f1f5f9;
  font-size: 0.88rem;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.v-voice-toast-stop-btn {
  background: #334155;
  border: none;
  color: #f87171;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.v-voice-toast-stop-btn:hover {
  background: #ef4444;
  color: #fff;
}

@media (max-width: 576px) {
  .v-field-mic-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.9rem;
    right: 8px;
    top: 0;
    bottom: 0;
    margin-top: auto;
    margin-bottom: auto;
  }
  .v-input-with-mic.v-textarea-with-mic .v-field-mic-btn {
    top: 10px;
    bottom: auto;
    margin-top: 0;
    margin-bottom: 0;
  }
  .v-input-with-mic .calc-input {
    padding-right: 44px !important;
  }
  .v-voice-lang-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .v-voice-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: calc(100vw - 32px);
    justify-content: space-between;
  }
  .v-voice-toast-text {
    max-width: 170px;
  }
}

/* ==========================================================================
   Contact Form Action Buttons (Submit Inquiry & WhatsApp Chat)
   ========================================================================== */
.v-contact-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: wrap;
  margin-top: 25px;
  width: 100%;
}

.v-contact-actions .v-contact-submit-btn,
.v-contact-actions .v-contact-wa-btn {
  flex: 1 1 200px;
  min-width: 170px;
  min-height: 52px;
  padding: 13px 22px !important;
  border-radius: 14px !important;
  font-size: 0.96rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none !important;
  box-sizing: border-box;
  white-space: nowrap;
  letter-spacing: 0.2px;
  font-family: inherit;
}

.v-contact-actions .v-contact-submit-btn {
  background: linear-gradient(135deg, #07150e 0%, #0d422a 100%);
  color: #ffffff !important;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(7, 21, 14, 0.22);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.v-contact-actions .v-contact-submit-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.38);
}

.v-contact-actions .v-contact-submit-btn:active {
  transform: scale(0.98);
}

.v-contact-actions .v-contact-wa-btn {
  background: #25D366 !important;
  color: #ffffff !important;
  border: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.v-contact-actions .v-contact-wa-btn:hover {
  background: #1eb855 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.42);
  color: #ffffff !important;
}

.v-contact-actions .v-contact-wa-btn:active {
  transform: scale(0.98);
}

.v-contact-actions i {
  font-size: 1.1rem;
}

/* On mobile / small container width, stack gracefully */
@media (max-width: 520px) {
  .v-contact-actions {
    flex-direction: column;
    gap: 10px;
  }
  .v-contact-actions .v-contact-submit-btn,
  .v-contact-actions .v-contact-wa-btn {
    width: 100%;
    flex: 1 1 100%;
    min-width: 100%;
  }
}

