/* General styling */
:root {
    --primary-color: #d893b0;
    --secondary-color: #0056b3;
    --text-color: #ffffff;
    --background-color: #f4f4f9;
    --user-message-color: #007bff;
    --bot-message-color: #f4f4f9;
    --agent-message-color:#fdf0d5;
    --input-field-color: #ffffff;
    --input-border-color: #cccccc;
    --chatbot-bg-color: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
}

/* Chatbot container */
#chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat_with_us {
    background-color: var(--primary-color);
    color: white;
    padding: 1px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.power {
    font-size: 17px;
    margin: 1px;
}

.power a{
    font-weight: bold;
    text-decoration: none;
    color: black;
    margin-right: 5px;
}

#chatbot-window {
    display: none;
    /* Add other styling for chatbot window */
}

#chatbot-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /*background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 15px;*/
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /*font-size: 24px;*/
}

#chatbot-icon img {
    border-radius: 50%;  /* Makes the image a circle */
    width: 60px;
    height: 60px;
    object-fit: contain;  /* Ensures the image fits within the circle */
}

/* Chatbot header */
#chatbot-header {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#chatbot-header-m {
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 8px;
    padding-top: 0px;
    /* display: flex; */
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#chatbot-header h3 {
    margin: 0;
    font-size: 18px;
}

#chatbot-header button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
}

/* Chatbot body */
#chatbot-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 2px solid var(--primary-color); /* Add this line to create a solid border */
    background-color: var(--chatbot-bg-color);
}

/* Chatbot messages area */
#chatbot-messages {
    flex-grow: 1;
    width: 350px;
    height: 330px;
    padding: 15px;
    overflow-y: auto;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* Chatbot message input area */
#chatbot-input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #eee;
}

#chatbot-input {
    flex-grow: 1;
    border: none;
    padding: 10px;
    outline: none;
    border-radius: 20px;
    background-color: var(--input-field-color);
    margin-right: 10px;
}

#send-button {
    /* background-color: #007bff; */
    background-image: url(/static/images/send_bttn4.png);
    color: white;
    border: none;
    padding: 17px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

#send-button:hover {
    background-color: var(--secondary-color);
}

/* User and bot messages */
.user-message, .bot-message, .agent-message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word; /* Ensure long words break to fit within the container */
    white-space: pre-wrap; /* Preserve whitespace and ensure text wraps correctly */
}

.user-message {
    background-color: var(--user-message-color);
    color: white;
    align-self: flex-end;
}

.bot-message {
    background-color: var(--bot-message-color);
    color: black;
    align-self: flex-start;
}

.agent-message{
    background-color: var(--agent-message-color);
    color: black;
    align-self: flex-start;
}



/* Dark mode variables */
body.dark-mode {
    --chatbot-bg-color: #1a1a1a;
}

/* Media query for mobile devices */
@media (max-width: 600px) {
    /* Adjust chatbot container */
    #chatbot {
        bottom: 10px;
        right: 10px;
    }

    /* Adjust chatbot window */
    #chatbot-window {
        width: 90%;
        /*height: 70vh;*/
    }
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.switch-checkbox {
    display: none;
}

.switch-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid #ddd;
    border-radius: 25px;
    margin: 0;
    height: 100%;
    background-color: #ccc;
    transition: background-color 0.3s ease;
}

.switch-label::after {
    content: '';
    display: block;
    width: 30px;
    height: 30px;
    background: #fff;
    border-radius: 30px;
    transition: margin 0.3s ease;
}

.switch-checkbox:checked + .switch-label {
    background-color: #4caf50;
}

.switch-checkbox:checked + .switch-label::after {
    margin-left: 30px;
}

#voice-button {
    width: 35px;
    height: 35px;
    background: url('/static/images/microphone2.png') no-repeat center center;
    background-color: white;
    background-size: contain;
    border-radius: 50%;
    margin-left: 3px;
    border: none;
    cursor: pointer;
}

/* Style for "typing..." indicator */
#typing-indicator{
    font-size: 12px;
}

.dot {
    animation: blink 1s steps(1, end) infinite;
}
.dot:nth-child(2) {
    animation-delay: 0.2s;
}
.dot:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

.message {
    /* background: #fff; */
    /* padding: 10px; */
    max-width: 300px;
    border-radius: 5px;
    /* margin: 10px; */
    /* box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); */
    align-items: center;
    align-content: center;
    font-size: 14px;
    text-align: center;
    display: grid;
    justify-items: center;
    justify-content: center;
    font-family: Mulish, sans-serif;
}

.online-indicator {
    width: 12px; /* Width of the circle */
    height: 12px; /* Height of the circle */
    /*background-color: green; /* Color of the circle */
    border-radius: 50%; /* Make the div a circle */
    /*display: inline-block; /* Keep it inline */

}


#action-buttons {
    text-align: center;
    margin-top: 10px;
}

.action-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 10px;
    font-size: 16px;
    width: 70%; /* Adjust width as needed */
}

.action-btn:hover {
    background-color: #0056b3;
}

.action-btn:active {
    background-color: #004494;
}


/* Styling for the order number input field */
.styled-input {
    width: 80%;
    padding: 10px;
    margin: 10px 0;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

/* Styling for the track order button */
.styled-button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s;
}

/* Change background color on hover */
.styled-button:hover {
    background-color: #0056b3;
}
