/* Copyright: 2boom 2023-25 */
:root {
	--mred: #FF9D9F;
	--myellow: #FFD38C;
	--mgreen: #CBE070;
    --mdarkgreen: #11893A;
    --mdarkred: #C53131;
	--mblue: #9FADE3;
	--mviolet: #AE8FC0;
	--mdarkblue: #0881d8;
	--mbutbkghv: #0056b3;
	--mbutbkgac: #003d7a;
	--mmesborder: #ccc;
    --primary: #00A4E9; /* Blue */
    --success: #00D672; /* Green */
    --warning: #FF6433; /* Orange */
    --error: #FF2337; /* Red */
    --secondary: #F8AE3C; /*Yellow*/
}

:active,
:focus {
	outline: none !important;
}

::-webkit-scrollbar {
	width: 0px;
	background: transparent;
}

@media (prefers-color-scheme: dark) {
	:root {
		--color-scheme-background: #252525;
		--color-scheme-text-color:  #EFEFEF;
		--mapp: #B9B9C8;
        --mmessage: #2b2b2b;
		--mdesc: #B9B9C8;
		--mbkg: #383838;
		--msbkg: #2B2B2B;
		--mhbkg: #454545;
		--mhbor: #FF595E;
		--mborder: #666666;
		--mactive: #B9B9C8;
		--minactive: #FF5C5F;
		--mexited: #F9B236;
		--mmenu: #969696;
		--hoo: #454545;
		--imgbkg: #2B2B2B;
		--mheader: #000000;
		--msearch: #3B3B3B;
		--mplaceholdertext: #C9C9C9;
	}
}

@media (prefers-color-scheme: light) {
	:root {
		--color-scheme-background: #F8F8F8;
		--color-scheme-text-color: #555657;
		--mapp: #313140;
        --mmessage: #e1e1e1;
		--mdesc: #696969;
		--mbkg: #F5F5F5;
		--msbkg: #FAFAFA;
		--mhbkg: #EEEEEE;
		--mhbor: #FF6368;
		--mborder: #CFCFCF;
		--mmenu: #969696;
		--mactive: #5E6E18;
		--minactive: #FF5C5F;
		--mexited: #F9B236;
		--hoo: #FBFBFB;
		--imgbkg: #EBEBEB;
		--mheader: #FFFFFF;
		--msearch: #FBFBFB;
		--mplaceholdertext: #808080;
	}
}

html {
	background: var(--color-scheme-background);
	color: var(--color-scheme-text-color);
}

html,
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
	width: 100%;
	height: 100%;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
}

.MessageBox {
	display: block;
    font-size: 0.9em;
	box-sizing: content-box;
	max-height: 92vh;
	overflow-y: auto;
	margin: 1em auto 1em auto;
	overflow-wrap: break-word;
    padding-bottom: 3px;
	width: 32em;
}

.message {
	padding: 0.1em;
    margin: 0 0.3em;
	word-wrap: break-word;
	width: 100%;
    margin-bottom: 0.1em;
}

.time {
	font-size: 0.9em;
	text-align: left;
	color: var(--mplaceholdertext);
    margin-bottom: 0.1em;
}

@media screen and (max-width: 500px) {
    #footer {
		display: none !important;
	}
    .MessageBox {
        width: 95vw;
        font-size: 0.9em;
    }
    #channelForm, #channelForm select {
        font-size: 1.0em;
    }
}

.copy-btn, .delete-btn {
	background: transparent;
	border: none;
	color: var(--mmenu);
	cursor: pointer;
	padding: 0.2em;
	font-size: 0.9em;
	transition: color 0.2s ease;
}

.copy-btn:hover {
	color: var(--mdarkgreen);
}

.delete-btn:hover {
	color: var(--mdarkred);
}


#channelForm {
    position: fixed;
    font-size: 1.0em;
    min-width: 10em;
    max-width: 30em;
    top: 0;
    right: 0; 
    z-index: 1000; 
    color: var(--color-scheme-text-color);
    padding: 0.6em;
}

