/* dialogbox.css */

/* Button to open/close the chat, fixed on the right side */
#openChatButton {
    position: fixed;
    right: 10px;
    bottom: 10px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
    padding: 8px;
    transition: 300ms;
    background-color: #ffdb00;
    border-radius: 100px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#openChatButton:hover {
    height: 47px;
    background-color: #91BA3F;
}

#openChatButton svg {
    float: left;
    transition: 300ms;
}

#openChatButton svg.service {
    margin-top: 10px;
}

#openChatButton:hover svg.service {
    margin-top: 0px;
}

/* Styling for the chat dialog, placed on the right side */
#chatDialog {
    position: fixed;
    bottom: 60px;
    right: 10px;
    width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 99999;
    display: none; /* initially hidden */
}

/* Header of the dialog box with further reduced padding */
.dialog-header {
    background: #f5f5f5;
    padding: 3px; /* further reduced padding for a slimmer header */
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

/* Title in the header set to 14px with left margin */
.dialog-title {
    font-size: 14px;
    margin-left: 10px; /* indent to align with chat messages */
}

/* Container for control icons */
.dialog-controls {
    display: flex;
    align-items: center;
}

/* Icons for minimizing and closing with unified size */
.minimize-icon,
.close-icon {
    cursor: pointer;
    margin-left: 8px;
    font-size: 16px;
    transition: transform 0.3s ease;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 3px;
    line-height: 1;
}

.close-icon {
    margin-right: 10px;
    font-size: 24px;
    line-height: 0.75;
}

/* Rotate icon when minimized */
.minimize-icon.rotated {
    transform: rotate(180deg);
}

/* Content of the dialog */
.dialog-content {
    padding: 10px;
}

/* Chat history container with fixed height and scroll */
#chatHistory {
    height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* Chat input area styling */
#chatInputArea {
    display: flex;
}

/* Textarea styling */
#chatMessageInput {
    flex: 1;
    height: 50px;
    resize: none;
    padding: 5px;
    box-sizing: border-box;
}

/* Submit button styling */
#chatSubmitButton {
    width: 60px;
    height: 50px;
    margin-left: 5px;
    cursor: pointer;
    border: 1px solid #9e9e9e;
    border-radius: 5px;
    transition: transform 0.3s ease;
    background-color: #e0e0e0;
}

#chatSubmitButton:hover {
    background-color: #2E7D32;
    color: #fff;
}

/* Message container styling without extra margin */
.message {
    clear: both;
    padding: 5px;
}

/* Reset default margin for paragraphs inside messages */
.message p {
    margin: 0;
}

/* System messages styling (left-aligned, gray background) */
.message.system {
    text-align: left;
}

.message.system p {
    background-color: #e0e0e0;
    color: #424242;
    border: 1px solid #9e9e9e;
    border-radius: 10px;
    display: inline-block;
    padding: 8px;
    max-width: 80%;
}

/* Customer messages styling (right-aligned, dark green background) */
.message.customer {
    text-align: right;
}

.message.customer p {
    background-color: #2E7D32;
    color: #fff;
    border: 1px solid #1B5E20;
    border-radius: 10px;
    display: inline-block;
    padding: 8px;
    max-width: 80%;
}

.message.error {
    text-align: left;
}

.message.error p {
    background-color: #8B0000;
    color: #fff;
    border: 1px solid #640000;
    border-radius: 10px;
    display: inline-block;
    padding: 8px;
    max-width: 80%;
}

/* Loader Animation */
.chatbot-loader {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1B5E20;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    animation: spin 2s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}



.loader-text {
    vertical-align: middle;
    margin-left: 10px;
}