/* General styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #343541;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    color: #d1d5db;
}

/* Registration page styles */
.registration-container {
    background-color: #444654;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-top: 50px;
    margin-bottom: 50px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    max-width: 800px;
}

.registration-container h1 {
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.registration-container p {
    font-size: 16px;
    color: #d1d5db;
    margin-bottom: 30px;
}

/* Intro text styles */
.intro-text {
    font-size: 16px;
    color: #d1d5db;
    margin-bottom: 30px;
    max-width: 700px;
    line-height: 1.6;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}

.registration-container input[type="email"],
.registration-container input[type="password"] {
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    max-width: 400px;
    background-color: #3e3f4b;
    color: #ffffff;
    outline: none;
    margin-bottom: 20px;
}

.registration-container input[type="email"]::placeholder,
.registration-container input[type="password"]::placeholder {
    color: #a1a1aa;
}

.registration-container button {
    padding: 12px 20px;
    background-color: #1f8ecd;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 400px;
}

.registration-container button:hover {
    background-color: #007ab8;
}

/* Error message styles */
.error-message {
    color: #ff4d4f;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Title container */
.title-container {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 20px;
}

.title-container p {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    padding: 10px 0;
}

.title-container h1 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    padding: 10px 0;
}

/* Chat container */
.chat-container {
    margin: 30px auto;
    padding: 20px;
    background-color: #444654;
    border-radius: 8px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 10px;
}

.chat-box {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #343541;
    box-sizing: border-box;
    border-radius: 8px;
    width: 100%;
}

.chat-message {
    margin-bottom: 15px;
    padding: 14px 18px;
    border-radius: 8px;
    word-wrap: break-word;
    font-size: 14px;
    width: auto;
    max-width: 100%; /* Allow messages to take full width */
    box-sizing: border-box;
}

.bot-message {
    background-color: #3e3f4b;
    color: #ffffff;
    align-self: flex-start;
    width: 100%; /* Ensure the bot message takes full width */
}

/* User message aligned to the right */
.user-message {
    background-color: hsl(0, 0%, 31%);
    color: #ffffff;
    align-self: flex-end;
    text-align: left; /* Keep the text aligned to the left */
    width: auto;
    max-width: 75%; /* Limit width to 75% of the container */
    margin-left: auto; /* Ensure it's aligned to the right */
}

.input-group {
    display: flex;
    padding: 10px;
    background-color: #444654;
    border-top: 1px solid #575a65;
    box-sizing: border-box;
    width: 100%; /* Set to full width */
    align-items: center; /* Ensure vertical alignment of input and buttons */
    border-radius: 8px; /* Match the container radius */
}

.input-group input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    width: 100%;
    padding: 3px 6px;
    font-size: 14px;
    border-radius: 4px;
    background-color: #3e3f4b;
    color: #fff;
}

.input-group input[type="text"]::placeholder {
    color: #a1a1aa;
}

.input-group button {
    margin-left: 10px;
    padding: 15px;
    background-color: #1f8ecd;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 10px;
}

.input-group button:hover {
    background-color: #007ab8;
}


#voice-input-btn {
    padding: 10px;
    background-color: #3e3f4b;
    font-size: 14px;
    color: #1f8ecd;
    border: 1px solid #1f8ecd;
    border-radius: 50%;  /* Circular button for a microphone icon */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#voice-input-btn:hover {
    background-color: #1f8ecd;
    color: white;
    transform: scale(1.);  /* Slightly enlarge on hover */
}


/* Feedback group container */
.feedback-group {
    padding: 0;                    /* Remove padding to make it compact */
    text-align: left;
    margin-top: 2px;                /* Smaller margin to bring it closer to the bot response */
    display: inline-flex;
}





/* Feedback button styling */


.feedback-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin: 0 3px;                  /* Reduce space between the buttons */
    color: #8e8e8e;                 /* Subtle color */
    transition: color 0.2s, opacity 0.2s;
    opacity: 0.7;                   /* Subtle opacity */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Feedback button hover effect */
