:root {
    --clr-body: hsl(0, 0%, 0%);
    --clr-body-depth: hsl(0, 0%, 15%);
    
    --clr-text-primary: hsl(0, 0%, 98%);
    --clr-text-secondary: hsl(0, 0%, 75%);
    --clr-text-tertiary: hsl(0, 0%, 60%);
    
    --clr-accent: hsl(210, 80%, 50%);
}

@font-face {
    font-family: "VKP Sans";
    src: url("assets/fonts/GoogleSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "VKP Sans";
    src: url("assets/fonts/GoogleSans-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "VKP Sans", sans-serif;
    -webkit-tap-highlight-color: transparent;
}
::-webkit-scrollbar {
    display: none;
}
::selection {
    color: var(--clr-body);
    background: var(--clr-text-primary);
}
body {
    background: var(--clr-body);
    color: var(--clr-text-primary);
}
.seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Join Screen */
.join{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
input {
    width: 100%;
    text-align: center;
    background: var(--clr-body);
    color: var(--clr-text-primary);
    font-size: 24px;
    font-weight: 500;
    outline: none;
    border: none;
    padding: 16px;
}
button#joinBtn {
    border: none;
    outline: none;
    padding: 16px 24px;
    border-radius: 500px;
    background: var(--clr-body-depth);
    font-size: 16px;
    font-weight: 500;
    color: var(--clr-text-primary);
    cursor: pointer;
}
input:focus ~ button#joinBtn{
    background: var(--clr-accent);
}


/* Chat Screen (Header) i.e. Room Bar */
.room-bar{
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--clr-body);
    border-bottom: 1px solid var(--clr-body-depth);
    font-size: 14px;
    font-weight: 400;
    color: var(--clr-text-primary);

    .logo{
        font-size: 16px;
        font-weight: 500;
    }

    #text-you{
        color: var(--clr-text-secondary);
    }
}

/* Messages */
.list{
    width: 100%;
    height: calc(100vh - 47px - 80px);
    padding: 16px;
    padding-bottom: calc(80px + 64px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    position: absolute;
    top: 47px;
    z-index: 1;

    .msg{
        width: fit-content;
        min-width: 60px;
        max-width: 80%;
        padding: 12px;
        padding-bottom: 16px;
        border-radius: 20px;
        background: var(--clr-body-depth);
        font-size: 16px;
        font-weight: 400;
        word-wrap: break-word;
        white-space: pre-wrap;
        border-bottom-right-radius: 0;
        position: relative;
    }
    
    .mine{
        align-self: flex-end;
        background: var(--clr-accent);
    }
}

/* timestamp */
.meta{
    font-size: 9px;
    font-weight: 400;
    color: var(--clr-text-tertiary);
    position: absolute;
    bottom: 1.5px;
    right: 3px;
}
.mine .meta{
    color: hsl(210, 80%, 80%);
}

/* Type & Send Message */
.composer{
    width: 100%;
    padding: 16px;
    padding-top: 0;
    padding-bottom: 24px;
    background: var(--clr-body);
    position: absolute;
    bottom: 0;
    z-index: 2;

    & div{
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        height: fit-content;
        border-radius: 28px;
        background: var(--clr-body-depth);
        position: relative;
    }

    & textarea{
        width: 100%;
        padding: 16px;
        padding-left: 20px;
        border-radius: inherit;
        border: none;
        outline: none;
        resize: none;
        align-content: center;
        background: transparent;
        font-size: 16px;
        font-weight: 400;
        line-height: 150%;
        color: var(--clr-text-primary);
        field-sizing: content;
        max-height: 250px;
    }

    & button#send{
        margin: 6px;
        margin-left: 0;
        height: 44px;
        aspect-ratio: 1/1;
        border-radius: 50%;
        border: none;
        outline: none;
        background: var(--clr-accent);
        display: flex;
        align-items: center;
        justify-content: center;

        & svg{
            width: 26px;
            height: 26px;
            fill: var(--clr-text-primary);
        }
    }
}

/* Chat Screen Visibility */
.hidden{
    display: none !important;

}

