*, *::before, *::after
{
    box-sizing: border-box;
}

:root
{
    --black: black;
    --grey: #444444;
    --grey-light: #bdbdbd;
    --grey-lighter: #e0e0e0;
}

html
{
    font-size: 100%;
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
}

body
{
    margin: 0 auto;
    max-width: 45rem;
}

.chat
{
    margin: 1rem;
    display: flex;
    padding: 1rem;
    border-radius: 0.5rem;
    flex-direction: column;
    border: 1px solid var(--grey-light);
}

.conversation
{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.message
{
    max-width: 25rem;
    padding: 0.75rem;
    margin: 0.5rem 0;
    line-height: 1.25;
    border-radius: 1rem;
    animation: 0.2s slide-in;
    border-bottom-left-radius: 0;
    background: var(--grey-lighter);
    border: 1px solid var(--grey-lighter);
}

.message--answer
{
    border-radius: 1rem;
    background: white;
    align-self: flex-end;
    border-color: var(--black);
    border-bottom-right-radius: 0;
    animation: 0.2s slide-in-right;
}

.answer-options
{
    gap: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    max-width: 40rem;
    margin: 1rem 0 0;
    align-self: flex-end;
    justify-content: flex-end;
}

.btn
{
    line-height: 1;
    color: white;
    cursor: pointer;
    font-size: inherit;
    text-decoration: none;
    border-radius: 10rem;
    font-family: inherit;
    padding: 0.75rem 1rem;
    display: inline-block;
    animation: 0.2s slide-up;
    background: var(--black);
    border: 1px solid var(--black);
    transition: background 0.1s, border-color 0.1s;
}

.btn:hover
{
    background: var(--grey);
    border-color: var(--grey);
}

.loading-indicator,
.loading-indicator::before,
.loading-indicator::after
{
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    background: white;
    border-radius: 1rem;
    display: inline-block;
    border: 1px solid var(--grey-light);
    animation: 0.5s alternate-reverse fading infinite;
}

.loading-indicator
{
    margin: 1rem 1rem;
    position: relative;
}

.loading-indicator::before,
.loading-indicator::after
{
    top: -0.05rem;
    position: absolute;
}

.loading-indicator::before
{
    left: -0.75rem;
    animation-delay: 0.75s;
}

.loading-indicator::after
{
    right: -0.75rem;
    animation-delay: 1.25s;
}

@keyframes slide-in
{
    from
    {
        opacity: 0;
        transform: translateX(-0.5rem);
    }

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

@keyframes slide-in-right
{
    from
    {
        opacity: 0;
        transform: translateX(0.5rem);
    }

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

@keyframes slide-up
{
    from
    {
        opacity: 0;
        transform: translateY(0.5rem);
    }

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

@keyframes fading
{
    from
    {
        background: var(--grey-light);
    }

    to
    {
        background: white;
    }
}