@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#chat-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh; /* THIS IS THE FIX: Use small viewport height */
    display: flex;
    flex-direction: column;
}

#chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: #f3f4f6;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    max-width: 80%;
}

.user-message {
    align-self: flex-end;
    background-color: #3b82f6;
    color: white;
    border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
}

.agent-message {
    align-self: flex-start;
    background-color: #ffffff;
    color: #1f2937;
    border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
    border: 1px solid #e5e7eb;
}

.message-content {
    padding: 0.75rem 1.25rem;
}

.message-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-icon {
    background-color: #2563eb;
    color: white;
    margin-left: 0.75rem;
}

.agent-icon {
    background-color: #e5e7eb;
    color: #4b5563;
    margin-right: 0.75rem;
}

#input-area {
    padding: 1.5rem;
    padding-bottom: 2rem; /* THIS IS THE FIX: Add extra padding to the bottom */
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
}

#chat-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s;
}

#chat-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

#send-button {
    background-color: #3b82f6;
    color: white;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    margin-left: 0.75rem;
    transition: background-color 0.2s;
}

#send-button:hover {
    background-color: #2563eb;
}

.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.typing-dot {
    height: 8px;
    width: 8px;
    background-color: #9ca3af;
    border-radius: 50%;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}