.feedback-button:hover {
    color: #ffffff;                 /* Lighten color on hover */
    opacity: 1.0;
}

/* Font Awesome icons for thumbs */
.feedback-button i {
    font-size: 18px;                /* Set icon size */
}


/* Toggle Switch Styles */
.voice-toggle {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #444654;
    border-top: 1px solid #575a65;
}



.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}


.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;  /* Make it rounded */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}


.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;  /* Make the toggle knob round */
}

input:checked + .slider {
    background-color: #1f8ecd;  /* Blue when enabled */
}

input:checked + .slider:before {
    transform: translateX(26px);
}




.switch-label {
    margin-left: 10px;
    font-size: 14px;
    color: #d1d5db;
}

/* CSS for the loading dots animation */
.typing-indicator {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 20px;
}

.typing-indicator span {
    display: inline-block;
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #888;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    left: 0;
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    left: 12px;
    animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
    left: 24px;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}


/* Responsive adjustments for smaller devices */
@media only screen and (max-width: 600px) {
    /* Ensure the chat and registration containers fit on smaller screens */
    .chat-container, .registration-container {
        width: 90%;
        height: auto;
        padding: 20px;
    }

    /* Adjust chat box for better use of space */
    .chat-box {
        padding: 10px;
    }

    /* Reduce padding and margins for smaller buttons */
    .input-group input[type="text"],
    .input-group button,
    .registration-container input,
    .registration-container button {
        padding: 10px;
        font-size: 14px;
    }
    .feedback-button {
        font-size: 18px;            /* Make buttons slightly smaller on small screens */
        margin: 0 3px;              /* Reduce margin on small screens */
    }
    /* Ensure the SVG icons in the feedback section are appropriately sized */
    .feedback-button svg {
        width: 16px;
        height: 16px;
    }

    /* Adjust heading font size for smaller screens */
    .registration-container h1, .title-container p {
        font-size: 20px;
    }

    /* Adjust text size for better readability */
    .intro-text, .chat-message {
        font-size: 14px;
    }
}

.modal {
    display: none; /* Hide by default */
    position: fixed; /* Stay in place on scroll */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(0, 0, 0, 0.5); /* Black background with transparency */
}

.modal-content {
    background-color: #444654;
    margin: 15% auto; /* Center vertically and horizontally */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 600px;
    text-align: left;
    color: #d1d5db;
}

.modal-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
}

.modal-content ul {
    list-style-type: none;
    padding-left: 0;
}

.modal-content ul li {
    margin-bottom: 10px;
}

.modal-content ul li strong {
    color: #1f8ecd;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
}

#openModal i {
    font-size: 18px; /* Decrease the icon size */
    color: #ffffff; /* Change the icon color to white */
    transition: transform 0.2s ease;
}

#openModal:hover {
    color: #ffffff; /* Keep the hover color as white */
}

#openModal:hover i {
    transform: rotate(15deg); /* Keep the hover rotation effect */
}





/* Ensure the input field and buttons are in one line */
.input-wrapper {
    display: flex;
    align-items: center;
    background-color: #3e3f4b;
    border-radius: 8px;
    padding: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
}

/* Input field styling */
#user-input {
    flex-grow: 1;
    border: none;
    height: 30px;
    border-radius: 5px;
    padding: 10px;
    background-color: #3e3f4b;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

/* Styling for the Send button */
#send-btn {
    background-color: hsl(0, 0%, 38%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 10px; /* Space between input and button */
    transition: background-color 0.3s ease;
}

/* Hover effect for Send button */
#send-btn:hover {
    background-color: #007ab8; /* Lighter blue on hover */
}

/* Styling for the Mic button */
#voice-input-btn {
    background-color: hsl(0, 0%, 38%);
    color: #fdfdfd;
    border: none;
    border-radius: 50%;
    padding: 10px;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Hover effect for Mic button */
#voice-input-btn:hover {
    background-color: #1f8ecd;
    color: white;
    transform: scale(1.1); /* Slight enlarge effect on hover */
}

