:root {
    --text-color: #000;
    --background-color: #efd1af;
    --hover-background-color: #ffd8b0;
    --highlight-color: #ffc181;
    --input-background-color: #ffd8b0;
    --chat-input-background-color: #fff;
    --link-color: #0088c6;
}

body.dark {
    --text-color: #c3c4c5;
    --background-color: #36393e;
    --hover-background-color: #32353b;
    --highlight-color: #49443c;
    --input-background-color: #484b51;
    --chat-input-background-color: transparent;
    --link-color: #49acdd;
}

html {
    height: 100%;
}
body {
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: row;
    font-family: Arial, sans-serif;
    font-size: 12pt;
    height: 100%;
    margin: 0;
}
body.embed {
    font-size: 12px !important;   
}
hr {
    border: 0;
    height: 0;
    border-top: 1px solid rgba(255, 0, 0, 0.5);
    margin: 0 8px;
}
#chatWindow {
    display: flex;
    flex-direction: column;
    flex: 1;
}
#adPanel {
    background-color: var(--background-color);
    overflow-y: scroll;
    transition: width 0.5s;
    width: 200px;
}
#adPanel.embed {
    display: none;
}
#adPanel {
    display: flex;
    flex-direction: column;
}
#adContainer {
    filter: blur(200px);
    transition: filter 0.25s;
}
#hideAdPanel {
    background-color: #ff4c4c;
    color: white;
    cursor: pointer;
    font-weight: bold;
    line-height: 2;
    font-size: 18px;
    text-align: center;
}
input, button {
    background-color: var(--input-background-color);
    border: #000 1px solid;
    color: var(--text-color);
    font-size: 1em;
    padding: 5px;
}
a {
    text-decoration: none;
}
#submitButton, button {
    background-color: #438000;
    color: #fff;
    font-weight: bold;
}
#submitButton:disabled {
    background-color: #7a7a7a;
    color: #bebebe;
}
form {
    margin: 0;
}
#header {
    background: #323232;
    padding: 6px;
    white-space: nowrap;
}
.embed #header, .embed #chanList {
    display: none;
}
#header > a {
    font: normal 150% Century Gothic, Helvetica, Arial, sans-serif;
    color: #fff;
    text-decoration: none;
}
#chatDiv {
    background-color: var(--background-color);
    overflow-y: auto;
    max-height: 100%;
    height: 80vh;
    width: 100%;
    flex-grow: 1;
    position: relative;
}
#chatInput {
    background-color: var(--chat-input-background-color);
    display: flex;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
}
#chatInput > * + * {
    margin-left: 5px;
}
.embed #chatInput {
    padding: 1px;
}
#nickInput {
    width: 15%;
    max-width: 200px;
}
#messageInput {
    display: flex;
    flex-grow: 1;
}
#chanList {
    font-size: large;
    position: absolute;
    top: 46px;
    z-index: 1;
    left: 3px;
}
#chanList > a {
    background-color: #304f0d;
    border: solid 1px black;
    border-radius: 2px;
    color: #fff;
    padding: 2px 5px;
}
#chanList > a[data-current="true"] {
    background-color: #438000;
    box-shadow: 0 0 0 2px #198bf1;
}
.blockUser {
	background: url("images/icons/block.png") no-repeat;
}
.report {
	background: url("report.svg") no-repeat;
}
.report, .blockUser {
    width: 16px;
	height: 12px;
    background-size: contain;
	margin-right: 5px;
	cursor: pointer;
	opacity: 0.67;
    display: none;
}
.message:hover .report, .message:hover .blockUser {
    display: inline-block;
}
#chatDiv[data-chan="0"] .message:not([data-chan="0"]), #chatDiv[data-chan="1"] .message:not([data-chan="1"]) {
    display: none;
}
.message:hover .report:hover {
	opacity: 1;
}
.message {
    display: flex;
    overflow-x: hidden;
    padding: 4px 0;
}
.messageNick {
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
    padding-left: 4px;
}
.messageText {
    overflow-wrap: break-word;
    word-break: break-word;
}
.messageAttachments {
    display: none;
    padding: 2px 5px 2px 5px;
    margin-top: 4px;
}
.messageAttachments img, .messageAttachments video {
    border-radius: 6px;
    cursor: zoom-in;
    max-width:200px;
    max-height: 200px;
    margin-right: 5px;
}
a.imageLink, a.videoLink {
    background-color: green;
    border-radius: 3px;
    padding: 2px;
    color: #c1c1d5;
}
body.showAttachments .messageAttachments {
    display: block;
}
#displayImagesIcon {
    opacity: 0.5;
}
body.showAttachments #displayImagesIcon {
    opacity: 1 !important;
}
a {
    color: var(--link-color);
}
.messageLeft {
    flex-grow: 1;
}
.messageDate {
    color: gray;
    white-space: nowrap;
    text-decoration: none;
    padding-right: 4px;
}
.messageDate::after, .dateYear::after { 
    content: attr(data-content);
}
.message:hover .messageDate {
    color: var(--text-color);
}
.message:hover {
    background-color: var(--hover-background-color);
}
.message.mention, .message.self {
    background-color: var(--highlight-color);
}
#alertDiv, #infoDiv {
    background-color: rgba(212, 0, 0, 0.93);
    color: #fff;
    border-radius: 3px;
    box-shadow: rgba(0, 0, 0, 0.75) 1px 1px 4px;
    font-weight: bold;
    opacity: 0;
    padding: 9px;
    position: fixed;
    left: 50%;
    top: 70%;
    transform: translate(-50%, -70%);
    transition: opacity 0.3s;
    z-index: 2;
}
#infoDiv {
    background-color: rgba(25, 139, 241, 0.93);
    opacity: 1;
    z-index: 1;
}
#loadingImage {
    display: none;
    position: absolute;
    top: 7px;
    right: 7px;
}
#notificationImage {
    display: none;
}
#buttonList {
    right: 225px;
    position: absolute;
    top: 25px;
    z-index: 10;
}
#buttonList > img {
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.5;
    height: 36px;
    box-shadow: 1px 1px 10px 0px rgba(0,0,0,0.75);
}
.embed #buttonList > img {
    top: 5px;
    width: 28px;
    height: 28px;
}
.embed #notificationImage {
    display: none;
}
#historyLink {
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
    line-height: 30px;
}
.unreadMessagesMarker {
	display: flex;
	flex-basis: 100%;
    font-size: 10px;
	align-items: center;
	color: red;
}
.unreadMessagesMarker::before,
.unreadMessagesMarker::after {
	content: "";
	flex-grow: 1;
	background: rgba(255, 0, 0, 0.5);
	height: 1px;
	font-size: 0px;
	line-height: 0px;
	margin: 0px 8px;
}

