/* W3AI Professional Chatbot Styles - Complete Version */
:root {
  --w3ai-primary: #0066FF;
  --w3ai-primary-dark: #0052CC;
  --w3ai-primary-light: #E6F0FF;
  --w3ai-secondary: #7C3AED;
  --w3ai-success: #10B981;
  --w3ai-text: #1F2937;
  --w3ai-text-light: #6B7280;
  --w3ai-border: #E5E7EB;
  --w3ai-bg: #FFFFFF;
  --w3ai-bg-alt: #F9FAFB;
  --w3ai-shadow: rgba(0, 0, 0, 0.1);
  --w3ai-shadow-lg: rgba(0, 0, 0, 0.15);
}

/* Floating Chat Icon */
.w3ai-chat-icon {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--w3ai-primary) 0%, var(--w3ai-secondary) 100%);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--w3ai-shadow-lg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2147483647 !important;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

.w3ai-chat-icon:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 12px 32px var(--w3ai-shadow-lg);
}

.w3ai-chat-icon svg {
  width: 28px;
  height: 28px;
  color: white;
  transition: all 0.3s ease;
}

.w3ai-chat-icon .icon-close {
  display: none;
}

.w3ai-chat-icon.active .icon-message {
  display: none;
}

.w3ai-chat-icon.active .icon-close {
  display: block;
}

.w3ai-chat-icon .notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  border: 3px solid white;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Chat Container */
.w3ai-chat-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 450px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 140px);
  background: var(--w3ai-bg);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483646 !important;
  animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--w3ai-border);
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.w3ai-chat-container.active {
  display: flex;
}

/* Chat Header */
.w3ai-chat-header {
  background: linear-gradient(135deg, var(--w3ai-primary) 0%, var(--w3ai-secondary) 100%);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-agent-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header-title {
  font-family: 'Poppins', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 0;
  line-height: 1.2;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--w3ai-success);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-minimize {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.header-minimize:hover {
  background: rgba(255, 255, 255, 0.25);
}

.header-minimize svg {
  width: 20px;
  height: 20px;
  color: white;
}

/* Clear Chat Button */
.clear-chat-btn {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
}

.clear-chat-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fff;
  transform: scale(1.05);
}

.clear-chat-btn:active {
  transform: scale(0.95);
}

.clear-chat-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.clear-chat-btn:hover svg {
  transform: translateY(-1px);
}

/* Chat Messages Area */
.w3ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--w3ai-bg-alt);
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.w3ai-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.w3ai-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.w3ai-chat-messages::-webkit-scrollbar-thumb {
  background: var(--w3ai-border);
  border-radius: 10px;
}

.w3ai-chat-messages::-webkit-scrollbar-thumb:hover {
  background: var(--w3ai-text-light);
}

/* Message Wrapper */
.message-wrapper {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: messageSlideIn 0.3s ease;
  margin-bottom: 4px;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-wrapper {
  flex-direction: row-reverse;
  margin-left: auto;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--w3ai-border);
}

/* Message Styles - Improved Readability */
.message {
  max-width: 75%;
  min-width: 100px;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  word-break: normal;
  overflow-wrap: normal;
  white-space: pre-wrap;
  letter-spacing: 0.01em;
}

.bot-message {
  background: #F9FAFB;
  color: #1F2937;
  border: 1px solid #E5E7EB !important;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.user-message {
  background: linear-gradient(135deg, var(--w3ai-primary) 0%, var(--w3ai-secondary) 100%);
  color: white;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.message p {
  margin: 0;
  line-height: 1.6;
}

.message p + p {
  margin-top: 12px;
}

/* Links - Green with underline */
.message a {
  color: #60aaff;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.message a:hover {
  opacity: 0.8;
}

.user-message a {
  color: #60aaff;
  text-decoration: underline;
}

.user-message a:hover {
  opacity: 0.9;
}

/* Bold text - More visible with darker color */
.message strong {
  font-weight: 700;
  color: #FFF;
}

.bot-message strong {
  font-weight: 700;
  color: #FFF;
}

.user-message strong {
  font-weight: 700 !important;
  color: white !important;
}

/* Lists */
.message ul,
.message ol {
  margin: 8px 0 12px 0;
  padding-left: 24px;
}

.message li {
  margin: 6px 0;
  line-height: 1.6;
}

/* Code blocks */
.message code {
  background: #f6f8fa;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: #24292f;
}

.user-message code {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Text selection */
.message::selection {
  background: rgba(0, 121, 211, 0.2);
}

.user-message::selection {
  background: rgba(255, 255, 255, 0.3);
}

/* Seen Indicator */
.seen-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  animation: seenSlideIn 0.3s ease-out;
}

.checkmark-icon {
  width: 18px;
  height: 18px;
  color: #3b82f6;
}

.checkmark-path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: checkmarkDraw 0.4s ease-out 0.1s forwards;
}

.seen-text {
  font-size: 13px;
  color: #3b82f6;
  font-weight: 500;
  animation: fadeIn 0.3s ease-out 0.3s both;
}

