/**
 * AFGCoin Chatbot Widget Styles
 * Luxury Black & Gold Theme
 * Injected into Shadow DOM so host/WebView CSS cannot affect the widget.
 */

/* Shadow host (the container element) */
:host {
  display: block;
  box-sizing: border-box;
}

/* ========== ISOLATION: Scoped under .afgcoin-chatbot-root (inner wrapper in shadow) ========== */
.afgcoin-chatbot-root,
.afgcoin-chatbot-root .afgcoin-chatbot-widget,
.afgcoin-chatbot-root .afgcoin-chatbot-widget * {
  box-sizing: border-box !important;
}
.afgcoin-chatbot-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #F5F5F5 !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}
.afgcoin-chatbot-root input,
.afgcoin-chatbot-root textarea,
.afgcoin-chatbot-root button,
.afgcoin-chatbot-root select {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

/* Reset native form control appearance so host/WebView cannot override our look */
.afgcoin-chatbot-root input,
.afgcoin-chatbot-root textarea {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
  color: #F5F5F5 !important;
}

/* Override browser/WebView autofill styling so it never shows a white box */
.afgcoin-chatbot-root input:-webkit-autofill,
.afgcoin-chatbot-root input:-webkit-autofill:hover,
.afgcoin-chatbot-root input:-webkit-autofill:focus,
.afgcoin-chatbot-root input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(17, 17, 17, 0.95) inset !important;
  box-shadow: 0 0 0 1000px rgba(17, 17, 17, 0.95) inset !important;
  -webkit-text-fill-color: #F5F5F5 !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* Lock identification area and error banner so host/WebView cannot paint them white */
.afgcoin-chatbot-root .afgcoin-chatbot-identification {
  background-color: transparent !important;
  color: #F5F5F5 !important;
}
.afgcoin-chatbot-root .afgcoin-chatbot-submit-error {
  background-color: rgba(30, 15, 15, 0.98) !important;
  background-image: none !important;
  color: #ff6b6b !important;
  -webkit-text-fill-color: #ff6b6b !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
}
/* Lock chat body so host cannot paint it white (e.g. on Android WebView) */
.afgcoin-chatbot-root .afgcoin-chatbot-body {
  background-color: #0B0B0B !important;
  background-image: none !important;
}

/* Widget Container */
.afgcoin-chatbot-widget {
  position: fixed;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.afgcoin-chatbot-widget.afgcoin-chatbot-bottom-right {
  bottom: 20px;
  right: 20px;
}

.afgcoin-chatbot-widget.afgcoin-chatbot-bottom-left {
  bottom: 20px;
  left: 20px;
}

.afgcoin-chatbot-widget.afgcoin-chatbot-top-right {
  top: 20px;
  right: 20px;
}

.afgcoin-chatbot-widget.afgcoin-chatbot-top-left {
  top: 20px;
  left: 20px;
}


/* Chat Button */
.afgcoin-chatbot-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  border: 2px solid rgba(212, 175, 55, 0.3);
  color: #0B0B0B;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4), 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.afgcoin-chatbot-button-draggable {
  cursor: grab;
}

.afgcoin-chatbot-button:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5), 0 4px 15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #E6C65C 0%, #D4AF37 100%);
}

.afgcoin-chatbot-button:active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3), 0 1px 5px rgba(0, 0, 0, 0.4);
}

