:root {
    --bg: #f3f3f5;
    --paper: #ffffff;
    --assistant-bg: #e9eaef;
    --user-bg: #ff5c8a;
    --text: #1e1e1e;
    --muted: #777;
    --border: #d9d9d9;
}

/* RESET */

* {
    box-sizing: border-box;
}

/* html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Manrope", sans-serif;
    background: transparent;
}
 */
/* MAIN WRAPPER */

.chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background: #f5f5f7;
}

/* MESSAGE AREA */

.message-list {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* MESSAGE BLOCK */

.message {
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

.message.user {
    align-items: flex-end;
}

.message.assistant {
    align-items: flex-start;
}

/* OPTIONAL LABELS */

.message-meta {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* CHAT BUBBLES */

.message-bubble {
    max-width: 85%;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ASSISTANT */

.message.assistant .message-bubble {
    background: var(--assistant-bg);
    color: var(--text);
    border-top-left-radius: 4px;
}

/* USER */

.message.user .message-bubble {
    background: var(--user-bg);
    color: #fff;
    border-top-right-radius: 4px;
}

/* TYPING INDICATOR */

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 16px;
    margin-bottom: 10px;
}

.typing-indicator[hidden] {
    display: none !important;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #999;
    animation: bounce 1.3s infinite;
}

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

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

/* INPUT AREA */

.composer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: #fff;
}

/* TEXTAREA */

#message-input {
    flex: 1;
    resize: none;
    border: 1px solid #d4d4d4;
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.5;
    min-height: 46px;
    max-height: 120px;
    overflow-y: auto;
}

/* SEND BUTTON */

.primary-button {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 12px;
    background: #ff5c8a;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.primary-button:hover {
    opacity: 0.9;
}

/* SCREEN READER */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

/* ANIMATIONS */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* MOBILE */

@media (max-width: 576px) {

    .message-list {
        padding: 14px;
    }

    .message-bubble {
        max-width: 92%;
        font-size: 13px;
    }

    #message-input {
        font-size: 13px;
    }

    .primary-button {
        width: 42px;
        height: 42px;
    }
}

/* DISCLAIMER */
.chat-disclaimer {
    padding: 4px 12px;
    font-size: 11px;
    line-height: 1.3;
    color: #888;
    background: #f5f5f7;
    border-top: 1px solid #ececec;
    text-align: center;
}