@keyframes seenSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes checkmarkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 12px;
  min-width: 80px;
}

.typing-status {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  font-style: italic;
  animation: fadeIn 0.3s ease-out;
}

.typing-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 20px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0s;
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.typing-wrapper .typing-indicator {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  }
}

.seen-wrapper,
.typing-wrapper {
  transition: all 0.3s ease;
}

/* Consultation Form */
.consultation-form {
  background: white;
  border: 2px solid var(--w3ai-primary-light);
  border-radius: 12px;
  padding: 20px;
  margin-top: 12px;
  animation: formSlideIn 0.4s ease;
}

@keyframes formSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.consultation-form h4 {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--w3ai-text);
  margin: 0 0 16px 0;
}

.form-group {
  margin-bottom: 14px;
}

.form-group:last-of-type {
  margin-bottom: 16px;
}

.consultation-form label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--w3ai-text);
  margin-bottom: 6px;
}

.consultation-form input,
.consultation-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--w3ai-border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--w3ai-text);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.consultation-form input:focus,
.consultation-form textarea:focus {
  outline: none;
  border-color: var(--w3ai-primary);
  box-shadow: 0 0 0 3px var(--w3ai-primary-light);
}

.consultation-form textarea {
  resize: vertical;
  min-height: 80px;
}

.consultation-form button {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--w3ai-primary) 0%, var(--w3ai-secondary) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.consultation-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.consultation-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Success Message */
.form-success {
  background: #ECFDF5;
  border: 2px solid var(--w3ai-success);
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-success svg {
  width: 24px;
  height: 24px;
  color: var(--w3ai-success);
  flex-shrink: 0;
}

.form-success p {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #065F46;
  margin: 0;
  line-height: 1.5;
}

/* Chat Input Area */
.w3ai-chat-input {
  background: white;
  border-top: 1px solid var(--w3ai-border);
  padding: 16px 20px 12px;
}

.input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

#w3aiUserInput {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--w3ai-border) !important;
  border-radius: 24px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--w3ai-text);
  transition: all 0.2s ease;
  outline: none;
}

#w3aiUserInput:hover {
  border-color: var(--w3ai-border) !important;
}

#w3aiUserInput:focus {
  outline: none;
  border-color: var(--w3ai-primary) !important;
  box-shadow: 0 0 0 3px var(--w3ai-primary-light);
}

#w3aiUserInput::placeholder {
  color: var(--w3ai-text-light);
}

.send-button {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--w3ai-primary) 0%, var(--w3ai-secondary) 100%);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  padding: 0;
}

.send-button:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.3);
}

.send-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.send-button .icon-send {
  width: 20px;
  height: 20px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.2s ease;
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.send-button.loading .icon-send {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.5);
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.send-button.loading .loading-spinner {
  opacity: 1;
  visibility: visible;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.input-footer {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--w3ai-text-light);
  text-align: center;
  margin: 8px 0 0 0;
  opacity: 0.7;
  line-height: 1.3;
}

/* Confirmation Modal */
.w3ai-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 16px;
}

.w3ai-modal-overlay.active {
  opacity: 1;
}

.w3ai-modal {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  text-align: center;
}

.w3ai-modal-overlay.active .w3ai-modal {
  transform: scale(1) translateY(0);
}

.modal-icon {
  margin: 0 auto 20px;
  width: 64px;
  height: 64px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg {
  width: 36px;
  height: 36px;
}

.w3ai-modal h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  color: #1f2937;
}

