body {
    background-color: #f8f9fa;
}

.chat-window {
    height: 65vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background-color: #0d6efd;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.model-message {
    background-color: #e9ecef;
    color: #212529;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.error-message {
    background-color: #dc3545;
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

/* For markdown rendering */
.model-message p {
    margin-bottom: 0;
}
.model-message pre {
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}
.model-message code {
    color: #d63384;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.model-message pre code {
    color: inherit;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.overlay.is-open {
    opacity: 1;
    visibility: visible;
}


@media (max-width: 991.98px) {
    .chat-window {
        height: 75vh; /* Adjust height for mobile */
    }

    .settings-drawer {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background-color: #fff;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        overflow-y: auto;
    }

    .settings-drawer.is-open {
        transform: translateX(0);
    }
}