#channelForm select {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 30em;
    min-width: 10em;
    margin: 0 auto;
    background-color: var(--mheader);
    color: var(--mactive);
    font-size: 1.0em;
    line-height: 1.5;
    border: 1px solid var(--mborder);
    padding: 5px;
    border-radius: 5px;
    color: var(--mactive);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.2s, background-color 0.2s;
}

#channelForm select,
#channelForm select option {
    background-color: var(--mheader);
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#messageContainer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background-color: var(--color-scheme-background);
}

#messageForm {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 30em;
    margin: 0 auto;
    padding: 0.5em;
}

#messageInputWrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 700px;
    border-radius: 8px;
    padding: 5px;
}

#message {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.2;
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 10px;
    padding-right: 80px; 
    outline: none;
    font-size: 1em;
    resize: none;
    border: 1px solid var(--mborder);
    background-color: var(--mheader);
    color: var(--mactive);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s, background-color 0.2s;
}

#message:focus {
    background-color: var(--mheader);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#sendButton {
    position: absolute;
    right: 9px;
    bottom: 50%;
    transform: translateY(50%);
    background-color: var(--primary);
    border: none;
    border: none;
    border-radius: 5px;
    padding: 8px 16px;
    font-size: 1em;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

#sendButton:hover {
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.2)); 
}

#footer {
    position: fixed;
    right: 2em;
    bottom: 0;
    width: 100%;
    text-align: right;
    height: 26px;
    font-size: 0.8em;
    z-index: 1000;
    color: var(--mborder);
    background-color: transparent; 
}

#selectChannel, #addChannel, #removeChannel, #toTop, #toBottom, #toggleMessageForm {
    position: fixed;
    right: 1em;
    width: 2.5em;
    height: 2.5em;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    z-index: 1000;
}

#selectChannel {
    bottom: 20.5em;
    background-color: var(--warning);
}

#addChannel {
    bottom: 17.5em;
    background-color: var(--secondary);
}

#removeChannel {
    bottom: 14.5em;
    background-color: var(--error);
}

#toTop {
    bottom: 11em;
    background-color: var(--success);
}

#toBottom {
    bottom: 8em;
    background-color: var(--success);
}

#toggleMessageForm {
    bottom: 4.5em;
    background-color: var(--primary);
}

#toTop:hover, #toBottom:hover, #toggleMessageForm:hover, #selectChanne:hover, #scrollControls button:hover, #removeChannel button:hover, #addChannel button:hover{
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.2)); 
    transform: translateY(-2px);
}

#scrollControls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    flex-direction: row;
    gap: 10px;
}

.alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--error);
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: none;
    animation: fadeIn 0.3s ease-out, fadeOut 0.3s ease-in 3s;
}

.alert.success {
    background-color: var(--success);
}

.alert.warning {
    background-color: var(--warning);
}

.alert.info {
    background-color: var(--primary);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.confirm, #addChannelModal {
    position: fixed;
    top: 10em;
    left: 50%;
    width: 18em;
    transform: translate(-50%, -50%);
    border: 1px solid var(--mborder);
    background-color: var(--color-scheme-background);
    color: var(--mapp);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: none;
    z-index: 1001;
}

.confirm-content {
    padding: 8px;
}

.confirm button, #addChannelModal button {
    margin: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

#confirmYes, #addConfirm {
    background-color: var(--success);
    color: white;
}

#confirmNo, #addCancel {
    background-color: var(--error);
    color: white;
}

#addChannelModal input {
    width: 90%;
    padding: 8px;
    margin: 10px 0;
    border: 1px solid var(--mborder);
    border-radius: 5px;
    background-color: var(--mheader);
    font-size: 1em;
    color: var(--color-scheme-text-color);
}

html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, figure, figcaption, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    border: 0;
    font-size: 100%;
    vertical-align: top;
}
