html,
body {
    height: 100%;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ECE5DD;
}

.container {
    height: 100%; /* This makes sure the container takes up the full height of the view */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ECE5DD; /* This color will fill the rest of the page */
}

.chat-container {
    width: 100%; /* This sets a fixed width resembling a phone */
    height: 100%; /* This sets a fixed height resembling a phone */
    border: 1px solid #ccc;
    border-radius: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1); /* Optional: adds a subtle shadow for a "lifted" effect */
    overflow: hidden; /* Ensures the border-radius is applied */
    background-color: white; /* This makes the chat-container background white */
    display: flex;
    flex-direction: column;
}

.header, .input-group {
    z-index: 2; /* This keeps the header and input group above the background image */
}

.header {
    background-color: #128C7E;
    color: white;
    padding: 10px;
    font-size: 1.2em;
    border-bottom: 2px solid #128C7E;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: start; 
}

#bot-name {
    position: relative;
    top: 50%;
    margin-top: 0%;
    transform: translateY(25%);
}

.chatbox {
    flex: 1;
    padding: 10px;
    background-color: #ECE5DD;

    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    overflow-y: auto;

    background-image: url(''); /* Replace with your image URL */
    background-size: auto 100%; /* Scale the image to fit the height of the chatbox */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the image horizontally */
}

.message-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.bot-message,
.user-message {
    max-width: 70%;
    padding: 10px 15px; /* Consistent padding */
    margin: 5px 0; /* Only vertical margin for consistent spacing */
    border-radius: 7.5px; /* Subtle border radius */
    font-size: 0.95em; /* Slightly smaller font size for a cleaner look */
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Soft drop shadow for depth */
    display: flex;
    align-items: center;
    word-wrap: break-word; /* Ensure long words do not overflow */
}

.bot-message {
    background-color: #FFFFFF;
    color: #333;
    border-radius: 2.5px 10px 10px 10px;
    align-self: flex-start;
    margin-right: auto; /* Aligns to the left and allows for tail adjustments */
}

.user-message {
    background-color: #DCF8C6;
    color: #333;
    border-radius: 10px 2.5px 10px 10px;
    align-self: flex-end;
    margin-left: auto; /* Aligns to the right and allows for tail adjustments */
}

.input-group {
    border-top: 1px solid #ccc;
    background-color: #f0f0f0;
    padding: 5px;
    position: relative;
    display: flex;
    align-items: center; /* This will vertically center the children */
}

.form-control {
    border-radius: 25px;
    border: 1px solid #ccc;
    flex-grow: 1;
    margin-right: 5px; /* Space between input and button */
    padding: 10px 15px; /* More padding for a rounded look */
    font-size: 1em; /* Slightly larger font size for readability */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); /* Inner shadow for depth */
}

.btn-primary {
    position: absolute; /* Absolute position within the input-group */
    right: 5px; /* Align to the right, inside the input-group */
    /* Align the button to the middle of the input field */
    top: 50%;
    height: 38px; /* Match the height of the input field */
    width: 42px; /* Circle shape, same as height */
    padding: 0;
    border-radius: 50%;
    background-color: #128C7E; /* Adjusted WhatsApp green color */
    border: none; /* Remove the border if not needed */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer; /* Change cursor to pointer on hover */
}

.btn-primary i {
    font-size: 20px; /* Larger icon size */
    color: white; /* Icon color */
    padding-right: 5px;
}

.bot-icon {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}

/* Media query for desktop screens */
@media (min-width: 768px) {
    .chat-container {
        width: 414px;  /* Fixed width for desktop */
        height: 736px;  /* Fixed height for desktop */
        margin: 20px auto; /* Center in the viewport with margin */
        border-radius: 20px; /* Slightly larger border radius */
    }
}

/* Scrollbar styling for chatbox */
.chatbox::-webkit-scrollbar {
    width: 5px;
}

.chatbox::-webkit-scrollbar-thumb {
    background-color: #b6b6b6;
    border-radius: 10px;
}

.chatbox::-webkit-scrollbar-track {
    background-color: #ECE5DD;
}

/* Style for the microphone button */
.btn-secondary i {
    padding: 4px;
    border-radius: 50%;
    background-color: #6c757d;
    color: #fff;
}

/* Style for the microphone button when recording */
.btn-secondary.recording i {
    background-color: red;
    color: #fff;
    padding: 4px; /* Adjust the padding if necessary */
}
