/* Styling for the floating WhatsApp icon */
.floating-icon {
    position: fixed;
    bottom: 43px;
    right: 20px;
    background-color: #8b0000;
    border-radius: 50%;
    padding: 5px;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.floating-icon img {
    width: 80px;
    height: 80px;
}

/* General chat box container */
.chat-box {
    position: fixed;
    bottom: 142px;
    right: 20px;
    width: 300px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    opacity: 0.95;
}

/* Header for chat */
/*.chat-header {
    background-color: #4CAF50;
    color: #fff;
    padding: 10px;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    text-align: center;
    font-size: 18px;
}*/


.chat-header {
    background: #4caf50 !important; /* WhatsApp Green */
    color: #fff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}



/* Body of the chat */
.chat-body {
    
    overflow-y: auto;
    padding: 10px;
    background-color: #f9f9f9;
    max-height: 500px;
    min-height: 230px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}


/* Admin and user messages */
.admin-message {
    background-color: #d1f7d5;
    padding: 15px 12px;
    margin: 5px 0;
    border-radius: 10px;
    text-align: left;
    min-width: 65% !important;
    max-width: 80%;
    margin-left: 0;
    float: left;
}

.user-message {
    background-color: #f0f0f0;
    padding: 15px 12px;
    margin: 5px 0;
    border-radius: 10px;
    text-align: right;
    min-width: 65%; 
    max-width: 80%;
   /* max-width: 80%;*/
    margin-right: 0;
    float: right;
}

/* Aligning the messages */
/*.admin-message {
    align-self: flex-start; 
}

.user-message {
    align-self: flex-end; 
}*/


/* Message styles */
/*.admin-message {
    background-color: #d0f8d0;
    padding: 8px;
    margin: 5px 0;
    border-radius: 8px;
    align-self: flex-start;
}

.user-message {
    background-color: #e1e1e1;
    padding: 8px;
    margin: 5px 0;
    border-radius: 8px;
    align-self: flex-end;
}
*/
/* Footer for chat input and send button */
.chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    background-color: #fff;
}

.chat-footer input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 10px;
    font-size: 14px;
}

.chat-footer button {
    padding: 10px 15px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.chat-footer button:hover {
    background-color: #45a049;
}

/* Dropdown for customer selection */
#customer-select {
    padding: 8px;
    width: 100%;
    margin-top: 10px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Prevent page from scrolling when chat box is visible */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* Style for the chat icon if you want to add a floating icon for the chat box */
#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 9999;
}

/* Chat box when opened */
.chat-box {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.chat-box.hidden {
    opacity: 0;
}
