/* Desktop */
.chatbot-gif {
    height: 60px;
    vertical-align: sub;
}

#chatContainer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

textarea {
    resize: none;
}

.textarea-wrapper {
    position: relative;
}

.input-container {
    position: relative;
}

#userInput {
    height: 220px;
}

.file-label {
    position: absolute;
    left: 10px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 2;
}

#uploadIcon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#fileName {
    font-size: 14px;
    color: #333;
}

.think-label {
    position: absolute;
    right: 55px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    z-index: 2;
}

.think-label>span {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

#thinkingIcon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

#thinkText {
    font-size: 14px;
    color: #333;
}

#thinkCheck {
    margin: 0;
    cursor: pointer;
}

.thinking-gif {
    width: 18px;
    height: 18px;
    vertical-align: text-bottom;
}

.thinking {
    display: none;
}

.submit-button {
    position: absolute;
    right: 12px;
    bottom: 9px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.submit-button img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.submit-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.user-bubble {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    margin: 0;
    border-radius: 18px 18px 4px 18px;
    max-width: 70%;
    width: fit-content;
    line-height: 1.5;
}

.assistant-bubble {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #222;
    padding: 10px 15px;
    margin: 0;
    border-radius: 18px 18px 18px 4px;
    max-width: 70%;
    width: fit-content;
    line-height: 1.5;
}

.generated-image {
    display: block;
    max-width: 100%;
    width: 320px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    margin-top: 8px;
    cursor: zoom-in;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: zoom-out;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
}

/* Mobile */
@media (max-width: 576px) {
    #userInput {
        height: 160px;
        padding-bottom: 45px;
    }

    .container {
        margin-top: 1.5rem !important;
        padding-left: 12px;
        padding-right: 12px;
    }

    #greetingHeading {
        font-size: 1.5rem;
    }

    #chatContainer {
        gap: 10px;
    }

    .user-bubble,
    .assistant-bubble {
        max-width: 90%;
    }

    .file-label {
        left: 10px;
        bottom: 10px;
    }

    .think-label {
        right: 50px;
        bottom: 10px;
    }

    #thinkText {
        font-size: 13px;
    }

    #thinkingIcon,
    #uploadIcon {
        width: 22px;
        height: 22px;
    }

    .submit-button {
        right: 8px;
        bottom: 6px;
    }

    .submit-button img {
        width: 22px;
        height: 22px;
    }

    #fileName {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}