/* Reset and basic styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: #1e1e1e;
    color: white;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.chat-container {
    width: 100%;
    height: 100vh;
    background-color: #242424;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.chat-header {
    padding: 8px 8px;
    display: flex;
    align-items: center;
}

.logo {
    background: none;
    color: #b4b8bb;
    font-size: 20px;
}

.title {
    font-weight: bold;
    margin-right: auto;
}

.icons {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.chat-input-container {
    display: flex;
    align-items: center;
    border: none;
    padding: 20px 15px;
    gap: 10px;
    justify-content: center;
    background-color: #242424;
}

input[type="text"] {
    width: 70%;
    padding: 15px 10px;
    align-items: center;
    border: none;
    outline: none;
    background-color: #302f2f;
    color: white;
    border-radius: 20px;
    font-size: 16px;
}

.send-btn {
    padding: 8px 12px;
    background: none;
    color: #b4b8bb;
    border: none;
    cursor: pointer;
    font-size: 24px;
}

.chat-messages {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    list-style-type: none; /* Remove list bullets */
}

/* Custom scrollbar styles */
.chat-messages::-webkit-scrollbar {
    width: 12px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #2b2b2b; /* Darker background for the track */
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: #4f4f4f; /* Darker color for the thumb */
    border-radius: 10px;
    border: 3px solid #2b2b2b; /* Match the track background */
}

.message {
    display: flex;
    align-items: center;
    margin-bottom: 20px; /* Add space between messages */
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 50%; /* Ensure messages are shorter */
    font-size: 1.1rem;
    animation: fadeIn 0.5s;
    word-break: break-word; /* Ensure long words break to fit the container */
}

.user {
    background-color: #3b4c5a;
    color: white;
    align-self: flex-end; /* Align user messages to the right */
    text-align: left; /* Align text within the bubble to the right */
    margin-left: auto; /* Push user messages to the right */
    flex-direction: row-reverse; /* Make user icon appear on the right */
    
}

.bot {
    background-color: #333;
    color: #d9d9d9;
    align-self: flex-start; /* Keep bot messages on the left */
}

.message .icon {
    width: 30px;
    height: 30px;
    background-color: #2986cc;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-right: 10px;
}

.bot .icon {
    background-color: #666;
    margin-right: 10px; /* Remove margin on the right */
    margin-left: 10px; /* Add margin to the left */
    display: none;

}

.user .icon {
    background-color: #2986cc;
    border: none;
    cursor: default;
    margin-left: 10px; /* Add margin to the left */
    margin-right: 0; /* Remove margin on the right */
}

.message-icons {
    display: none;
    margin-top: 5px;
    gap: 5px;
}

.message:hover .message-icons {
    display: flex;
}

.chat-footer {
    background-color: #1e1e1e;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    line-height: 1.3;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Styling for icon buttons */
.icon-btn {
    background-color: #354857;
    border: none;
    padding: 9.5px;
    border-radius: 19%;
    cursor: pointer;
    color: white;
    font-size: 20px;
    transition: background-color 0.3s ease;
}

.icon-btn:hover {
    background-color: #1c5d80;
}

.icon-btn i {
    font-size: 16px; /* Reduce icon size */
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    .chat-input-container input[type="text"] {
        font-size: 14px;
    }

    .bot .icon {
        display: none;

    }
    .message {
        font-size: 0.9rem;
        max-width: 80%; /* Adjust max-width for smaller screens */
    }
    
    .send-btn {
        font-size: 20px;
    }
    
    .chat-header .logo, .chat-header .title {
        font-size: 18px;
    }

    .chat-footer {
        font-size: 10px;
    }

    .bot .icon {
        display: none; /* Hide the bot icon on smaller screens */
    }
}

img {
    border-radius: 13px;
    max-width: 100%;
    height: auto;
}
