/* Define global variable light-grey dark-grey light-green dark-green */
:root {
    --light-primary: #4d9b7a;
    --dark-primary: #026f5c;
    --light-secondary: #d9d9d9;
    --dark-secondary: #545b5f;
    --bg-bot: #E5F7EF;
}

body {
    font-family: "Poppins", sans-serif;
    margin: 0;
    background: none;
    padding: 2px;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 20px;
}

.chat-header a{
    text-decoration:none;
    color: white;
}

.copyright{
    font-size:12px;
    text-align: center;
}

.copyright a {
    text-decoration:none;
    color: #727273;
}

#chatbot-toggle-btn {
    margin-right: 5px;
    margin-bottom: 9px;
    padding: 3px 5px;
    border: none;
    background: linear-gradient(90deg, var(--light-primary), var(--dark-primary));
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1101; /* Ensure the button is above the chatbot popup */
    width: 60px;
    height: 60px;
}

#chatbot-toggle-btn:hover {
    background-color: #0074CC;
}

.chatbot-popup {
    display: none;
    flex-direction: column;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    z-index: 1100;
}

.chat-header {
    /* Defines a gradient background from light-primary to dark-primary */
    background: linear-gradient(90deg, var(--light-primary), var(--dark-primary));
    color: #fff;
    padding: 4px 10px;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-btn {
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.chat-box {
    overflow-y: auto;
    padding: 15px 20px;
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-top: 1px solid #ddd;
}

#user-input {
    font-family: "Poppins";
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    outline: none;
    min-width: 0;
}

#send-btn {
    font-family: "Poppins", sans-serif;
    padding: 0;
    border: none;
    background: none;
    color: var(--dark-primary);
    margin-left: 10px;
    margin-top: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#send-btn:hover {
}

.user-message {
    font-size: 13px;
    border: 1px solid #e5e5e5;
    color: #333;
    padding: 14px;
    border-radius: 15px;
    margin-bottom: 15px;
    margin-top: 15px;
    margin-left: 10px; /* Push user message to the left */
    position: relative;
    display: flex;
    align-items: start;
    flex-direction: row-reverse; /* Move user message to the right */
}

.user-message::before {
    content: "";
    background: url("user.png") no-repeat center center;
    background-size: 18px 18px;
    position: absolute;
    bottom: -17px;
    right: -15px;
    margin-bottom: 7px;
    font-size: 20px;
    background-color: var(--light-secondary);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.bot-message {
    font-size: 13px;
    background-color: var(--bg-bot);
    padding: 14px;
    border-radius: 15px;
    margin-bottom: 10px;
    margin-top: 15px;
    align-self: flex-start; /* Move bot message to the left */
    margin-right: 10px; /* Push bot message to the right */
    position: relative;
    display: flex;
    align-items: start;
    flex-direction: column; /* Adjust for button placement */
}

.bot-message::before {
    content: "";
    background: url("ai.png") no-repeat center center;
    background-size: 25px 25px;
    position: absolute;
    bottom: -17px;
    left: -14px;
    margin-bottom: 4px;
    font-size: 20px;
    background-color: var(--dark-primary);
    color: #fff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.button-container {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.button-container button {
    padding: 10px 50px;
    border: none;
    background-color: var(--dark-primary);
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-container button:hover {
    background-color: var(--light-primary);
}
