html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
}

body {
    min-height: 100vh;
    min-width: 100vw;
}

.chatbot-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    width: 100vw;
    max-width: 100vw;
    background: #fff;
}

.chatbot-header {
    background-color: #004677;
    color: white;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.chatbot-title {
    font-weight: bold;
    font-size: 18px;
    text-align: center;
}

#chatbotReset {
    position: absolute;
    left: 14px;
    background: none;
    border: none;
    cursor: pointer;
}

.clear-chat-icon {
    height: 32px;
    width: 32px;
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #f5f7fb;
}

.chatbot-footer {
    padding: 16px;
    border-top: 1px solid #ccc;
    display: flex;
    gap: 8px;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
}

    .chatbot-footer input {
        flex-grow: 1;
        padding: 10px;
        font-size: 16px;
        border-radius: 7px;
        border: 1px solid #bbb;
        outline: none;
        transition: border 0.2s;
    }

        .chatbot-footer input:focus {
            border: 1.5px solid #004677;
        }

    .chatbot-footer button {
        background-color: #fff;
        border: none;
        cursor: pointer;
    }

    #responseMode {
        font-size: 12px;
        padding: 10px 2px;
        border: 1px solid #bbb;
        border-radius: 6px;
        background: #fff;
        color: #333;
        cursor: pointer;
        flex-shrink: 0;
        width: 82px;
        align-self: stretch;
        box-sizing: border-box;
    }

    .chatbot-footer img {
        width: 26px;
        height: 26px;
    }

.message {
    padding: 12px 18px;
    border-radius: 16px;
    max-width: 98%;
    word-wrap: break-word;
    background-color: #fff;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 1px 4px 0 #00000010;
}

    .message.user {
        background-color: #d2f2ff;
        align-self: flex-end;
    }

    .message.bot {
        background-color: #f1f1f1;
        align-self: flex-start;
    }

    .message.bot ol,
    .message.bot ul {
        margin: 4px 0;
        padding-left: 24px;
    }

    .message.bot li {
        margin-bottom: 4px;
    }

    .message.bot p {
        margin: 4px 0;
    }

.avatar {
    display: block;
    margin: 0 auto 10px auto;
    width: 50px;
    border-radius: 50%;
}

.message a {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: #0078d4;
    text-decoration: none;
    word-break: break-all;
}

    .message a + br {
        display: none;
    }

    .message a:hover {
        text-decoration: underline;
    }

/* Citations styling if used */
.citations {
    font-size: 12px;
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #ddd;
    color: #555;
}

#chatbot-thinking {
    display: flex;
    align-items: center;
    height: 36px;
    margin: 6px 0 0 6px;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    margin: 0 3px;
    border-radius: 50%;
    background: #000;
    opacity: 0.7;
    animation: thinking-bounce 1s infinite both;
}

    .thinking-dot:nth-child(2) {
        animation-delay: 0.15s;
    }

    .thinking-dot:nth-child(3) {
        animation-delay: 0.3s;
    }

@keyframes thinking-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    40% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.thinking-label {
    font-weight: 500;
    color: #004677;
    margin-right: 10px;
    font-family: inherit;
    letter-spacing: 1px;
    font-size: 16px;
}


.typing-ellipsis {
    display: inline-block;
    width: 32px;
}

    .typing-ellipsis span {
        display: inline-block;
        width: 7px;
        height: 7px;
        margin: 0 1px;
        background: #004677;
        border-radius: 50%;
        opacity: 0.8;
        animation: typing-ellipsis 1s infinite;
    }

        .typing-ellipsis span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-ellipsis span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typing-ellipsis {
    0% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-7px);
    }

    60% {
        transform: translateY(0);
    }
}
.thinking-dot-img {
    width: 18px;
    height: 18px;
    margin: 0 3px;
    border-radius: 50%;
    opacity: 0.9;
    animation: thinking-bounce 1s infinite both;
    box-shadow: 0 2px 6px 0 #00000014;
    border: 2.5px solid #004677; /* Blue outline */
    background: #fff; /* Optional: keeps the border visible if PNG has transparency */
}

    .thinking-dot-img:nth-child(2) {
        animation-delay: 0.15s;
    }

    .thinking-dot-img:nth-child(3) {
        animation-delay: 0.3s;
    }

.ai-disclaimer {
    background: #fff3cd; /* soft warning background */
    color: #664d03;
    border: 1px solid #ffe69c;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 8px 8px 12px 8px;
    font-size: 12px;
}

.starter-prompts {
    margin: 0 8px 12px 8px;
}

.starter-title {
    font-size: 12px;
    color: #555;
    margin-bottom: 6px;
}

.starter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-chip {
    border: 1px solid #d0d7de;
    background: #f6f8fa;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

    .prompt-chip:hover {
        background: #eef1f4;
    }


/* Bottom-anchored disclaimer row (sits above the input footer) */
.ai-disclaimer-footer {
    background: #fff3cd;
    color: #664d03;
    border-top: 1px solid #ffe69c;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.3;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-shrink: 0; /* don't let it collapse */
}

    .ai-disclaimer-footer .icon {
        flex: 0 0 auto;
    }

    .ai-disclaimer-footer .text {
        flex: 1 1 auto;
    }

/* Optional: tiny tweak on small screens */
@media (max-width: 480px) {
    .ai-disclaimer-footer {
        font-size: 11px;
        padding: 8px;
    }
}

.message-row {
    display: grid;
    grid-template-columns: auto 1fr; /* avatar | bubble */
    column-gap: 10px;
    align-items: stretch;            /* make avatar match bubble height */
}

/* Transparent PNG-friendly avatar */
.bot-avatar {
    align-self: stretch;   /* fill row height */
    height: 100%;
    width: auto;
    max-width: 128px;       /* cap width so it doesn't get huge */
    object-fit: contain;   /* preserve aspect ratio */
    background: transparent;
    border: none;
    border-radius: 50%;    /* optional circle; remove if you want raw PNG edges */
    image-rendering: auto;
}