body {
    margin: 0;
    padding: 0;
    font-family: "Calibri", sans-serif;
    background: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

body.drag-over {
    background-color: rgba(20, 55, 232, 0.05);
    transition: background-color 0.3s ease;
    cursor: copy;
}


.preserve-numbers {
    white-space: nowrap;
    font-family: monospace !important;
}

#botui-app {
    width: 100%;
    height: 100%;
    max-width: 1100px;
    max-height: 600px;
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-family: "Calibri", sans-serif;
}

.assistant-description {
    margin-top: 100px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.assistant-description.hidden {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}

.assistant-description h1 {
    font-size: 26px;
    font-weight: bold;
    margin: 0;
}

.assistant-description h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0;
}

.assistant-description p {
    font-size: 16px;
    color: #555;
    margin-top: 10px;
}

.footer-note {
    color: #555;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-note {
    font-size: medium;
    font-weight: bold;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 0;
}

.footer-note span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.new-chat-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.botui-app-container {
    flex: 1;
    overflow-y: auto;
    width: 100%;
    max-height: 50vh;
    margin-bottom: 10px;
    padding-right: 5px;
}

#botui-app .botui-message-content {
    border-radius: 10px;
    padding: 10px;
    max-width: 98%;
    word-wrap: break-word;
    box-sizing: border-box;
}

#botui-app .botui-message.botui-message-human .botui-message-content {
    background: #daf1ff;
    margin-left: 30px;
    text-align: right;
}

#botui-app .botui-message.botui-message-bot .botui-message-content {
    background: #eee;
    margin-right: 30px;
}

.custom-input-container {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 8px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    min-height: 50px;
}

.file-upload-btn {
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #555;
    padding: 0 10px 0 5px;
    flex-shrink: 0;
}

.custom-input-field {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-size: 16px;
    font-family: "Calibri", sans-serif;
    background: transparent;
    resize: none;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.5;
}

.custom-input-field::-webkit-scrollbar {
    width: 6px;
}

.custom-input-field::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.custom-input-field::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.file-upload-preview {
    position: relative;
    display: inline-block;
    background: #f1f1f1;
    padding: 8px 12px;
    border-radius: 6px;
    margin-right: 10px;
    font-size: 14px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-upload-preview .remove-file {
    position: absolute;
    top: 2px;
    right: 4px;
    background: #ccc;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.file-upload-preview:hover .remove-file {
    display: flex;
}


.file-upload-preview.hidden {
    display: none;
}

.upload-preview-icon {
    width: 24px;
    height: 24px;
    color: #555;
}

.upload-preview-info {
    flex: 1;
    min-width: 0;
}

.upload-preview-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-message {
    background: #f3f3f3;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 30px 8px 0;
    max-width: 80%;
}

.file-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f0fe;
    border-radius: 8px;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.file-type {
    font-size: 12px;
    color: #666;
}

.file-message-text {
    font-size: 14px;
    color: #333;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.send-btn {
    background: #4e8cff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 10px;
}

.send-btn:hover {
    background: #3a7bf0;
}

.send-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    #botui-app {
        padding: 20px 15px;
    }

    .assistant-description h1 {
        font-size: 20px;
    }

    .assistant-description h2 {
        font-size: 16px;
    }

    .assistant-description p {
        font-size: 14px;
    }

    .footer-note {
        font-size: 12px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .custom-input-container {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .custom-input-field {
        width: 100%;
        font-size: 14px;
    }

    .send-btn {
        width: 100%;
        margin-left: 0;
    }

    .file-upload-btn {
        font-size: 20px;
    }

    .botui-app-container {
        max-height: 40vh;
    }
}

#new-chat-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#new-chat-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.new-chat-btn {
    background: #4e8cff;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: #3a7bf0;
}


.new-chat-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}


@media (max-width: 480px) {
    .assistant-description h1 {
        font-size: 18px;
    }

    .assistant-description h2 {
        font-size: 14px;
    }

    .assistant-description p {
        font-size: 13px;
    }

    .send-btn {
        padding: 10px;
        font-size: 13px;
    }

    .file-upload-btn {
        font-size: 18px;
    }
}