.chatbot-container { position: fixed; bottom: 10px; right: 70px; z-index: 9999999; }

#chatbot-toggler {
    border: none;
    height: 50px;
    width: 50px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0156fc;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
  }
  
  body.show-chatbot #chatbot-toggler {
    transform: rotate(90deg);
  }
  
  #chatbot-toggler span {
    color: #fff;
    position: absolute;
  }
  
  #chatbot-toggler span:last-child,
  body.show-chatbot #chatbot-toggler span:first-child {
    opacity: 0;
  }
  
  body.show-chatbot #chatbot-toggler span:last-child {
    opacity: 1;
  }
  
  .chatbot-popup {
    position: fixed;
    right: 35px;
    height: 520px;
    bottom: 70px;
    width: 420px;
    overflow: hidden;
    background: #ffffff;
    border-radius: 27px;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.2);
    transform-origin: bottom right;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1),
      0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
  }
  
  body.show-chatbot .chatbot-popup {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
  }
  
  .chat-header {
    display: flex;
    align-items: center;
    padding: 15px 22px;
    background: #0156fc;
    justify-content: space-between;
    background-image: url('https://mytelfon.com/wp-content/uploads/2025/04/Chatbot-BG.png');
  }
  
  .chat-header .header-info {
    display: flex;
    gap: 10px;
    align-items: center;
  }
  
  .header-info .chatbot-logo {
    width: 50px;
    height: 50px;
    fill: #0156fc;
    flex-shrink: 0;
    border-radius: 50%;
  }
  
  .header-info .logo-text {
    color: #fff;
    font-weight: 600;
    font-size: 1.31rem;
    letter-spacing: 0.02rem;
    margin: 0;
    margin-bottom: -8px;
  }
  
  .header-info .logo-description{
  color: #ffffff;
  font-size: 14px;
  margin: 0;
}
  
  .chat-header #close-chatbot {
    border: none;
    color: #fff;
    height: 40px;
    width: 40px;
    font-size: 1.9rem;
    margin-right: -10px;
    padding-top: 2px;
    cursor: pointer;
    border-radius: 50%;
    background: none;
    transition: 0.2s ease;
    padding: 0;
  }
  
  .chat-header #close-chatbot:hover {
    background: #204faa;
  }
  
  .chat-body {
    padding: 25px 22px;
    gap: 20px;
    background-color: #ffffff;
    display: flex;
    height: 375px;
    overflow-y: auto;
    margin-bottom: 82px;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #b9fdff transparent;
  }
  
  .chat-body,
  .chat-form .message-input:hover {
    scrollbar-color: grey transparent;
  }
  
  .chat-body .message {
    display: flex;
    gap: 11px;
    align-items: center;
  }
  
  .chat-body .message .bot-avatar {
    width: 35px;
    height: 35px;
    fill: #fff;
    flex-shrink: 0;
    margin-bottom: 2px;
    align-self: flex-end;
    border-radius: 50%;
  }
  
  .chat-body .message .message-text {
    padding: 12px 16px;
    max-width: 75%;
    font-size: 16px;
    line-height: 22px;
  }
  
  .chat-body .bot-message.thinking .message-text {
    padding: 2px 16px;
  }
  
  .chat-body .bot-message .message-text {
    background: #ececec;
    border-radius: 13px 13px 13px 3px;
  }
  
  .chat-body .user-message {
    flex-direction: column;
    align-items: flex-end;
  }
  
  .chat-body .user-message .message-text {
    color: #fff;
    background: #0156fc;
    border-radius: 13px 13px 3px 13px;
  }
  
  .chat-body .user-message .attachment {
    width: 50%;
    margin-top: -7px;
    border-radius: 13px 3px 13px 13px;
  }
  
  .chat-body .bot-message .thinking-indicator {
    display: flex;
    gap: 4px;
    padding-block: 15px;
  }
  
  .chat-body .bot-message .thinking-indicator .dot {
    height: 7px;
    width: 7px;
    opacity: 0.7;
    border-radius: 50%;
    background: #0156fc;
    animation: dotPulse 1.8s ease-in-out infinite;
  }
  
  .chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
    animation-delay: 0.2s;
  }
  
  .chat-body .bot-message .thinking-indicator .dot:nth-child(2) {
    animation-delay: 0.3s;
  }
  
  .chat-body .bot-message .thinking-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
  }
  
  @keyframes dotPulse {
    0%,
    44% {
      transform: translateY(0);
    }
    28% {
      opacity: 0.4;
      transform: translateY(-4px);
    }
    44% {
      opacity: 0.2;
    }
  }
  
  .email-input-section {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: #ffffff;
    padding: 15px 22px 20px;
    display: none;
  }
  
  .email-input-section.visible {
    display: block;
  }
  
  .email-input-section .email-form {
    display: flex;
    align-items: center;
    position: relative;
    background: #fff;
    border-radius: 32px;
    outline: 1px solid #CCCCE5;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.06);
    transition: 0s ease, border-radius 0s;
  }
  
  .email-form:focus-within {
    outline: 2px solid #0156fc;
  }
  
  .email-form .email-input-field {
    width: 100%;
    height: 47px;
    outline: none;
    border: none;
    border-radius: inherit;
    font-size: 0.95rem;
    padding: 14px 0 12px 18px;
  }
  
  .email-form .email-controls {
    height: 47px;
    display: flex;
    padding-right: 6px;
    align-items: center;
    align-self: flex-end;
  }
  
  .email-form .email-controls button {
    height: 35px;
    width: 35px;
    border: none;
    cursor: pointer;
    color: #fff;
    border-radius: 50%;
    font-size: 1.15rem;
    background: #0156fc;
    transition: 0.2s ease;
    padding: 0;
  }
  
  .email-form .email-controls button:hover {
    background: #0156fc;
  }
  
  .chat-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    /* background: #ffffff; */
    padding: 15px 22px 20px;
    display: none;
  }
  
  .chat-footer.visible {
    display: block;
  }
  
  .chat-footer .chat-form {
    display: flex;
    align-items: center;
    position: relative;
    background: #fff;
    border-radius: 32px;
    outline: 1px solid #CCCCE5;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.06);
    transition: 0s ease, border-radius 0s;
  }
  
  .chat-form:focus-within {
    outline: 2px solid #0156fc;
  }
  
  .chat-form .message-input {
    width: 100%;
    height: 47px;
    outline: none;
    resize: none;
    border: none;
    max-height: 180px;
    scrollbar-width: none;
    border-radius: inherit;
    font-size: 0.95rem;
    padding: 14px 0 12px 18px;
    scrollbar-color: transparent transparent;
    line-height: 22px;
  }
  
  .chat-form .chat-controls {
    gap: 3px;
    height: 47px;
    display: flex;
    padding-right: 6px;
    align-items: center;
    align-self: flex-end;
  }
  
  .chat-form .chat-controls button {
    height: 35px;
    width: 35px;
    border: none;
    cursor: pointer;
    color: #0156fc;
    border-radius: 50%;
    font-size: 1.15rem;
    background: none;
    transition: 0.2s ease;
    padding: 0;
  }
  
  .chat-form .chat-controls button:hover,
  body.show-emoji-picker .chat-controls #emoji-picker {
    color: #0156fc;
    background: #f1f1ff;
  }
  
  .chat-form .chat-controls #send-message {
    color: #fff;
    display: none;
    background: #0156fc;
  }
  
  .chat-form .chat-controls #send-message:hover {
    background: #0156fc;
  }
  
  .chat-form .message-input:valid~.chat-controls #send-message {
    display: block;
  }
  
  .chat-form .file-upload-wrapper {
    position: relative;
    height: 35px;
    width: 35px;
  }
  
  .chat-form .file-upload-wrapper :where(button, img) {
    position: absolute;
  }
  
  .chat-form .file-upload-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    border-radius: 50%;
  }
  
  .chat-form .file-upload-wrapper #file-cancel {
    color: #ff0000;
    background: #fff;
  }
  
  .chat-form .file-upload-wrapper :where(img, #file-cancel),
  .chat-form .file-upload-wrapper.file-uploaded #file-upload {
    display: none;
  }
  
  .chat-form .file-upload-wrapper.file-uploaded img,
  .chat-form .file-upload-wrapper.file-uploaded:hover #file-cancel {
    display: block;
  }
  
  .client-option, .type-option {
    padding: 8px 16px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    background: #0156fc;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
  }
  
  .client-option:hover, .type-option:hover {
    background: #005f63;
  }
  
  em-emoji-picker {
    position: absolute;
    left: 50%;
    top: -337px;
    width: 100%;
    max-width: 350px;
    visibility: hidden;
    max-height: 330px;
    transform: translateX(-50%);
  }
  
  body.show-emoji-picker em-emoji-picker {
    visibility: visible;
  }
  
  /* Responsive media query for mobile screens */
  @media (max-width: 520px) {
    #chatbot-toggler {
      right: 20px;
      bottom: 20px;
    }
  
    .chatbot-popup {
      right: 0;
      bottom: 0;
      height: 100%;
      border-radius: 0;
      width: 100%;
      /* padding-top: 60px; */
    }
  
    .chatbot-popup .chat-header {
      padding: 12px 15px;
    }
  
    .chat-body {
      height: 530px;
      padding: 25px 15px;
    }
  
    .email-input-section {
      padding: 10px 15px 15px;
    }
  
    .chat-footer {
      padding: 10px 15px 15px;
    }
  
    .chat-form .file-upload-wrapper.file-uploaded #file-cancel {
      opacity: 0;
    }

    #chatbot-toggler{
        width: 40px !important;
        height: 40px !important;
    }

    .chatbot-container{
        bottom: 15px;
    }
  }


  /* Add these styles to your chatbot.css file */

/* Date header styling */
.chat-date-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 15px 0;
  position: relative;
  z-index: 1;
}

.chat-date-header::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #e0e0e0;
  z-index: -1;
}

.chat-date-label {
  background-color: #f0f4f9;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  color: #5a6a85;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 500;
}


/* Remove old overlay styles */
.chat-loading-overlay {
  display: none; /* Hide old overlay */
}

/* Small loader styles */
.chat-small-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  position: relative;
  z-index: 100;
}

.small-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff; /* Telfon brand color */
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

/* Update top loading indicator to use small spinner */
.top-loading-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.top-loading-indicator .small-spinner {
  margin-right: 8px;
}

.top-loading-indicator .chat-loading-text {
  font-size: 0.9rem;
  color: #333;
}

/* Existing spin animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}