/* 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); /* Default white icons */
    transition: filter 0.3s, transform 0.3s; /* Smooth transitions */
}

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

/* Updated Hover Effect */
.sidebar-icons a:hover img {
    transform: scale(1.05); /* Slightly enlarge on hover */
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5)) brightness(1.3); /* Subtle glow effect */
}

.content {
    margin-left: 80px;
    width: calc(100% - 80px);
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 20px;
}

.chat-container {
    margin-left: 60px;
    width: calc(100% - 60px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100vh;
    overflow-y: hidden;
    background-color: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: scroll;
    padding-right: 10px;
    padding-bottom: 69px;
}

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

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

.chat-message.ai .message-bubble {
    background-color: #87CEFA;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

/* 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;
    align-self: flex-end;
}

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

/* Adjust the generated image size inside the message bubble */
.message-bubble img {
    min-width: 400px;
    min-height: 400px;
    object-fit: contain;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.message-bubble img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

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

.input-container input[type="text"] {
    flex: 1;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: none;
    color: white;
    background-color: black;
    border-radius: 20px;
    outline: none;
    width: 100%;
}

.input-container button {
    position: absolute;
    right: 25px;
    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);
    }
}

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

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 6px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

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

.sidebar-icons a:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 57px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #444;
    color: #fff;
    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);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1;
}

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

.sidebar-icons a:hover::after,
.sidebar-icons a:hover::before {
    opacity: 1;
    visibility: visible;
}
