/* FreedomHub Voice Widget Styles */

#fh-voice-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  font-family: 'League Spartan', 'Segoe UI', Arial, sans-serif;
}

/* Floating Action Button */
.fh-vw-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #b89b5e;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(184, 155, 94, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.fh-vw-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(184, 155, 94, 0.5);
}

/* Chat Panel */
.fh-vw-panel {
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  flex-direction: column;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(184, 155, 94, 0.2);
}

/* Header */
.fh-vw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0a0a0a;
  border-bottom: 2px solid #b89b5e;
}

.fh-vw-title {
  font-size: 15px;
  font-weight: 600;
  color: #b89b5e;
  letter-spacing: 0.3px;
}

.fh-vw-close {
  background: none;
  border: none;
  color: #999;
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.fh-vw-close:hover {
  color: #fff;
}

/* Messages Area */
.fh-vw-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fh-vw-msg p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
}

.fh-vw-bot p {
  background: #f8f4f0;
  color: #333;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.fh-vw-user {
  display: flex;
  justify-content: flex-end;
}

.fh-vw-user p {
  background: #b89b5e;
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.fh-vw-typing p {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 18px;
}

.fh-vw-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b89b5e;
  animation: fh-vw-bounce 1.2s infinite;
}

.fh-vw-dot:nth-child(2) { animation-delay: 0.2s; }
.fh-vw-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes fh-vw-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Input Bar */
.fh-vw-input-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: #0a0a0a;
  border-top: 1px solid #333;
}

.fh-vw-input {
  flex: 1;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
  color: #f0f0f0;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.fh-vw-input:focus {
  border-color: #b89b5e;
}

.fh-vw-input::placeholder {
  color: #777;
}

.fh-vw-mic,
.fh-vw-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}

.fh-vw-mic {
  background: #333;
  color: #ccc;
}

.fh-vw-mic:hover {
  background: #444;
  color: #fff;
}

.fh-vw-mic.fh-vw-recording {
  background: #c0392b;
  color: #fff;
  animation: fh-vw-pulse 1s infinite;
}

@keyframes fh-vw-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.fh-vw-send {
  background: #b89b5e;
  color: #fff;
}

.fh-vw-send:hover {
  background: #a08845;
}

.fh-vw-send:active,
.fh-vw-mic:active {
  transform: scale(0.95);
}

/* Scrollbar */
.fh-vw-messages::-webkit-scrollbar {
  width: 4px;
}

.fh-vw-messages::-webkit-scrollbar-track {
  background: transparent;
}

.fh-vw-messages::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 2px;
}

/* Mobile */
@media (max-width: 480px) {
  .fh-vw-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 80px);
    max-height: calc(100vh - 80px);
    border-radius: 12px;
    position: fixed;
    bottom: 8px;
    right: 8px;
  }

  #fh-voice-widget {
    bottom: 16px;
    right: 16px;
  }

  .fh-vw-fab {
    width: 48px;
    height: 48px;
  }
}
