/* General Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Jost', sans-serif;
}

body {
    display: flex;
    background-color: #f5f5dc;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 60px;
    height: 100vh;
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-grow: 1;
    justify-content: center;
}

.sidebar-icons a {
    display: block;
    margin: 15px 0;
}

.sidebar-icons img {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s, transform 0.3s; /* Smooth transitions */
}

/* Active page styling: Make the icon darker */
.sidebar-icons a.active img {
    filter: brightness(0.4); /* Slightly darker icon for the active page */
}

/* Hover effect: Subtle glow effect on the icon itself */
.sidebar-icons a:hover img {
    transform: scale(1.05); /* Slight zoom on hover */
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5)) brightness(1.3); /* Subtle glow effect */
}

/* Rest of your styles unchanged */
.chat-container {
    margin-left: 60px; /* Aligns with sidebar width */
    width: calc(100% - 60px); /* Adjusted width to remove extra spacing */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100vh;
    overflow-y: hidden;
    background-color: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: scroll; /* Ensure scrollbar is always visible */
    padding-right: 10px; /* Add space to avoid cutting off the scrollbar */
    padding-bottom: 80px; /* Increased padding to add gap after the last message */
}

.chat-message {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

/* AI (left side) styling */
.chat-message.ai {
    justify-content: flex-start;
}

.chat-message.ai .message-bubble {
    background-color: #87CEFA;
}

/* User (right side) styling */
.chat-message.user {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.chat-message.user .message-bubble {
    background-color: #d3d3d3;
    text-align: right;
}

/* General message styling */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
}

.message-bubble {
    padding: 15px;
    border-radius: 15px;
    max-width: 60%;
    font-size: 16px;
    color: black;
}

/* Updated Input Container Styling */
.input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    padding: 10px;
    position: fixed;
    bottom: 20px; /* Positioned a bit higher from the bottom */
    left: 50%;
    transform: translateX(-50%);
    width: 100%; /* Slightly wider */
    max-width: 750px; /* Maximum width */
}

.input-container input[type="text"] {
    flex: 1;
    padding: 15px 50px 15px 20px; /* Adjust padding for button space */
    font-size: 16px;
    border: none;
    color: white;
    background-color: black; /* Black background */
    border-radius: 20px; /* Rounded corners */
    outline: none;
    width: 100%;
}

.input-container button {
    position: absolute;
    right: 25px; /* Adjust the button's position inside input */
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

/* Typing Indicator Styling */
.typing-indicator {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.typing-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #87CEFA;
    border-radius: 50%;
    animation: typing 0.8s infinite;
}

.dot:nth-child(2) {
    animation-delay: 0.2s;
}

.dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

/* Tooltip styling */
.sidebar-icons a {
    position: relative;
}

.sidebar-icons a:hover::after {
    content: attr(data-tooltip); /* Display tooltip text */
    position: absolute;
    left: 57px; /* Position tooltip to the right of the icon */
    top: 50%;
    transform: translateY(-50%);
    background-color: #444; /* Dark background */
    color: #fff; /* White text */
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Soft shadow */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
}

/* Arrow styling */
.sidebar-icons a:hover::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 48px; /* Center the arrow relative to the icon */
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #444; /* Arrow pointing left */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
}

/* Display tooltip and arrow on hover */
.sidebar-icons a:hover::after,
.sidebar-icons a:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Copy Button Styling */
.copy-button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: -4px; /* Adjust positioning if necessary */
}

.copy-button img {
    width: 17px; /* Set the width of the button */
    height: 17px; /* Set the height of the button */
    transition: opacity 0.3s; /* Smooth transition for hover effects */
}

.copy-button:hover img {
    opacity: 0.7; /* Slightly reduce opacity on hover */
}
