/* Talk with Us Chatbot - dedicated styles */

.chatbot-widget .hidden,
.chatbot-widget .chatbot-form-wrap.hidden {
  display: none !important;
}

.chatbot-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.chatbot-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}
.chatbot-fab svg,
.chatbot-fab img.chatbot-headset-icon,
.chatbot-fab .chatbot-headset-icon-inline {
  width: 28px;
  height: 28px;
  display: block;
}
.chatbot-fab img.chatbot-headset-icon {
  filter: brightness(0) invert(1);
}
.chatbot-fab .chatbot-headset-icon-inline svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: brightness(0) invert(1);
}

.chatbot-widget {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: inherit;
}
.chatbot-widget.hidden {
  display: none;
}

.chatbot-header {
  background: #fff;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}
.chatbot-header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.chatbot-header-icon {
  width: 40px;
  height: 40px;
  color: #2563eb;
  flex-shrink: 0;
}
.chatbot-header-icon svg,
.chatbot-header-icon img.chatbot-headset-icon,
.chatbot-header-icon .chatbot-headset-icon-inline {
  width: 100%;
  height: 100%;
  display: block;
}
.chatbot-header-icon .chatbot-headset-icon-inline svg {
  width: 100%;
  height: 100%;
}
.chatbot-header-text h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}
.chatbot-header-text p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #6b7280;
}
.chatbot-header-actions {
  display: flex;
  gap: 8px;
}
.chatbot-header-actions button {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-header-actions button:hover {
  background: #f3f4f6;
  color: #374151;
}
.chatbot-header-actions button svg {
  width: 18px;
  height: 18px;
}

.chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
}
.chatbot-body.chatbot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}
.chatbot-empty-icon {
  width: 80px;
  height: 80px;
  color: #d1d5db;
  margin-bottom: 16px;
}
.chatbot-empty-icon svg {
  width: 100%;
  height: 100%;
}
.chatbot-empty-text {
  font-size: 0.875rem;
  color: #9ca3af;
}

.chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chatbot-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
}
.chatbot-msg.user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chatbot-msg.assistant {
  align-self: flex-start;
  background: #f3f4f6;
  color: #374151;
  border-bottom-left-radius: 4px;
}
.chatbot-msg.system {
  align-self: center;
  background: #eff6ff;
  color: #1e40af;
  font-size: 0.8125rem;
}

.chatbot-msg-loading.chatbot-msg {
  padding: 12px 16px;
}
.chatbot-loading-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}
.chatbot-loading-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6b7280;
  animation: chatbot-loading-dot 1.4s ease-in-out infinite both;
}
.chatbot-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.chatbot-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.chatbot-loading-dots span:nth-child(3) { animation-delay: 0s; }
@keyframes chatbot-loading-dot {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1.2); opacity: 1; }
}

.chatbot-form-wrap {
  padding: 16px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  flex-shrink: 0;
}
.chatbot-pre-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chatbot-pre-form label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}
.chatbot-pre-form input[type="text"],
.chatbot-pre-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  box-sizing: border-box;
}
.chatbot-pre-form input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.chatbot-pre-form .chatbot-submit-btn {
  padding: 10px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}
.chatbot-pre-form .chatbot-submit-btn:hover {
  background: #1d4ed8;
}
.chatbot-pre-form .chatbot-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chatbot-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.chatbot-input-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.875rem;
  min-width: 0;
}
.chatbot-input-bar input:focus {
  outline: none;
  border-color: #2563eb;
}
.chatbot-input-bar input::placeholder {
  color: #9ca3af;
}
.chatbot-input-bar .chatbot-send-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, opacity 0.2s;
}
.chatbot-input-bar .chatbot-send-btn svg {
  fill: #fff;
}
.chatbot-input-bar .chatbot-send-btn:hover:not(:disabled) {
  background: #1d4ed8;
}
.chatbot-input-bar .chatbot-send-btn:disabled {
  background: #d1d5db;
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}
.chatbot-input-bar .chatbot-send-btn:disabled svg {
  fill: #9ca3af;
}
.chatbot-input-bar .chatbot-voice-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chatbot-input-bar .chatbot-voice-btn svg {
  fill: #fff;
}
.chatbot-input-bar .chatbot-voice-btn:hover {
  background: #1d4ed8;
}
.chatbot-input-bar .chatbot-voice-btn.recording {
  background: #dc2626;
  animation: chatbot-pulse 1s ease-in-out infinite;
}
.chatbot-input-bar .chatbot-voice-btn.recording svg {
  fill: #fff;
}
@keyframes chatbot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}
.chatbot-input-bar button svg {
  width: 20px;
  height: 20px;
}

.chatbot-limit-msg {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 6px;
}
.chatbot-limit-msg.at-limit {
  color: #dc2626;
}
.chatbot-disabled-overlay {
  font-size: 0.8125rem;
  color: #6b7280;
  padding: 8px 0;
}
