.aizl-chat-popup {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 380px;
    max-width: 380px;
    z-index: 9998;
    font-family: inherit;
    color: inherit;
    background: inherit;
    background: #fff;
    border: 1px solid black;
    box-shadow: 0 0 10px rgb(255, 255, 255);
    overflow: hidden;
}

.aizl-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    border-radius: unset;
    background: darkblue;
    color: white;
    font-size: inherit;
}

.aizl-chat-close-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 30px;
    text-decoration: none !important;
}
.aizl-chat-close-button:hover {
    color: #aaa;
}

.aizl-chat-history {
    height: 520px;
    overflow-y: auto;
    padding: 10px;
}

#aizl-chat-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    padding: 10px;
    border: none;
    border-top: 1px solid #ccc;
    border: 1px dotted black;

    color: inherit;
}

#aizl-chat-send-button {
    width: 100%;
    padding: 10px;
    font-size: inherit;
    border: none;
    cursor: pointer;
    color: white;
    background: darkblue;
    border-radius: unset;
    display: flex;
    justify-content: center;
    align-items: center;
}

#aizl-chat-send-button:hover {
    background-color: #005d87;
}

/* User Message Styles */
.aizl-chat-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 16px;
}

.aizl-chat-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-direction: row-reverse;
}

.aizl-chat-user-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #0056b3;
}

.aizl-chat-user-name-time {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.aizl-chat-user-name {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.aizl-chat-user-time {
    color: #95a5a6;
    font-size: 12px;
    margin-left: auto;
}

.aizl-chat-user-message {
    font-size: 14px;
    background: rgba(30, 144, 255, 0.8);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 14px 18px;
    max-width: 80%;
    margin-top: 8px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Agent Message Styles */
.aizl-chat-agent {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
}

.aizl-chat-agent-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.aizl-chat-agent-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #34495e;
}

.aizl-chat-agent-name-time {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.aizl-chat-agent-name {
    color: #34495e;
    font-size: 14px;
    font-weight: 600;
}

.aizl-chat-agent-time {
    color: #95a5a6;
    font-size: 12px;
    margin-right: auto;
}

.aizl-chat-agent-message {
    font-size: 14px;
    background: #f0f2f5;
    color: #1a1a1a;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 14px 18px;
    max-width: 80%;
    margin-top: 8px;
    line-height: 1.5;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.aizl-chat-agent-message a {
    color: #1e90ff;
}

.aizl-chat-agent-message a:hover {
    color: #0056b3;
}

.aizl-chat-agent-message.loading {
    width: auto;
    min-width: 120px;
    max-width: 180px;
}

.aizl-chat-agent-message.error {
    color: red;
}

.aizl-chat-input-container textarea {
    height: 60px !important;
    max-height: 150px !important;
    resize: none !important; 
    overflow-y: auto !important;
}

/* Chat Icon Styles */
.aizl-chat-icon {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    color: inherit;
    box-shadow: none;
    box-shadow: 0 0 10px rgb(255, 255, 255);
    background: navy;
}

.aizl-chat-icon:hover {
    transform: scale(1.05);
}

.aizl-chat-icon svg {
    width: 25px;
    height: 25px;
    color: white;
}



.aizl-function-link {
    display: inline-block;
    width: 80%;
    padding: 5px 5px;
    background-color: #ffffff;
    color: #333333 !important;
    text-decoration: none;
    border-radius: 20px;
    border: 1.5px solid #333333;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.aizl-function-link:hover {
    background-color: #333333;
    color: #ffffff !important;

}