/**
 * AFGCoin Chatbot Widget Styles
 * Luxury Black & Gold Theme
 */

/* 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: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;
  height: 600px;
  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);
}

.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: 16px;
  margin-bottom: auto;
}

.afgcoin-chatbot-message {
  display: flex;
  max-width: 80%;
  animation: fadeIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@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: 12px 16px;
  border-radius: 16px;
  line-height: 1.6;
  word-wrap: break-word;
  font-size: 14px;
}

.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);
}

.afgcoin-chatbot-message-assistant .afgcoin-chatbot-message-content,
.afgcoin-chatbot-message-system .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);
}

/* 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;
}

.afgcoin-chatbot-form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.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 {
  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.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;
}

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

/* 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.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;
}

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

.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;
  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;
  color: #D4AF37;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

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

/* RTL Support */
[dir="rtl"] .afgcoin-chatbot-message-user {
  align-self: flex-start;
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .afgcoin-chatbot-message-assistant {
  align-self: flex-end;
}

[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;
  }
}

