

/**
 * H5 Chatbot Frontend Styles
 */

/* Main Container */
#h5-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Chat Icon */
#h5-chatbot-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#h5-chatbot-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#h5-chatbot-icon:hover {
    transform: scale(1.1);
}

#h5-chatbot-icon.active {
    transform: scale(0.9);
}

/* Chat Window */
#h5-chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Header */
#h5-chatbot-header {
    background-color: #4a6fa5;
    color: #ffffff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.h5-chatbot-agent-info {
    display: flex;
    align-items: center;
}

.h5-chatbot-agent-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #ffffff;
}

.h5-chatbot-agent-name {
    font-weight: 600;
    font-size: 16px;
}

.h5-chatbot-agent-status {
    font-size: 12px;
    opacity: 0.8;
}

.h5-chatbot-controls button {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.h5-chatbot-controls button:hover {
    opacity: 1;
}

/* Chat Messages Area */
#h5-chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fb;
}

/* Message Styles */
.h5-chatbot-message {
    margin-bottom: 15px;
    max-width: 80%;
    clear: both;
}

.h5-chatbot-message.user {
    float: right;
}

.h5-chatbot-message.agent {
    float: left;
}

.h5-chatbot-message-content {
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    display: inline-block;
    word-wrap: break-word;
}

.h5-chatbot-message.user .h5-chatbot-message-content {
    background-color: #4a6fa5;
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.h5-chatbot-message.agent .h5-chatbot-message-content {
    background-color: #e9edf2;
    color: #333333;
    border-bottom-left-radius: 4px;
}

.h5-chatbot-message-time {
    font-size: 11px;
    color: #999999;
    margin-top: 5px;
    clear: both;
}

.h5-chatbot-message.user .h5-chatbot-message-time {
    text-align: right;
}

.h5-chatbot-message.agent .h5-chatbot-message-time {
    text-align: left;
}

.h5-chatbot-agent-info {
    margin-bottom: 5px;
}

/* Typing Indicator */
.h5-chatbot-typing .h5-chatbot-message-content {
    min-width: 30px;
    padding: 10px;
    text-align: center;
}

/* User Info Form */
#h5-chatbot-user-info {
    padding: 20px;
    background-color: #ffffff;
    border-top: 1px solid #e9edf2;
}

.h5-chatbot-form-message {
    margin-bottom: 15px;
    font-weight: 500;
    color: #333333;
}

.h5-chatbot-form-group {
    margin-bottom: 15px;
}

.h5-chatbot-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333333;
}

.h5-chatbot-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 14px;
}

.h5-chatbot-form-group input:focus {
    border-color: #4a6fa5;
    outline: none;
}

/* Chat Input Area */
#h5-chatbot-input {
    padding: 12px;
    background-color: #ffffff;
    border-top: 1px solid #e9edf2;
}

#h5-chatbot-message-form {
    display: flex;
    align-items: center;
}

#h5-chatbot-message {
    flex: 1;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 20px;
    font-size: 14px;
    resize: none;
}

#h5-chatbot-message:focus {
    outline: none;
    border-color: #4a6fa5;
}

.h5-chatbot-btn {
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px 12px;
    margin-left: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.h5-chatbot-btn:hover {
    background-color: #f0f2f5;
}

.h5-chatbot-btn-send {
    color: #4a6fa5;
    font-size: 18px;
}

.h5-chatbot-btn-primary {
    background-color: #4a6fa5;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.h5-chatbot-btn-primary:hover {
    background-color: #3a5982;
}

/* Error Messages */
.h5-chatbot-error {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
}

/* Clearfix for Floating Elements */
.h5-chatbot-clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive Styles */
@media screen and (max-width: 480px) {
    #h5-chatbot-window {
        width: 300px;
        height: 450px;
        right: 0;
    }
    
    .h5-chatbot-message {
        max-width: 85%;
    }
}
/* User info form styling */
#h5-chatbot-user-info {
    padding: 20px;
    background-color: #fff;
    border-top: 1px solid #e5e5e5;
}

.h5-chatbot-form-message {
    margin-bottom: 15px;
    font-weight: 500;
    color: #333;
}

.h5-chatbot-form-group {
    margin-bottom: 15px;
}

.h5-chatbot-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.h5-chatbot-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Error message styling */
.h5-chatbot-error {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}