﻿/* Chat Button */
#chat-button {
    position: fixed;
    bottom: 130px;
    right: 48px;
    z-index: 999;
}

.chat-toggle-btn {
    /*background-color: #007bff;
    color: white;
    border: none;*/
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 24px;
    cursor: pointer;
    /*box-shadow: 0 4px 8px rgba(0,0,0,0.2);*/
}

/* Chatbox Styles */
.chatbox {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    height: 500px;
    max-height: 500px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    z-index: 1100;
}

    .chatbox.hidden {
        display: none;
    }

.chatbox-header {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbox-body {
    padding: 10px;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    /*background-color: #f8f9fa;*/
}

.chatbox-footer {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    gap: 5px;
}

    .chatbox-footer input {
        flex: 1;
        padding: 8px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }

    .chatbox-footer button {
        padding: 8px 12px;
        background-color: #007bff;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

/* Messages */
.message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 15px;
    max-width: 80%;
    word-wrap: break-word;
}

    .message.sent {
        background-color: #007bff;
        color: white;
        margin-left: auto;
        text-align: left;
    }

    .message.received {
        background-color: #e9ecef;
        color: #000;
        margin-right: auto;
    }

    .message.Info {
        background-color: #605b5b;
        color: #fff;
        align-content: center;
        margin-left:10%;
        font-size:small;
    }

    .message .timestamp {
        font-size: 10px;
        color: #e0e0e0;
        margin-top: 4px;
        text-align: right;
    }

    .message.sent .timestamp {
        text-align: right;
        color: #cce2ff; /* light blue for contrast */
    }

    .message.received .timestamp {
        text-align: right;
        color: #888;
    }







@media (max-width: 600px) {
    .chatbox {
        bottom: 70px;
        right: 10px;
        left: auto;
        width: 90%;
        height: 75%;
        max-height: 75%;
        border-radius: 10px;
    }

    #chat-button {
        bottom: 135px;
        right: 48px;
    }

    .chat-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .chatbox-footer input {
        font-size: 14px;
    }

    .chatbox-footer button {
        font-size: 14px;
        padding: 8px 10px;
    }

    #scrollToBottomBtn_chatbox {
        bottom: 90px;
        right: 10px;
    }
}


.chat-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    gap: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* Spinner styles */
.spinner {
    border: 4px solid #f3f3f3; /* Light gray */
    border-top: 4px solid #007bff; /* Blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

