@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

body, button, input, textarea {
    font-family: 'Quicksand', sans-serif; /* Ensure all elements use the font */
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #D9D9D9;
    overflow: hidden; /* Prevent scrolling */
}

p {
    margin: 0;
    padding: 0;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full height of the viewport */
}

.chat-header {
    position: fixed;
    top: 0;
    width: 100%;
    color: #545251;
    padding: 10px;
    text-align: center;
    font-size: 18px;
    z-index: 10; /* Ensure it stays on top */
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

.reset-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    box-sizing: border-box; /* Ensure it does not overflow */
}


.chat-messages {
    padding: 0px 10px 0px 10px; /* Adjust padding to account for header and input */
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
    background-color: #D9D9D9;
    color: #545251;
    display: flex;
    flex-direction: column;
    margin-top: 60px; /* Prevent messages from being hidden under the header */
    margin-bottom: 170px; /* Prevent messages from being hidden under the input */
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

.chat-greetings {
    overflow-y: auto;
    border-bottom: 1px solid #ddd;
    background-color: #D9D9D9;
    color: #545251;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Ensure items are aligned at the start */
    justify-content: flex-start; /* Ensure content starts from the top */
    margin-top: 100px; /* Prevent messages from being hidden under the header */
    margin-bottom: 140px; /* Prevent messages from being hidden under the input */
    box-sizing: border-box; /* Include padding in the element's total width and height */
}

.greeting-image {
    width: 100%; /* Adjust as needed */
    max-width: 120px; /* Smaller size */
    margin-bottom: 20px; /* Space between the image and greeting text */
}

#greeting {
    display: flex;
    flex-direction: column;
    align-items: center; /* Ensure items are centered */
    justify-content: flex-start; /* Ensure content starts from the top */
}


.top-content {
    text-align: top;
    width: 100%;
    margin: auto;
}

.suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    font-size: 14px;
}

.suggestion {
    background-color: #a09790;
    color: white;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    flex: 1 1 calc(40% - 20px);
    max-width: calc(40% - 20px);
    text-align: center;
}

.message-container {
    display: flex;
    margin: 5px 5px;
    padding-top: 5px;
    margin-top: 5px;
    align-items: top;
}

.message-container.right {
    justify-content: flex-end;
}

.message-container.left {
    justify-content: flex-start;
}

.message {
    padding: 10px;
    border-radius: 10px;
    max-width: 60%;
}

.message.right {
    background-color: #EB8D42; /* Background color for the user message */
    color: white;
    border-radius: 10px; /* Add rounded edges to sent messages */
    word-wrap: break-word; /* Ensure long words break to avoid overflow */
    word-break: break-word; /* Break long words if necessary */
    overflow-wrap: break-word; /* Ensure the text wraps within the container */
    white-space: pre-wrap; /* Preserve white spaces but allow wrapping */
    max-width: 60%; /* Constrain the width to avoid excessive stretching */
    overflow-x: hidden; /* Hide any horizontal overflow */
}

.message.right p {
    display: inline-block; /* Treat the <p> tag as inline-block */
    margin: 0; /* Remove margin to avoid extra space */
}

.message.left {
    background-color: white; /* Background color for the response */
    color: #545251; /* Text color for the response */
}

.icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    margin-top: 10px;
    align-self: flex-start; /* Align the icon to the top */
}

.chat-input {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    align-items: flex-end; /* Align items (textarea, buttons) to the bottom */
    padding: 10px;
    background-color: #fff;
    z-index: 999;
    box-sizing: border-box;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 50px; /* Make the corners circular */
    margin-right: 10px;
    font-family: 'Quicksand', sans-serif; /* Ensure input uses the font */
    box-sizing: border-box; /* Ensure it does not overflow */
}

.chat-input button {
    padding: 10px 20px;
    background: #EB8D42; /* Primary color for the button */
    color: #545251; /* Text color */
    border: none;
    border-radius: 50px; /* Make the corners circular */
    cursor: pointer;
    font-family: 'Quicksand', sans-serif; /* Ensure button uses the font */
    box-sizing: border-box; /* Ensure it does not overflow */
}

.chat-input button, .chat-input .round-button {
    height: 40px; /* Set height of buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    background-color: #EB8D42; /* Example button background color */
    color: #fff; /* Button text color */
    border: none;
    border-radius: 50px; /* Ensure rounded edges */
    cursor: pointer;
    padding: 10px 20px;
    box-sizing: border-box;
}

.chat-input .round-button {
    width: 40px;
    padding: 0; /* Remove extra padding for the round button */
}

.chat-input textarea {
    flex: 1;
    padding: 8px; /* Adjust padding if necessary */
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px; /* Ensure this matches your overall design */
    line-height: 1.5; /* Line height determines the height of each line */
    box-sizing: border-box;
    resize: none; /* Prevent manual resizing */
    height: 40px; /* Let JavaScript control the height */
    min-height: 40px; /* Initial height matching one line */
    max-height: 120px; /* Maximum height to prevent unlimited growth */
    overflow-y: hidden; /* Hide vertical scrollbar */
}

.chat-input textarea:focus {
    border-color: #e7bc99; /* Change this color to your desired border color */
    outline: none; /* Remove the default outline */
}

/* Modal Styles */
.modal {
    display: none; /* Ensure it is hidden by default */
    position: fixed;
    z-index: 1000; /* Set a high z-index to cover all content */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Ensure gray background */
    justify-content: center; /* Align content to center */
    align-items: center; /* Align content to center */
}

