﻿body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f7f7f8;
}

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 50vh;
}

.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.message {
    max-width: 60%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    font-size: 15px;
}

.user-message {
    align-self: flex-end;
    background-color: #10a37f;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message {
    align-self: flex-start;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
    /* Typography */
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
    color: #1f2937;
    letter-spacing: 0.01em;
    /* Spacing */
    padding: 12px 16px;
    max-width: 80%;
    word-wrap: break-word;
    white-space: pre-wrap;
}


/* =========================================
   FILE PROCESSING MESSAGE
   ========================================= */

#loadingMessage {
    align-self: flex-start;
    /* Remove chat bubble styling */
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    /* Remove normal message padding */
    padding: 5px 0 !important;
    /* Keep it compact */
    margin-bottom: 12px;
    max-width: none;
}

.processing-message {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
}

.processing-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #ddd;
    border-top: 3px solid #0078d4;
    border-radius: 50%;
    animation: processing-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.processing-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.processing-status {
    font-size: 13px;
    color: #777;
}

@keyframes processing-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   INPUT
   ========================================= */

.input-container {
    padding: 15px;
    border-top: 1px solid #ddd;
    background: white;
}

.input-box {
    position: relative;
    width: 100%;
}

    .input-box input {
        width: 100%;
        padding: 12px 90px 12px 12px;
        font-size: 14px;
        border-radius: 10px;
        border: 1px solid #ccc;
        outline: none;
    }

    .input-box button {
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background-color: #10a37f;
        color: white;
        border-radius: 8px;
        padding: 8px 12px;
        cursor: pointer;
        font-size: 14px;
    }

        .input-box button:hover {
            background-color: #0e8e6d;
        }


/* =========================================
   UPLOAD BUTTON
   ========================================= */

#uploadButton {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}

    #uploadButton:hover {
        opacity: 0.7;
    }


/* =========================================
   DRAG & DROP
   ========================================= */

.drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 163, 127, 0.1);
    border: 2px dashed #10a37f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #10a37f;
    z-index: 10;
    pointer-events: none;
}


/* =========================================
   INPUT HINT
   ========================================= */

.input-hint {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}
