/* Chatbot wrapper */
.chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-greeting {
    background: #02899d;
    color: white;
    padding: 8px 10px;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
}

.chatbot-greeting .chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 10px;
    vertical-align: middle;
}


/* Chatbot logo/icon */
.chatbot-logo {
    width: 50px;
    height: 50px;
    background: #02899d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.chatbot-logo img {
    padding: 4px;
}

.chatbot-container {
    width: 380px;
    max-height: 60vh;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    min-height: 400px;
    display: flex;
    font-size: 14px;
}

/* Chatbot header */
.chatbot-header {
    background: #02899d;
    color: white;
    padding: 15px 10px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.chatbot-header button.chatbot-close {
    padding: 2px 2px;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 5px;
}

.chatbot-close:hover {
    color: #ccc;
}

/* Chatbot messages */
.chatbot-messages {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    max-height: 60vh;
    word-wrap: break-word;
}

/* Chatbot message styling */
.chatbot-message {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 6px;
    max-width: 80%;
    float: right;
    width: auto;
    display: inline-block;
}

.chatbot-header button.chatbot-close svg {
    width: 12px;
    height: 12px;
}

.chatbot-message.user {
    background: #02899d;
    margin-left: 20%;
    text-align: right;
    color: #fff;
    border-bottom-right-radius: 0;
}

.chatbot-message.bot {
    background: #eaf5f3;
    margin-right: 20%;
    text-align: left;
    border-bottom-left-radius: 0;
    float: left;
    font-size: 12px;
}

/* Chatbot input */
.chatbot-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #dcdcde;
    justify-content: center;
    gap: 10px;
}

.chatbot-input textarea#userInput {
    min-height: 50px;
    font-size: 14px;
    resize: none;
    outline: none;
}

.chatbot-input button {
    background: transparent !important;
    border: none !important;
    min-width: initial !important;
    width: initial !important;
    padding: 4px;
    min-height: initial;
}

.chatbot-input button svg {
    float: left;
}

.chatbot-input input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
}

.chatbot-input input:invalid {
    border-color: #072b4b;
}

.chatbot-input button {
    padding: 8px 15px;
    border: none;
    background: #072b4b;
    color: white;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-size: 14px;
    min-width: 60px;
}

.chatbot-input button:hover {
    background: #072b4b;
}

.chatbot-close-clear button.chatbot-clear {
    font-size: 10px;
    padding: 6px 10px;
    background: #017283;
}

.chatbot-close-clear {
    display: flex;
    align-items: center;
    gap: 7px;
}

.chatbot-header button.chatbot-close svg {
    display: block;
}

@media(min-width:750px) {
    .chatbot-logo {
        width: 60px;
        height: 60px;
    }
}

@media(max-width:749px) {
    .chatbot-container {
        width: 270px;
    }
}