/* Chat Window */
.afgcoin-chatbot-window {
  width: 380px !important;
  min-width: 380px;
  height: 600px !important;
  min-height: 400px;
  background: linear-gradient(135deg, #0B0B0B 0%, #111111 100%);
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(212, 175, 55, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  backdrop-filter: blur(10px);
}

/* Header */
.afgcoin-chatbot-header {
  background: linear-gradient(135deg, #0B0B0B 0%, #1a1a1a 50%, #2a2418 100%);
  color: #D4AF37;
  padding: 20px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(212, 175, 55, 0.15);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.afgcoin-chatbot-header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.afgcoin-chatbot-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: #D4AF37;
  text-shadow: 0 1px 3px rgba(212, 175, 55, 0.3);
  text-align: left;
  unicode-bidi: plaintext;
}

/* RTL Support for Header */
.afgcoin-chatbot-window[dir="rtl"] .afgcoin-chatbot-header h3 {
  text-align: right;
  unicode-bidi: plaintext;
}

.afgcoin-chatbot-window[dir="rtl"] .afgcoin-chatbot-header-content {
  flex-direction: row-reverse;
}

.afgcoin-chatbot-close {
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: #D4AF37;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  line-height: 1;
}

.afgcoin-chatbot-close:hover {
  background: rgba(212, 175, 55, 0.2);
  color: #E6C65C;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Body */
.afgcoin-chatbot-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #0B0B0B;
}

/* Messages */
.afgcoin-chatbot-messages {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Increased from 16px for better separation */
  margin-bottom: auto;
}

.afgcoin-chatbot-message {
  display: flex;
  max-width: 80%;
  animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 8px; /* Additional spacing for visual separation */
  min-height: 1px; /* Ensure each message takes up space */
}

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

.afgcoin-chatbot-message-user {
  align-self: flex-end;
  margin-left: auto;
}

.afgcoin-chatbot-message-assistant,
.afgcoin-chatbot-message-system {
  align-self: flex-start;
}

.afgcoin-chatbot-message-content {
  padding: 14px 18px; /* Increased padding for better readability */
  border-radius: 16px;
  line-height: 1.7; /* Slightly increased for better readability in RTL */
  word-wrap: break-word;
  font-size: 14px;
  /* Ensure proper text rendering for mixed content */
  unicode-bidi: plaintext;
  /* Clear visual separation */
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.afgcoin-chatbot-message-user .afgcoin-chatbot-message-content {
  background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  color: #0B0B0B;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.3);
  text-align: left;
  margin-bottom: 4px; /* Additional spacing after user messages */
}

.afgcoin-chatbot-message-assistant .afgcoin-chatbot-message-content {
  background: rgba(255, 255, 255, 0.03);
  color: #F5F5F5;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.15);
  text-align: left;
  margin-bottom: 4px; /* Additional spacing after assistant messages */
}

/* System messages - visually distinct from assistant messages */
.afgcoin-chatbot-message-system .afgcoin-chatbot-message-content {
  background: rgba(212, 175, 55, 0.08);
  color: #D4AF37;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.25);
  text-align: left;
  font-size: 13px;
  font-style: italic;
  margin-top: 12px; /* Extra spacing before system messages */
  margin-bottom: 12px; /* Extra spacing after system messages */
  padding: 10px 16px; /* Slightly different padding */
}

/* RTL Support for Message Content - Must be more specific to override above rules */
.afgcoin-chatbot-message[dir="rtl"] .afgcoin-chatbot-message-content {
  text-align: right !important;
  unicode-bidi: plaintext;
}

/* RTL: Flip border radius for user messages (tail on left) */
.afgcoin-chatbot-message[dir="rtl"].afgcoin-chatbot-message-user .afgcoin-chatbot-message-content {
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 4px;
}

/* RTL: Flip border radius for assistant/system messages (tail on right) */
.afgcoin-chatbot-message[dir="rtl"].afgcoin-chatbot-message-assistant .afgcoin-chatbot-message-content,
.afgcoin-chatbot-message[dir="rtl"].afgcoin-chatbot-message-system .afgcoin-chatbot-message-content {
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 4px;
}

/* Enhanced spacing for consecutive messages of the same role */
.afgcoin-chatbot-message-consecutive {
  margin-top: 8px; /* Extra spacing when same role messages are consecutive */
}

/* RTL: Enhanced spacing for better visual separation */
.afgcoin-chatbot-messages[dir="rtl"] .afgcoin-chatbot-message,
.afgcoin-chatbot-window[dir="rtl"] .afgcoin-chatbot-messages .afgcoin-chatbot-message {
  margin-bottom: 12px; /* Increased spacing in RTL for better readability */
}

/* RTL: Extra spacing for consecutive messages */
.afgcoin-chatbot-messages[dir="rtl"] .afgcoin-chatbot-message-consecutive,
.afgcoin-chatbot-window[dir="rtl"] .afgcoin-chatbot-messages .afgcoin-chatbot-message-consecutive {
  margin-top: 12px; /* Even more spacing for consecutive messages in RTL */
  margin-bottom: 12px;
}

/* RTL: System messages with extra visual separation */
.afgcoin-chatbot-message[dir="rtl"].afgcoin-chatbot-message-system .afgcoin-chatbot-message-content {
  margin-top: 16px; /* Extra spacing before system messages in RTL */
  margin-bottom: 16px; /* Extra spacing after system messages in RTL */
  text-align: right !important;
}

/* RTL: Assistant messages with better spacing */
.afgcoin-chatbot-message[dir="rtl"].afgcoin-chatbot-message-assistant .afgcoin-chatbot-message-content {
  margin-bottom: 6px; /* Additional spacing after assistant messages in RTL */
}

/* RTL: User messages with better spacing */
.afgcoin-chatbot-message[dir="rtl"].afgcoin-chatbot-message-user .afgcoin-chatbot-message-content {
  margin-bottom: 6px; /* Additional spacing after user messages in RTL */
}

/* Video Link */
.afgcoin-chatbot-video-link {
  margin-top: 10px;
}

.afgcoin-chatbot-video-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  color: #0B0B0B;
  text-decoration: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.afgcoin-chatbot-video-button:hover {
  background: linear-gradient(135deg, #E6C65C 0%, #D4AF37 100%);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Forms */
.afgcoin-chatbot-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  min-width: 0;
}

.afgcoin-chatbot-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.afgcoin-chatbot-form-group label {
  font-weight: 500;
  color: #D4AF37;
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.afgcoin-chatbot-form-group input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 14px 16px;
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #F5F5F5;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.afgcoin-chatbot-form-group input:focus {
  outline: none;
  border-color: #D4AF37;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.afgcoin-chatbot-form-group input.afgcoin-chatbot-input-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.afgcoin-chatbot-form-group input::placeholder {
  color: #B5B5B5;
}

.afgcoin-chatbot-error-message {
  color: #ff6b6b;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}

/* In-widget submit error (replaces native alert so no white system dialog) */
.afgcoin-chatbot-submit-error {
  padding: 12px 16px;
  margin-bottom: 16px;
  background: rgba(30, 15, 15, 0.98);
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 12px;
  color: #ff6b6b;
  -webkit-text-fill-color: #ff6b6b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* Buttons */
.afgcoin-chatbot-button-primary {
  padding: 14px 24px;
  background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  color: #0B0B0B;
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.01em;
}

.afgcoin-chatbot-button-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #E6C65C 0%, #D4AF37 100%);
}

.afgcoin-chatbot-button-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.afgcoin-chatbot-button-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Language Selector */
.afgcoin-chatbot-language-selector {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.afgcoin-chatbot-prompt {
  font-weight: 500;
  color: #D4AF37;
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.afgcoin-chatbot-language-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afgcoin-chatbot-language-button {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.afgcoin-chatbot-language-button:hover:not(:disabled) {
  border-color: #D4AF37;
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.afgcoin-chatbot-language-button.afgcoin-chatbot-language-button-active {
  border-color: #D4AF37;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.afgcoin-chatbot-language-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.afgcoin-chatbot-language-native {
  font-size: 16px;
  font-weight: 600;
  color: #F5F5F5;
  letter-spacing: 0.01em;
}

.afgcoin-chatbot-language-name {
  font-size: 13px;
  color: #B5B5B5;
  font-weight: 400;
}

/* FAQ View */
.afgcoin-chatbot-faq-view {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.afgcoin-chatbot-faq-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.afgcoin-chatbot-faq-button {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 14px;
  color: #F5F5F5;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.afgcoin-chatbot-faq-button:hover:not(:disabled) {
  border-color: #D4AF37;
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
  color: #D4AF37;
}

.afgcoin-chatbot-faq-button:active:not(:disabled) {
  transform: translateX(1px);
}

.afgcoin-chatbot-faq-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* AI Input */
.afgcoin-chatbot-ai-input {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(17, 17, 17, 0.8);
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
  padding-bottom: 24px;
  backdrop-filter: blur(10px);
}

.afgcoin-chatbot-message-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.afgcoin-chatbot-message-input {
  flex: 1;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 14px 16px;
  border: 1.5px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #F5F5F5;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  resize: none;
  min-height: 48px;
  line-height: 1.5;
}

.afgcoin-chatbot-message-input:focus {
  outline: none;
  border-color: #D4AF37;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15), 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.afgcoin-chatbot-message-input::placeholder {
  color: #B5B5B5;
}

.afgcoin-chatbot-send-button {
  padding: 14px 20px;
  background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  color: #0B0B0B;
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 0.01em;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.afgcoin-chatbot-send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #E6C65C 0%, #D4AF37 100%);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.afgcoin-chatbot-send-button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.afgcoin-chatbot-send-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.afgcoin-chatbot-human-button {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  color: #D4AF37;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  letter-spacing: 0.01em;
}

.afgcoin-chatbot-human-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
  color: #0B0B0B;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  border-color: #D4AF37;
}

.afgcoin-chatbot-human-button:active:not(:disabled) {
  transform: translateY(0);
}

.afgcoin-chatbot-human-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Human Waiting */
.afgcoin-chatbot-human-waiting {
  padding: 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.afgcoin-chatbot-human-waiting p {
  margin: 0 0 16px 0;
  color: #D4AF37;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

.afgcoin-chatbot-human-waiting-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}

.afgcoin-chatbot-human-waiting-actions .afgcoin-chatbot-button-primary {
  min-width: 200px;
  max-width: 100%;
  padding: 14px 24px;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  min-height: 48px;
}

/* Loading States */
.afgcoin-chatbot-faq-loading {
  text-align: center;
  padding: 24px;
  color: #B5B5B5;
  font-size: 14px;
}

/* RTL Support - For language selector and FAQ buttons (when entire UI is RTL) */
[dir="rtl"] .afgcoin-chatbot-language-button,
[dir="rtl"] .afgcoin-chatbot-faq-button {
  text-align: right;
}

/* Responsive */
@media (max-width: 480px) {
  .afgcoin-chatbot-window {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
  
  .afgcoin-chatbot-widget.bottom-right,
  .afgcoin-chatbot-widget.bottom-left {
    bottom: 0;
    right: 0;
    left: 0;
  }
}

