/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  @keyframes typing {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
  }
  
  /* Chat window styles */
  .universal-chatbot-window {
    min-width: 300px;
    min-height: 400px;
    position: fixed;
    z-index: 1001;
    display: flex;
    transition: opacity 0.5s ease, width 0.3s ease, height 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 10px;
    flex-direction: column;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    .universal-chatbot-window {
      width: 95vw !important;
      height: 70vh !important;
      max-width: none !important;
      bottom: 0 !important;
      right: 0 !important;
      left: 0 !important;
      margin: 0 auto !important;
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
    }
  }
  
  @media (max-height: 600px) {
    .universal-chatbot-window {
      height: 85vh !important;
      min-height: 300px !important;
    }
  }
  
  @media (max-width: 480px) {
    .universal-chatbot-window {
      width: 100vw !important;
      height: 80vh !important;
    }
  }
  
  /* Chat button */
  .universal-chatbot-button {
    position: fixed;
    width: 110px;
    height: 100px;
    z-index: 1000;
    padding: 0;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
  
  .universal-chatbot-button-inner {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .universal-chatbot-button-img {
    width: 70px;
    height: 70px;
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }
  
  /* Chat header */
  .universal-chatbot-header {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }
  
  .universal-chatbot-title {
    font-size: 16px;
    font-weight: bold;
  }
  
  .universal-chatbot-header-buttons {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced gap between buttons */
  }
  
  .universal-chatbot-header-button {
    width: 30px;
    height: 30px;
    cursor: pointer;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center; /* Center the content horizontally */
    padding: 0; /* Remove padding */
  }
  
  .universal-chatbot-header-button img {
    max-width: 20px; /* Control image size */
    max-height: 20px;
  }
  
  .universal-chatbot-header-button svg {
    width: 20px; /* Control SVG size */
    height: 20px;
    stroke: currentColor; /* Use the current text color for SVG stroke */
  }
  
  /* Chat content */
  .universal-chatbot-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }
  
  .universal-chatbot-content::-webkit-scrollbar {
    display: none;
  }
  
  /* User message */
  .universal-chatbot-user-message {
    margin-bottom: 10px;
    background-color: #f3f4f6;
    padding: 10px;
    border-radius: 12px;
    margin-left: auto;
    word-break: break-word;
    border: 1px solid #e5e7eb;
    display: block;
  }
  
  .universal-chatbot-user-message-short {
    width: fit-content;
  }
  
  .universal-chatbot-user-message-long {
    max-width: 80%;
  }
  
  /* Bot message container */
  .universal-chatbot-bot-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 0;
  }
  
  .universal-chatbot-bot-avatar {
    width: 30px;
    height: 35px;
    min-width: 30px;
    margin-top: 8px;
    margin-left: -5px;
  }
  
  /* Bot message */
  .universal-chatbot-bot-message {
    background-color: rgba(197, 220, 250, 0.3);
    padding: 5px;
    border-radius: 12px;
    width: 85%;
    word-break: break-word;
    border: 1px solid #dbeafe;
  }
  
  /* Loading animation */
  .universal-chatbot-loading svg {
    width: 40px;
    height: 40px;
  }
  
  /* Link preview */
  .universal-chatbot-link-preview {
    margin-bottom: 10px;
    background-color: #f9fafb;
    padding: 16px;
    border-radius: 8px;
    max-width: 77%;
    margin-right: auto;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
  }
  
  .universal-chatbot-link-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
  }
  
  .universal-chatbot-link-title {
    font-weight: bold;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 4px;
  }
  
  .universal-chatbot-link-description {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 4px;
  }
  
  .universal-chatbot-link-url {
    color: #2563eb;
    text-decoration: none;
    font-size: 12px;
    margin-top: 6px;
  }
  
  /* Chat footer */
  .universal-chatbot-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
  
  .universal-chatbot-input {
    flex: 1;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    outline: none;
    font-size: 14px;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  
  .universal-chatbot-send-button {
    border: none;
    padding: 4px 13px;
    border-radius: 18px;
    margin-left: 10px;
    cursor: pointer;
  }
  
  .universal-chatbot-send-icon {
    width: 28px;
    height: 25px;
    margin-right: 2px;
  }
  
  /* Invite message */
  .universal-chatbot-invite {
    position: fixed;
    z-index: 999;
    background-color: transparent;
    padding: 16px;
    animation: fadeIn 0.5s ease-out;
  }
  
  .universal-chatbot-invite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 16px;
    gap: 12px;
    border: 1px solid black;
  }
  
  .universal-chatbot-invite-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
  }
  
  .universal-chatbot-invite-close {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    color: #6b7280;
    line-height: 1;
  }
  
  .universal-chatbot-invite-options {
    display: flex;
    gap: 12px;
  }
  
  .universal-chatbot-invite-option {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #fff5f0;
    border: 1px solid black;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    text-align: left;
  }
  
  .universal-chatbot-invite-option-icon {
    margin-right: 8px;
  }
  
  /* Typing animation */
  .typing-dot {
    animation: typing 1.5s infinite;
    opacity: 0.3;
  }
  
  .typing-dot:nth-child(1) {
    animation-delay: 0s;
  }
  
  .typing-dot:nth-child(2) {
    animation-delay: 0.5s;
  }
  
  .typing-dot:nth-child(3) {
    animation-delay: 1s;
  }