html, body {
    height: 100%;
    height: 100dvh;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

#content {
    height: 100vh;
    height: 100dvh;
    background: #F0F1FD;
    position: relative;
    z-index: 1;
}

a:link, a:active, a:visited, a:hover {
    color: #2235DD;
}

.alert {
    display: none;
    width: 100%;
    height: 100%;
    z-index: 9;
}

.alert-content {
    position: absolute;
    overflow: none;
    width: 100%;
    height: 100%;
    background: #00000022;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-inner {
    background: #fff;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 1rem;
}

.statusbar {
    position: absolute;
    display: flex;
    top: 0;
    left: 0;
    background: #555;
    min-height: 2.5rem;
    width: 100%;
    border-bottom: 5px solid #fafafa;
    z-index: 2;
}

#status {
    margin: 0;
    padding: 0;
    font-size: 0.85rem;
}

#close {
    position: absolute;
    top: 7px;
    right: 7px;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

#close img {
    background: #f77;
    width: 1.5rem;
    border-radius: 50%;
}

#close img:hover {
    background: #f00;
}

button#copylink {
    position: absolute;
    top: 7px;
    right: 45px;
    border: 1px transparent;
    background: url("share.svg");
    background-color: #aef;
    background-repeat: no-repeat;
    background-size: 1.0rem;
    background-position: 0.2rem center;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
}

button#copylink:hover {
    background-color: #1df;
}

.container-chat {
    background: #fafafa;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 2rem);
    height: 100dvh;
    max-width: 800px;
    margin: 0 auto;
    padding: 0px;
    overflow-y: auto;
    border-radius: 5px;
}

.container-messages {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column-reverse;
    overflow-y: auto;
    padding: 1rem;
}

p.theirs {
    position: relative;
    display: block;
    clear: both;
    text-align: left;
}

p.theirs a.delete {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: none;
    position: absolute;
    top: 0;
    left: 0;
}

p.mine {
    position: relative;
    display: block;
    clear: both;
    text-align: right;
}

p.mine a.delete {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: none;
    position: absolute;
    top: 0;
    right: 0;
}

a.delete:hover {
    background: #ccc !important;
}

.message {
    background: #ccc;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    max-width: 70%;
    box-shadow: 1px 1px 0px rgba(0,0,0,0.3);
    word-break: break-word;
    white-space: pre-wrap;
    display: inline-block;
    clear: both;
}

.message.theirs {
    background: #aef;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.message.theirs.viewed {
    background: #f4f4f4;
}

.message.mine {
    background: #afe;
    align-self: flex-end;
    border-top-right-radius: 0;
    margin-right: 1px;
}

.message.mine.viewed {
    background: #e8e8e8;
}

.message span.msgfile {
    display: block;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

#connect {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    font-size: 1.4rem;
    animation: blinker 2s linear infinite;
    cursor: pointer;
    z-index: 3;
}
@keyframes blinker {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
}

.waiting {
    background: #fc7;
}

.connected {
    background: #7f7;
}

#messages {
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    z-index: 1;
}

#messages::-webkit-scrollbar {
    display: none;
}

.chat-input {
    display: flex;
    padding: 1rem 0 0.5rem 0;
    border-top: 1px solid #ccc;
}

#messageform {
    display: flex;
    flex: 1;
    padding: 0;
    margin: 0;
}

.chat-input #msg {
    flex: 1;
    padding: 0.5rem;
    border-radius: 5px;
    border: 1px solid #777;
    font-size: 0.85rem;
}

button#file {
    border: 1px transparent;
    background: url("file-earmark-arrow-up.svg");
    background-repeat: no-repeat;
    background-size: 1.7rem;
    background-position: center;
    width: 2.2rem;
    height: 2.2rem;
    position: relative;
    font-size: 1.15rem;
    cursor: pointer;
}

button#file span#fileready {
    display: none;
    position: absolute;
    top: -5px;
    right: 3px;
    font-weight: bold;
    color: #0c0;
}

.attachment {
    height: 1rem;
}

.chat-input input[type=submit] {
    padding: 0.75rem 1.5rem;
    border: none;
    background: #2235DD;
    font-weight: bold;
    font-size: 0.85rem;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
.chat-input input[type=submit]:hover {
    background: #1A2BC6;
}

#new {
    display: flex;
    position: relative;
    height: 100%;
    height: 100dvh;
    justify-content: center;
    align-items: center;
}

#newform {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#newform input[type=submit] {
    padding: 1rem 2rem;
    border: none;
    background: #2235DD;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
#newform input[type=submit]:hover {
    background: #1A2BC6;
}

.enter {
    display: flex;
    position: relative;
    width: 100%;
    height: 100%;
    height: 100dvh;
    justify-content: center;
    align-items: center;
}

.enter a {
    padding: 1rem 2rem;
    border: none;
    background: #2235DD;
    font-weight: bold;
    font-size: 0.9rem;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
}
.enter a:hover {
    background: #1A2BC6;
}
