﻿body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: #f7f7f8;
    margin: 0;
}

#chatBox {
    background-color: #ffffff;
    border-radius: 8px;
    overflow-y: auto;
}

.message-container {
    display: flex;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in-out;
}

    .message-container.user {
        justify-content: flex-end;
    }

    .message-container.assistant {
        justify-content: flex-start;
    }
    .thinking-dots {
    display: inline-block;
}

.thinking-dots span {
    display: inline-block;
    animation: bounce 1.2s infinite ease-in-out both;
    font-size: 1.4rem;
    line-height: 1;
}

.thinking-dots span:nth-child(1) { animation-delay: 0s; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}


.message-bubble {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
    .message-bubble.assistant {
        background: #f5f5f5;
        padding: 12px;
        border-radius: 8px;
        margin: 4px 0;
        white-space: pre-wrap;
    }

.user .message-bubble {
    background-color: #dcf3ff;
    color: #000;
    border-top-right-radius: 0;
}

.assistant .message-bubble {
    background-color: #f1f1f1;
    color: #000;
    border-top-left-radius: 0;
}

pre code {
    background-color: #2d2d2d;
    color: #f8f8f2;
    padding: 12px;
    display: block;
    border-radius: 8px;
    overflow-x: auto;
}

textarea#userInput {
    font-size: 16px;
    line-height: 1.4;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    width: 100%;
    resize: none;
}

.btn-primary {
    background-color: #10a37f;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

    .btn-primary:hover {
        background-color: #0d8466;
    }

.conversation-link {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 16px;
    color: #1a73e8;
    text-align: left;
    cursor: pointer;
    font-weight: 500;
    display: block;
    width: 100%;
    transition: background-color 0.2s;
}

    .conversation-link:hover {
        background-color: rgba(26, 115, 232, 0.08);
        border-radius: 4px;
    }

    .conversation-link.active {
        background-color: rgba(26, 115, 232, 0.1);
        color: #174ea6;
        font-weight: 600;
        border-radius: 4px;
    }

.new-convo-btn {
    background: none;
    border: 1px solid #1a73e8;
    color: #1a73e8;
    padding: 10px 16px;
    margin-top: 16px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .new-convo-btn:hover {
        background-color: rgba(26, 115, 232, 0.08);
    }

#conversationList li {
    margin-bottom: 6px;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #dc3545; /* Bootstrap danger red */
    font-size: 16px;
    cursor: pointer;
    padding: 4px 6px;
    transition: color 0.2s ease-in-out;
}

    .delete-btn:hover {
        color: #a71d2a;
        transform: scale(1.1);
    }

#conversationList li {
    margin-bottom: 6px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Mobile responsive adjustments */
@media (max-width: 767.98px) {
    .container-fluid {
        flex-direction: column !important;
        position: relative;
    }

    #mobileSidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100%;
        width: 85%;
        max-width: 280px;
        background-color: #fff;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1050;
        transition: left 0.3s ease-in-out;
        border-right: 1px solid #ccc;
        padding: 16px;
        overflow-y: auto;
    }

        #mobileSidebar.show {
            left: 0;
        }

    .sidebar {
        width: 100% !important;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #ccc;
        margin-bottom: 1rem;
    }

    .chat-wrapper {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .message-bubble {
        max-width: 100% !important;
        white-space: normal;
    }

    #chatInputPanel {
        padding: 12px;
        border-top: 1px solid #ddd;
        background-color: #f7f7f8;
    }

    textarea#userInput {
        height: auto;
        font-size: 16px;
        padding: 10px;
    }

    .btn-primary {
        width: 100%;
        margin-top: 8px;
    }

    #status {
        font-size: 14px;
        margin-top: 8px;
        text-align: right;
    }

}
