@font-face {
    font-family: "SFmono";
    src: url(/Apple/SF-Mono-Regular.otf) format("opentype");
}

:root {
    --blue: blue;
    --pink: #ff91af;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "SFmono";
    text-align: center;
    background: black;
    color: white;
    display: grid;
    grid-template: auto;
    justify-content: center;
    margin: 0px;
}

main {
    width: 100vw;
    height: 100vh;
    max-width: 768px;
    display: grid;
    grid-template: auto auto auto auto auto auto auto auto auto auto / auto;
}

button {
    font-family: 'SFmono';
    background: black;
    color: white;
    width: 30vw;
    max-width: 230.4px;
    height: 12vw;
    max-height: 92.2px;
    border-color: white;
    border-radius: 5px;
    border-width: 2px;
    justify-self: center;
}

p {
    overflow-wrap: break-word;
}

/*msnger.html----------------------------------------*/
/*upper contacts bar*/
#contacts-bar {

    position: fixed;
    background: black;
    width: 100vw;
    height: 20vw;
    max-width: 768px;
    max-height: 153.6px;
    top: 0px;
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
}

#me {
    width: 20vw;
    max-width: 153.6px;
    aspect-ratio: 1;
}
#add {
    width: 20vw;
    max-width: 153.6px;
    aspect-ratio: 1;
}

.contactButton {
    margin: 1.5vw;
    width: 17vw;
    height: 17vw;
    max-width: 130.56px;
    max-height: 130.56px;
    border-width: .9vw;
    border-radius: 8.5vw;
    font-size: 32px;
}

/*lower message form*/
#text-form {
    background: black;

    position: fixed;
    bottom: 0px;

    width: 100vw;
    max-width: 768px;
    height: 10%;
    display: grid;
    grid-area: 1 / 1 / span 3 / span 1;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 90% 10%;

    max-height:100px;

    font-family: "SFmono";
}

#message {
    grid-area: 1 / 1 / span 1 / span 1;

    width: 85vw;
    max-width: 652.8;
    height: 8vw;
    max-width: 652.8px;
    max-height: 61.44px;
    border-radius: 4vw;

    margin: auto;

    background: #242424;
    color: white;

    font-size: max(1em, 16px);
}
#message:focus {
    outline: none;
}

#send {
    grid-area: 1 / 2 / span 1 / span 1;
    translate: -1vw;

    margin:auto;

    width: 8vw;
    max-width: 61.44px;
    margin: 1vw;
    aspect-ratio: 1;
}

/*message-area*/
#message-area {
    grid-area: 1 / 1 / span 10 / span 1;
    width: 100vw;
    max-width: 768px;
    height: calc(100% - 10%);
    overflow: scroll;

    display: grid;
    grid-template: auto / 1fr;
    grid-auto-rows:min-content;
    grid-auto-flow: dense;
}

#invisible-box {
    visibility: hidden;
    min-height: 20vw;
    max-height: 153.6px;
}

#message-area > p{
    box-sizing: content-box;
    margin: 8px;
    padding: 8px;
    max-width: 65vw;
    border-radius: 15px;

    min-height: 0px;
    min-width: none;

    overflow: visible;
    overflow-wrap: break-word;

    text-align: left;
}

.Mine {
    background: var(--blue);
    justify-self: end;
}

.Yours {
    background: #242424;
    justify-self: start;
}

/*back arrow or whatever-----------------*/
.back {
    position: relative;
    top: 0px;
    width: 22vw;
    padding: 5vw;
}

#json {
    overflow-wrap: break-word;
    width: 100vw;
    max-width: 768px;
}

/*scanner----------------------------------------------------------*/
#reader {
    grid-area: 2 / 1 / span 10 / span 1;
    justify-self: center;
    align-self: center;
    width: 95vw;
    max-width: 600px;
    height: 80vh;
}

#whitebox {
    background: white;
    width: 250px;
    height: 250px;

    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: center;
}

/*me----------------------------------------------------------------*/
#colors {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding-bottom: 35px;
}

table {
    padding-bottom: 70px; 
}

tr {
    padding-top: 25px;
    padding-bottom: 35px;
}

.hoverclick:hover {
    cursor: pointer;
}