.modal-content {
    background-color: #D9D9D9;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    text-align: center;
    border-radius: 10px;
}

.modal-content button {
    margin: 5px;
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif; /* Ensure button uses the font */
}

#confirm-reset {
    background-color: #EB8D42;
    color: white;
}

#cancel-reset {
    background-color: #ddd;
    color: #545251;
}

/* Add this to your CSS file */
.greeting-text {
    font-size: 22px; /* Enlarge the text */
    font-weight: bold; /* Make the text bold */
    background: linear-gradient(90deg, #ff7e5f, #feb47b); /* Gradient color representing AI */
    -webkit-background-clip: text; /* For Safari/Chrome */
    -webkit-text-fill-color: transparent; /* For Safari/Chrome */
    background-clip: text; /* Standard property */
    text-align: center; /* Left-align the text */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    line-height: 1.2; /* Adjust line height if needed */
    margin-left: 30px; /* Remove default margin */
    margin-right: 30px; /* Remove default margin */
}

/* Add this to your CSS file */
.intro-text {
    text-align: center;
    padding: 10px; /* Remove default padding */
    padding-left: 50px;
    padding-right: 50px;
    font-size: 16px; /* Optional: Adjust the font size as needed */
}

/* Add this to your CSS file */
.install-text {
    text-align: center;
    padding: 10px; /* Remove default padding */
    padding-left: 50px;
    padding-right: 50px;
    padding-top: 20px;
    font-size: 14px; /* Optional: Adjust the font size as needed */
}

.header-link {
    text-decoration: none;
    color: inherit;
    font-size: 26px;
}

@keyframes blink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

.loading-dots {
    display: inline-block;
    font-size: 18px;
    margin-left: 5px;
}

.loading-dots span {
    animation: blink 1.4s infinite both;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}


.mic-content {
    width: 90%;
    height: 70%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Center the waveform and text area */
    /* padding-bottom: 60px;  Add padding to provide space for the send button */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.close-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px; /* Adjust height as needed */
    gap: 4px; /* Add spacing between bars */
    margin-bottom: 20px; /* Add margin to separate from the transcription area */
    display: none; /* Hide by default */
}

.waveform .bar {
    width: 5px;
    height: 40px;
    background-color: #EB8D42;
    animation: wave 1.2s infinite ease-in-out;
}

.waveform .bar:nth-child(1) {
    animation-delay: -1.2s;
}

.waveform .bar:nth-child(2) {
    animation-delay: -1.1s;
}

.waveform .bar:nth-child(3) {
    animation-delay: -1s;
}

.waveform .bar:nth-child(4) {
    animation-delay: -0.9s;
}

.waveform .bar:nth-child(5) {
    animation-delay: -0.8s;
}

@keyframes wave {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

.mic-icon {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#send-audio-button {
    position: absolute; /* Position at the bottom */
    bottom: 20px; /* Adjust to provide space from the bottom */
    width: 50px;
    height: 50px;
    background-color: #EB8D42;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s, transform 0.1s;
}

/* Change background color and slightly scale down when active */
#send-audio-button:active {
    background-color: #d97c39; /* Slightly darker color */
    transform: scale(0.75); /* Slightly smaller */
}

.send-icon {
    width: 24px;
    height: 24px;
    margin: 0;
}

.modal-open {
    overflow: hidden; /* Prevent background scrolling */
}

.round-button {
    width: 40px;  /* Adjust size as needed */
    height: 40px; /* Adjust size as needed */
    background-color: #d3d3d3 !important; /* Gray background with !important */
    border: none;
    border-radius: 50%; /* Make it round */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 10px; /* Add margin */
    padding: 0; /* Remove any padding */
}

#send-button {
    padding: 10px 20px;
    background: #EB8D42; /* Primary color for the button */
    color: #fff; /* White text color */
    border: none;
    border-radius: 50px; /* Make the corners circular */
    cursor: pointer;
    font-family: 'Quicksand', sans-serif; /* Ensure button uses the font */
    box-sizing: border-box; /* Ensure it does not overflow */
}

.transcription {
    width: 80%; /* Full width */
    height: 200px; /* Adjust height as needed */
    margin-bottom: 20px; /* Add margin to separate from the send button */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: 'Quicksand', sans-serif;
    box-sizing: border-box;
}

.dotlottie-loading {
    display: none; /* Hide by default */
}

.dotlottie-listening {
    display: none; /* Hide by default */
}

.dotlottie-speaking {
    display: none; /* Hide by default */
}

.hidden {
    display: none; /* Hide the elements */
    visibility: hidden; /* Ensure they are not visible */
    position: absolute; /* Remove them from the layout flow */
    z-index: -1; /* Send them to the back */
    opacity: 0; /* Make them fully transparent */
    pointer-events: none; /* Prevent any interaction */
}

#connecting-text.blinking-text, 
#listening-text.blinking-text, 
#speaking-text.blinking-text {
    font-size: 18px;
    color: #000000;
    text-align: center;
    margin-top: 10px;
    animation: blinker 1s linear infinite !important;
}

@keyframes blinker {
    80% { opacity: 0.6; }
}

input[type="text"] {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.chat-input input[type="text"] {
    font-size: 16px; /* Ensure minimum font size to prevent zoom */
}

#install-button {
    background-color: #EB8D42; /* Background color of the button */
    color: white; /* Text color */
    padding: 10px 20px;
    border: 2px solid #EB8D42; /* Set the border color */
    border-radius: 10px; /* Optional: Rounded corners */
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
