/* Chat Widget Styles */
#chat-widget-container {
    cursor: pointer;
    position: fixed;
    bottom: 154px;
    right: 10px;
    z-index: 9999;
}

#chat-widget-btn {
    width: 60px;
    height: 60px;
    background-color: transparent;
    background-image: url('../../../assets/images/lela.gif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* border-radius: 50%; */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    /* box-shadow: 0 4px 8px rgba(0,0,0,0.2); */
    transition: transform 0.3s;
    /* border: 2px solid #007bff; */
}

#chat-widget-btn i {
    display: none;
}

#chat-widget-btn:hover {
    transform: scale(1.1);
    /* box-shadow: 0 6px 12px rgba(0,0,0,0.3); */
}

#chat-widget-box {
    display: none;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 0px;
    right: 0;
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.chat-widget-input-container {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    background-color: white;
    align-items: center;
}

#chat-widget-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    resize: none;
    max-height: 100px;
    font-family: inherit;
    margin: 0 5px;
}

.chat-widget-input-container button {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: color 0.2s;
}

.chat-widget-input-container button:hover {
    color: #0056b3;
}

.chat-widget-input-container button.text-success {
    color: #28a745 !important;
}

.chat-msg {
    margin-bottom: 10px;
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chat-msg.user {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-msg.admin {
    background-color: #e9ecef;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #chat-widget-box {
        width: 90vw; /* Use viewport width */
        height: 70vh; /* Use viewport height */
        right: 0;
        bottom: 80px; /* Keep above the button */
    }

    #chat-widget-container {
        right: 15px;
        bottom: 20px; /* Adjust button position if needed */
    }
    
    #chat-widget-btn {
        width: 50px;
        height: 50px;
    }
}

/* Tablet/iPad Responsiveness */
@media (max-width: 1024px) {
    #chat-widget-box {
        max-height: 80vh; /* Prevent overflowing top on smaller vertical screens */
        height: auto;     /* Allow it to shrink */
        min-height: 300px; /* Ensure it's not too small */
    }
}
