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

:root {
    --bg-base: hsla(212, 0%, 90%);
    --ink: hsla(1, 80%, 47%);
    --ink-700: hsla(212, 3%, 46%);
    --base: hsla(212, 0%, 100%);

    --ink-their: hsla(212, 60%, 98%);
    --bg-their: hsla(212, 80%, 48%);

    --cta: hsla(212, 7%, 20%);
    --online: hsla(125, 60%, 70%);

    --ink-our: hsla(1, 50%, 99%);
    --bg-our: hsla(1, 80%, 48%);
    --border: hsla(212, 4%, 90%);
    --input-border: hsla(212, 4%, 46%);
    /*set base size as 10px*/
    font-size: 0.625em;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

.ink-700,
.mute {
    color: var(--ink-700);
}

.online {
    color: var(--online);
}

.gap-2 {
    gap: 2px;
}
.gap-8 {
    gap: 8px;
}

.gap-16 {
    gap: 16px;
}

.gap-20 {
    gap: 20px;
}

body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    font-family: "Montserrat", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-size: 1.6rem;
}

strong,
b,
.strong {
    font-weight: 600;
}

.font-weight-500 {
    font-weight: 500;
}

.larger {
    font-size: 1.2em;
}

.smaller {
    font-size: 0.8em;
}

.font-size-12 {
    font-size: 1.2rem;
}

.font-size-14 {
    font-size: 1.4rem;
}

.font-size-16 {
    font-size: 1.6rem;
}

.font-size-24 {
    font-size: 2.4rem;
}

main {
    min-height: 100svh;
    box-sizing: border-box;
}

button.plain {
    font: unset;
    line-height: unset;
    color: unset;
    padding: unset;
    border: unset;
    background: unset;
    cursor: pointer;
    text-decoration: unset;
}

button,
.button {
    font-size: 1.6rem;
    line-height: 1;
    color: var(--ink);
    padding: 2px 6px;
    border: 1px solid var(--border);
    background: var(--base);
    cursor: pointer;
    text-decoration: none;
}

button.cta {
    border: 1px solid var(--cta);
    background: var(--cta);
    color: var(--base);
    cursor: pointer;
}

button:not(.plain):hover {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

input {
    line-height: 1;
    padding: 12px 20px;
    border: 1.5px solid var(--input-border);
    border-radius: 32px;
}

.circle-44 {
    padding: 0;
    overflow: clip;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    line-height: 1;
}

.circle-44:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s ease;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-basis-50percent {
    flex-basis: 50%;
}

.flex-grow {
    flex-grow: 1;
}

.flex-align-center {
    align-items: center;
}

.flex-center {
    justify-content: center;
    align-items: center;
}

.width-100percent {
    width: 100%;
    box-sizing: border-box;
}

.media-800-flex {
    display: flex;
    flex-direction: column;
}

@media screen and (min-width: 800px) {
    .media-800-flex {
        flex-direction: row;
    }
}

.bg-base {
    background: var(--bg-base);
}

.mobile {
    padding: 16px;
    border-radius: 32px;
    background: var(--base);
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    margin: 32px;
    max-height: calc(100% - 64px);
}

[class^="icon-"].margin-0:before,
[class*=" icon-"].margin-0:before {
    margin: 0;
}

ul#preview {
    flex-grow: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    flex-direction: column;
    overflow: auto;
}

#preview li {
    padding: 8px 10px;
    margin: 0;
    max-width: 75%;
}

#preview li.media {
    flex-shrink: 0;
    width: 75%;
    line-height: 1;
    padding: 0;
    overflow: clip;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.media img:hover,
.media video:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

li.emoji {
    font-size: 3.4em;
}

li.our {
    border-radius: 36px 12px 32px;
    align-self: flex-start;
    background: var(--bg-our);
    color: var(--ink-our);
}

li.their {
    border-radius: 24px 8px 32px 8px;
    align-self: flex-end;
    background: var(--bg-their);
    color: var(--ink-their);
}

#preview li img,
#preview li video {
    display: block;
    object-fit: scale-down;
    width: 100%;
}

.avatar {
    object-fit: cover;
    width: 100%;
}