#stats {
    background-color: black;
    border-radius: 3px;
    color: #00ff00;
    padding: 5px;
    position: absolute;
    right: 5px;
    top: 5px;
    z-index: 1;
}

#uploadImage {
    background-color: var(--input-background-color);
    border: #000 1px solid;
    cursor: pointer;
    font-size: 1em;
    padding: 0px;
    margin: 0 0 0 4px;
    width: 29px;

}

#imageOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .8);
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s;
    z-index: 9999;
    cursor: zoom-out;
}

#imageOverlay.visible {
    visibility: visible;
    opacity: 1;
}
#imageOverlay img.visible, #imageOverlay video.visible {
    display: block;
}

#imageOverlay img, #imageOverlay video {
    display: none;
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
}

#overlayClose {
    position: absolute;
    top: 15px;
    right: 20px;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(0,0,0,.5);
    color: white;

    font-size: 32px;
    line-height: 1;
    cursor: pointer;

    z-index: 1;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Dark Theme */
.dark #header {
    display: none;
}
body.dark {
    font-size: 14px;
}
.dark input, .dark #uploadImage {
    border: none;
    border-radius: 5px;
}
.dark #private {
    opacity: 1;
}
.dark #chanList {
    top: 5px;
}

@media screen and (max-width: 640px) {
    .dateYear, #adPanel {
        display: none !important;
    }
    #buttonList {
        right: 18px;
    }
}
@media screen and (min-width: 641px) {
    /* Scrollbar */
    ::-webkit-scrollbar {
        background-color: #323232;
    }
    ::-webkit-scrollbar-thumb {
        border-radius: 10px;
        border: solid 2px #9E9E9E;
    }
    ::-webkit-scrollbar-thumb:hover {
        background-color: #484b51;
    }
}


