/* ===================================
   1. Chat Container Positioning
=================================== */

/* TEST WITH BG-COLOR */
.oxychat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background-color: #4B27D0; */
}

/* ===================================
   2. Chat Window Box
=================================== */
.oxychat-window {
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===================================
   3. Header
=================================== */
.oxychat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #4B27D0;
    color: white;
}

.oxychat-header-left {
    display: flex;
    align-items: center;
}

.oxychat-header-logo {
    height: 2rem;
}

/* ===================================
   4. Status
=================================== */
.oxychat-status {
    display: flex;
    align-items: center;
    margin-left: 0.25rem;
}

.oxychat-status-indicator {
    height: 0.5rem;
    width: 0.5rem;
    border-radius: 9999px;
    margin-right: 0.25rem;
}

.oxychat-status-text {
    font-size: 0.75rem;
    color: #f3f4f6;
}

/* ===================================
   5. Close Button
=================================== */
.oxychat-close-button {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oxychat-close-button:hover {
    color: #e5e7eb;
}

.oxychat-close-icon {
    width: 1rem;
    height: 1rem;
}

/* ===================================
   6. Messages Area
=================================== */
.oxychat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

.oxychat-message {
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.oxychat-message.user {
    background: #d6d4f9;
    align-self: flex-end;
    color: #000;
}

.oxychat-message.bot {
    background: #eaeaea;
    align-self: flex-start;
    color: #000;
}

/* ===================================
   7. Typing Indicator (Simple Text)
=================================== */
.oxychat-typing {
    font-size: 12px;
    color: gray;
    margin-bottom: 10px;
    font-style: italic;
}

/* ===================================
   8. Input Area
=================================== */
.oxychat-input-area {
    padding: 12px;
    background-color: #ffffff;
    border-top: 1px solid #f3f3f3;
}

.oxychat-form {
    position: relative;
}

.oxychat-textarea {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border-radius: 10px;
    background-color: #f3f4f6;
    border: none;
    resize: none;
    color: #374151;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;
}

.oxychat-textarea::placeholder {
    color: #6b7280;
}

.oxychat-textarea:focus {
    outline: none;
}

.oxychat-send-button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4B27D0;
}

.oxychat-send-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.9;
}

/* ===================================
   9. Floating Button
=================================== */
.oxychat-button {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease-in-out;
    border: none;
    cursor: pointer;
    background-color: #4B27D0;
    padding: 0;
}

.oxychat-button:hover {
    transform: scale(1.10);
}

.oxychat-button img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* ===================================
   10. Message Wrapper and Bubble
=================================== */
.oxychat-message-wrapper {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.oxychat-message-wrapper.items-end {
    align-items: flex-end;
}

.oxychat-message-wrapper.items-start {
    align-items: flex-start;
}

.message-bubble {
    padding: 8px 16px;
    max-width: 80%;
    word-break: break-word;
    border-radius: 12px;
    font-size: 14px;
    position: relative;
}

.bot-bubble {
    border-bottom-left-radius: 4px;
}

.user-bubble {
    border-bottom-right-radius: 4px;
}

/* Message pointers (triangle tips) */
.bot-bubble::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-right: 15px solid var(--bubble-color);
    border-bottom: 0px solid transparent;
    transform: rotate(180deg);
}

.user-bubble::before {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-left: 15px solid var(--bubble-color);
    border-bottom: 0px solid transparent;
    transform: rotate(180deg);
}

/* ===================================
   11. Info Row (Avatar + Timestamp)
=================================== */
.oxychat-info-row {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.oxychat-info-row.justify-end {
    justify-content: flex-end;
}

.oxychat-info-row.justify-start {
    justify-content: flex-start;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.message-timestamp {
    font-size: 12px;
    color: #6b7280;
    margin-left: 6px;
    margin-right: 6px;
}

/* ===================================
   12. Typing Animation (Bouncing Dots)
=================================== */
.oxychat-typing-wrapper {
    display: flex;
    align-items: flex-start;
    margin-top: 1.5rem;
}

.oxychat-typing-avatar-container {
    display: flex;
    align-items: center;
}

.oxychat-avatar {
    width: 24px;
    height: 24px;
    margin-right: 0.25rem;
    position: relative;
    z-index: 10;
}

.oxychat-typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1rem;
}

.oxychat-typing-indicator span {
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background-color: #9CA3AF;
    border-radius: 50%;
    display: inline-block;
    animation: oxychatBounce 1.2s infinite ease-in-out;
}

.oxychat-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.oxychat-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes oxychatBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-5px);
    }
}


/* ===================================
   13. Responsive Design
=================================== */
@media (max-width: 640px) {
    /* .oxychat-container {
      bottom: 0;
      right: 0;
      left: 0;
      top: 0;
      width: 100vw;
      height: 100vh;
      z-index: 9999;
      background-color: red;
    } */
    
     /* TEST WITH BG-COLOR */
    .oxychat-container {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   }

  
    .oxychat-window {
      width: 100svw;
      height: 100svh;
      border-radius: 0;
      box-shadow: none;
    }
  
    .oxychat-button {
      position: fixed;
      bottom: 20px;
      right: 20px;
    }
  }
  