.w3ai-modal p {
  margin: 0 0 24px;
  font-size: 15px;
  color: #6b7280;
  line-height: 1.6;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.cancel-btn {
  background: #f3f4f6;
  color: #374151;
}

.cancel-btn:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.confirm-btn {
  background: #ef4444;
  color: white;
}

.confirm-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-btn:active {
  transform: translateY(0) scale(0.98);
}

/* Mobile Dark Theme */
@media (max-width: 480px) {
  :root {
    --w3ai-text: #F9FAFB;
    --w3ai-text-light: #D1D5DB;
    --w3ai-border: #343536;
    --w3ai-bg: #1F2937;
    --w3ai-bg-alt: #111827;
  }
  
  .w3ai-chat-container {
    background: var(--w3ai-bg);
  }
 
  .bot-message {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #d7dadc !important;
  }
  
  .message a {
    color: #60aaff;
  }
  
  .message code {
    background: #272729;
    color: #d7dadc;
  }
  
  .consultation-form,
  .w3ai-chat-input {
    background: #374151;
  }
  
  .consultation-form {
    border-color: rgba(0, 102, 255, 0.3);
  }
  
  .consultation-form input,
  .consultation-form textarea,
  #w3aiUserInput {
    background: #1F2937;
    border-color: #4B5563 !important;
    color: var(--w3ai-text);
  }
  
  #w3aiUserInput:focus {
    border-color: var(--w3ai-primary) !important;
  }
  
  .typing-indicator {
    background: #374151;
  }
  
  .typing-dot {
    background: #9ca3af;
  }
  
  .w3ai-modal {
    background: #1F2937;
  }
  
  .w3ai-modal h3 {
    color: #F9FAFB;
  }
  
  .w3ai-modal p {
    color: #D1D5DB;
  }
  
  .cancel-btn {
    background: #374151;
    color: #F9FAFB;
  }
  
  .cancel-btn:hover {
    background: #4B5563;
  }
  
  .w3ai-chat-icon {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
  
  .w3ai-chat-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .w3ai-chat-container {
    bottom: 84px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    height: calc(100vh - 120px);
    border-radius: 16px;
  }
  
  .w3ai-chat-header {
    padding: 16px 20px;
  }
  
  .header-agent-img {
    width: 40px;
    height: 40px;
  }
  
  .header-title {
    font-size: 16px;
  }
  
  .header-status {
    font-size: 12px;
  }
  
  .w3ai-chat-messages {
    padding: 16px;
    gap: 12px;
  }
  
  .message {
    font-size: 16px;
    line-height: 1.65;
    max-width: 90%;
    min-width: 120px;
  }
  
  .message p {
    margin: 0 0 14px 0;
  }
  
  .consultation-form {
    padding: 16px;
  }
  
  .w3ai-chat-input {
    padding: 12px 16px 10px;
  }
  
  .seen-indicator {
    padding: 6px 12px;
  }
  
  .checkmark-icon {
    width: 16px;
    height: 16px;
  }
  
  .seen-text,
  .typing-status {
    font-size: 11px;
  }
  
  .typing-dot {
    width: 6px;
    height: 6px;
  }
  
  .w3ai-modal {
    padding: 24px;
    max-width: 340px;
  }
  
  .w3ai-modal h3 {
    font-size: 20px;
  }
  
  .w3ai-modal p {
    font-size: 14px;
  }
  
  .modal-actions {
    flex-direction: column;
  }
  
  .modal-btn {
    width: 100%;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .w3ai-chat-container {
    height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
  }
}

/* Dark Mode Support for Desktop */
@media (prefers-color-scheme: dark) and (min-width: 481px) {
  :root {
    --w3ai-text: #F9FAFB;
    --w3ai-text-light: #D1D5DB;
    --w3ai-border: #343536;
    --w3ai-bg: #1F2937;
    --w3ai-bg-alt: #111827;
  }
  
  .w3ai-chat-container {
    background: var(--w3ai-bg);
  }
  
  .bot-message {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #d7dadc !important;
  }
  
  .message a {
    color: #60aaff;
  }
  
  .message code {
    background: #272729;
    color: #d7dadc;
  }
  
  .consultation-form,
  .w3ai-chat-input {
    background: #374151;
  }
  
  .consultation-form {
    border-color: rgba(0, 102, 255, 0.3);
  }
  
  .consultation-form input,
  .consultation-form textarea,
  #w3aiUserInput {
    background: #1F2937;
    border-color: #4B5563 !important;
    color: var(--w3ai-text);
  }
  
  #w3aiUserInput:focus {
    border-color: var(--w3ai-primary) !important;
  }
}

/* Notification styles */
.w3ai-notification {
  position: fixed;
  bottom: 100px;
  right: 30px;
  padding: 15px 20px;
  color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  animation: slideInUp 0.3s ease-out;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  max-width: 300px;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Contact form styles */
.w3ai-contact-form {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.w3ai-contact-form h3 {
  margin: 0 0 10px 0;
  color: #1f2937;
  font-size: 18px;
}

.w3ai-contact-form p {
  margin: 0 0 15px 0;
  color: #6b7280;
  font-size: 14px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0066ff;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.submit-btn.loading .btn-text {
  opacity: 0;
}

.submit-btn.loading .btn-loader {
  display: block;
}

.btn-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.form-footer {
  margin-top: 12px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
}

.form-footer a {
  color: #0066ff;
  text-decoration: none;
}

.form-success {
  text-align: center;
  padding: 20px;
}

.success-icon {
  width: 60px;
  height: 60px;
  background: #10b981;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 15px;
}

.form-success h3 {
  color: #1f2937;
  margin-bottom: 10px;
}

.form-success p {
  color: #6b7280;
}

/* Loading state for send button */
.send-button.loading .icon-send {
  display: none;
}

.send-button.loading .loading-spinner {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.loading-spinner {
  display: none;
}

/* Message limit warning */
.input-footer {
  transition: color 0.3s;
}









.new-message-indicator {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
  padding: 8px 12px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(158, 158, 158, 0.4);
  cursor: pointer;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
  animation: slideUp 0.3s ease;
}

.new-message-indicator:hover {
  background: linear-gradient(135deg, #757575 0%, #616161 100%);
}

.new-message-indicator .arrow-down {
  display: block;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid #ffffff;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Hide the text span entirely */
.new-message-indicator .message-count {
  display: none;
}
















.message-counter {
  font-size: 10px !important; /* Tiny */
  font-weight: 500;
  margin-left: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.05); /* Subtle bg */
  white-space: nowrap;
}

/* Ensure top-right in header-actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

#messageCounter {
  position: relative;
  top: 1px; /* Align with buttons */
}