:root {
    --gray-01: #f2f2f2;
    --gray-02: #d6d6d6;
    --gray-03: #b6b6b6;
    --gray-05: #999;
    --gray-06: #777;
    --gray-07: #555;
    --gray-08: #292929;
    --gray-09: #191919;

    --width-display-message: 90%;
    --width-compose-message: 90%;

    --post-font-size: 16px;
    --post-font-size-url: 14px;
    --compose-font-size: 16px;

    --webpreview-font-size-body: 14px;
    --webpreview-font-size-url: 14px;

    --tray-bg: #ffffff;
    /* --tray-entry-bg: var(--gray-01); */
    /* --tray-entry-bg: #c7ec93; */
    /* --tray-entry-bg: #93b1ec; */
    --tray-entry-bg: color-mix(in srgb, #93b1ec 60%, transparent);

    /* --tray-entry-webview-bg: rgba(var(--gray-08), 0.9); */
    /* --tray-entry-webview-bg: color-mix(in srgb, var(--gray-08) 30%, transparent); */
    --tray-entry-webview-bg: color-mix(in srgb, var(--color-01) 50%, transparent);

    --tray-entry-tag-bg: color-mix(in srgb, var(--gray-08) 20%, transparent);
    --tray-entry-fg: #000000;
    --tray-entry-fg-alt: #191919;
    --shadow-bg: var(--gray-07);
    --color-01: #335599;
    --color-02: #f7d5ea;

    --debug-c-01: #fd440e;
    --debug-c-02: #2ab30e;
    --debug-c-03: #2876b2;
    --debug-c-04: #fc9612;
    --debug-c-05: #551bcc;
    --debug-c-06: #b30f74;
    --debug-c-07: #fde527;
    --debug-c-08: #2b65d9;
    --debug-c-09: #81cb1a;
    --debug-c-01: transparent;
    --debug-c-02: transparent;
    --debug-c-03: transparent;
    --debug-c-04: transparent;
    --debug-c-05: transparent;
    --debug-c-06: transparent;
    --debug-c-07: transparent;
    --debug-c-08: transparent;
    --debug-c-09: transparent;


    --doc-entry-outer-padding: 0.3em;
}

@font-face {
    font-family: 'Gowun';
    src: url('/resources/fonts/Gowun_Dodum/GowunDodum-Regular.ttf');
}
@font-face {
    font-family: 'Lexend';
    src: url('/resources/fonts/Lexend_Deca/LexendDeca-VariableFont_wght.ttf');
}
@font-face {
    font-family: 'Outfit';
    src: url('/resources/fonts/Outfit/Outfit-VariableFont_wght.ttf');
}


@font-face {
    font-family: 'Quicksand';
    src: url('/resources/fonts/Quicksand/static/Quicksand-Light.ttf');
    font-weight: 300;
}
@font-face {
    font-family: 'Quicksand';
    src: url('/resources/fonts/Quicksand/static/Quicksand-Regular.ttf');
    font-weight: 400;
}
@font-face {
    font-family: 'Quicksand';
    src: url('/resources/fonts/Quicksand/static/Quicksand-Medium.ttf');
    font-weight: 500;
}

@font-face {
    font-family: 'Inter';
    src: url('/resources/fonts/Inter/Inter-VariableFont_opsz,wght.ttf');
}

@font-face {
    font-family: 'Onest';
    src: url('/resources/fonts/Onest/Onest-VariableFont_wght.ttf');
}


/*  */

* {
    /* font-family: Segoe UI; */
    /* font-family: Arial,Helvetica,sans-serif; */
    /* font-family: Inter; */
    font-family: Helvetica;
	padding: 0;
	margin: 0;
    /* font-weight: 500; */
}

body {
    background-image: linear-gradient(to bottom right, #99f, #36c);
    margin:0px;
    padding:0px;
    min-width:100%;
    max-width:100%;
    height: auto;
}

#page-container {
  position: relative;
  min-height: 100vh;
  max-height: 100vh;
  /* min-width: 100vw; */
}

#workspace-container {
    position: absolute;
    top: calc(1% + 2.5rem); /* header height */
    left: 50%;
    transform: translateX(-50%);

    /* background: #ffff3f; */
    background: var(--tray-bg);
    border-radius: 1em;
    width: 85vw;
    min-width: 30em;
    max-width: 120em;
    /* padding: 1em 2em 2em 2em; */
    padding: 0.5em;
}

.main-list {
    display:inline;
    /* float:left; */

    /* border: solid 1px black; */
    /* padding: 1px; */
    /* margin: 1px; */
    box-sizing: border-box;

    list-style: inside;
    /* list-style-type: none; */
    line-height: 1.5em;
}


#doc-container {
    /* position: absolute; */
    /* right: calc(0% + 2.5rem); */
    /* top: calc(0% + 2.5rem); */
    /* margin: 1vh auto; */
    /* float: right; */
    /* max-width: 70em; */
    min-width: 25em;
    height: 70vh;
    /* max-height: 80em; */
    border-radius: 0 0 1em 1em;
    background-color: var(--tray-bg);
    overflow-y: auto;   /* scroll when to big */
}
#doc-container-inner {
    margin: 0;
    padding: 1em;
}
#uploadform {
    border-width: 2px 0 0 0;
    border-style: solid;
    border-color: #333 #999 #999 #999;
    /* width: 100%; */
    /* width: 100%; */
    /* overflow: hidden; */
    /* display:inline-block; */
    margin: 0;
    padding: 1em;
    min-height: 5em;
}
.upload-layout-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.combined-post-inputs {
    background-color: var(--tray-bg);
    /* width: 100%; */
    /* padding: 2px; */
}
#drop_zone {
    overflow: hidden;
    /* width: 100%; */
    /* white-space: nowrap; */
}
input[type="file"] {
    display: none;
}
#docUpload-text::placeholder {
    font-style: italic;
}
#upload-container{
    width: var(--width-compose-message);
}
#docUpload-text {
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 6px;
    /* white-space: nowrap; */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    width: 100%;
    box-sizing: border-box;
    font-size: var(--compose-font-size);
    min-height: 4rem;
    padding: 6px 12px;
    cursor: pointer;
}
#docUpload-label {
    margin-top: 8px;
    font-size: 14px;
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    box-sizing: border-box;
    /* display: inline-block; */
    padding: 4px 12px;
    cursor: pointer;
}
#upload-button {
    float:right;
    background-color: #fff;
    border: 1px solid #999;
    border-radius: 6px;
    /* display: inline-block; */
    padding: 6px 12px;
    cursor: pointer;
}
textarea[name=title] {
  resize: none;
}


/* .new-post{ */
/*     display: flex; */
/*     flex-direction: row; */
/* } */

.markzone {
    border-color: black;
    border-style: dashed;
    border-width: 2px;
}


.doc-entry-container {
	background-color: var(--debug-c-09);

}

.doc-entry-container li {
    list-style: none;
    box-shadow: 2px 1px 5px var(--shadow-bg);
}

/* .debug { */
/*     padding: 2px; */
/* } */

.doc-entry-inlist{
    display: flex;
    position: relative;
    width: 100%;
    background-color: var(--debug-c-01);
	box-sizing: border-box;
}
.doc-entry-content{
    display: flex;
	flex: 1 1 auto;
	min-width: 0;
    justify-content: space-between;
    flex-direction: column;
    background-color: var(--debug-c-02);
	width: 100%;
	box-sizing: border-box;
}

.tooltip {
  /* position: relative; */
  /* display: inline-block; */
  /* border-bottom: 1px dotted black; */
  /* cursor: pointer; */
}
.tooltiptext {
  visibility: hidden;
  /* width: 130px; */
  background-color: var(--gray-07);
  color: #fff;
  text-align: center;
  font-size: 12px;
  border-radius: 6px;
  padding: 7px;
  line-height: 1em;
  position: absolute;
  z-index: 1;
  top: -25px;
  white-space: nowrap;
  overflow: visible;
  /* left: 105%; */
}
.tooltip:hover .tooltiptext {
  visibility: visible;
}

.doc-entry-tagview {
	width: 100%;
	box-sizing: border-box;
	/* flex: 1; */
	/* background-color: white; */
	display: flex;
	border-radius: 0.35rem;
    transition-duration: 0.15s;
    transition-delay: 0.5s;
	border-color: var(--gray-05);
	border-style: solid;
	border-width: 1px;
	height: 18px;
    font-size: 12px;

	overflow: hidden; /* rounded corners clips children */
    margin-bottom: 2px;
}
.doc-entry-tagview:hover {
    font-size: 20px;
    transition-duration: 0.15s;
    transition-delay: 0.5s;
	border-radius: 0.65rem;
	height: 36px;
}
.doc-entry-tagview-segment {
	/* border-radius: 0.65rem; */
	border-color: var(--gray-05);
	border-style: solid;
	border-width: 2px;

    background-color: var(--tray-entry-tag-bg);

    flex: 1;
    /* center content */
    display: flex;
    justify-content: center;
    align-items: center;
}

.colorfill-greyout {
  color: transparent;
  font-size: 20px;
  text-shadow: 0 0 0 #29292977;
}
.colorfill-enabled {
  font-size: 20px;
}


.doc-entry-web-preview {
	width: 100%;
	box-sizing: border-box;
	flex: 1;
	background-color: var(--tray-entry-webview-bg);
	display: flex;
	border-radius: 0.65rem;
	border-color: var(--gray-02);
	border-style: solid;
	border-width: 1px;
	height: 96px;
	padding: 6px;

	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}
.doc-entry-web-preview-image{
    background-color: var(--debug-c-02);
}
.doc-entry-web-preview-text{
	width: 100%;
	box-sizing: border-box;
    font-size: var(--webpreview-font-size-body);
	display: flex;
	justify-content: space-between;
    flex-direction: column;
	height: 85px;
	overflow: hidden;
	/* border: 1px solid black; */
	margin-left: 10px;
}

a.webpreview, a:visited.webpreview, a:hover.webpreview, a:active.webpreview {
    text-decoration: none;
    color: inherit;
}

.doc-entry-web-preview-title{
    color: var(--gray-09);
	font-weight: bold;
	line-height: 1.2;
}
.doc-entry-web-preview-description {
    color: var(--gray-8) !important;
    /* color: red !important; */
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2em;
	max-height: calc(1.2em * 3);
	/*  Only works in webkit (not fx not chrome) browsers */
	/* display: -webkit-box; */
	/* -webkit-line-clamp: 3; */
	/* -webkit-box-orient: vertical; */
}
.doc-entry-web-preview-url {
	width: 100%;
	max-width: 100%;
	font-size: var(--webpreview-font-size-body);
	font-style: italic;
	line-height: 1.2;
	color: var(--tray-entry-fg-alt);
	/* display: -webkit-box; */
	-webkit-line-clamp: 1;
	text-decoration: underline;
	/* TODO: line-height is defined 2x times;*/
	line-height: 1.2em;
	max-height: calc(1.2em * 1);
	/* background-color: rgba(255,255,255,0.2); */
	/* border: 1px solid var(--gray-02); */
    padding: 2px 3px 2px 0px;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-all;
	/* INFO: trying to fix overflow of div when url is too long, not working :( */
	overflow-wrap: anywhere;
	white-space: nowrap;
}
.doc-entry-web-preview-image img{
	display: block;
	margin: auto;
}

.doc-entry-type-container a {
    font-size: var(--post-font-size-url);
}
.doc-entry-type-container {
    font-size: var(--post-font-size);
	padding: 5px;
    margin-bottom: 0.4rem;

	/* Break long words */
	word-wrap: break-word;
	overflow-wrap: break-word;
	word-break: break-all;
	white-space: normal;
}
.markdown-list-inner *, .markdown-list-outer * {
	box-shadow: none !important;
	margin-left: 0;
}
.markdown-codeblock {
	min-width: 16rem;
	border-radius: 8px;
	display: block;
	padding: 8px;
}
tt {
	display: inline-block;
	box-decoration-break: clone; /* each line is rendered as its own block, otherwise <br> breaks padding */
	font-family: 'Courier New', Courier, monospace;
	/* background-color: var(--gray-01); */
	background-color: white;
	padding: 2px 4px;
	margin: 8px;
	border-radius: 4px;
	/* width: calc(100% -16px); */
	box-sizing: border-box;
}
/* ul .markdown-list-inner, ul .markdown-list-outer { */
/* 	/1* padding-inline-start: 0px!important; *1/ */
/* 	/1* background-color: darkseagreen; *1/ */
/* } */
.markdown-list-outer li{
	padding-left: 1.4rem;
	margin: 0 0 0 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1.8rem' height='1.8rem' viewBox='0 0 256 256'%3E%3Cpath fill='%23e64cab' d='M128 96a32 32 0 1 0 32 32a32 32 0 0 0-32-32m0 48a16 16 0 1 1 16-16a16 16 0 0 1-16 16'/%3E%3C/svg%3E")
	no-repeat 0 -3px;
	list-style: none;
	/* background-color: #07d5ea!important; */
	/* list-style: inside !important; */
}
.markdown-list-inner li{
	padding-left: 1.4rem;
	margin: 0 0 0 1.2rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1.8rem' height='1.8rem' viewBox='0 0 256 256'%3E%3Cpath fill='%23993372' d='M128 100a28 28 0 1 0 28 28a28 28 0 0 0-28-28m0 48a20 20 0 1 1 20-20a20 20 0 0 1-20 20'/%3E%3C/svg%3E")
	no-repeat 0 -2px;
	list-style: none;
    /* background-color: #07b9ca!important; */
	/* list-style: inside !important; */
}


.doc-entry-files-container{
	margin: 4px 0 0 0;
	display: flex;
}
.doc-entry-files{
	background-color: white;
	border-radius: 0.65rem;
	border: 1px solid var(--gray-02);
	/* flex: 1; */
	padding: 4px;
	max-width: 100%;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}
.doc-entry-file-container{
	border-radius: 6px;
	margin: 4px;
	padding: 4px 6px;
	flex: 0;
	background-color: rgba(35,35,85,0.2);

	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;

	min-width: 120px;
	width: 140px;
	height: 70px;
}
.doc-entry-file-container:hover {
	background-color: rgba(165,165,215,0.1);
}
.doc-entry-file-container > .material-symbols-outlined{
	display: block;
	font-size: 52px;
	color: var(--gray-07);
	/* width: 90%; */
	/* height: 90%; */
}
.doc-entry-file-download {
	text-decoration: none;
	color: inherit !important;
}
.doc-entry-file-name {
	max-width: 100%;
	font-size: 11px;
	overflow: hidden;
	text-overflow: ellipsis;
	/* text-align: left; */
	direction: rtl;
	word-break: keep-all;
    white-space: nowrap;
}
.doc-entry-file-name span{
	unicode-bidi: plaintext;
}
.doc-entry-stats{
    font-size: 11px;
    font-style: italic;
    color: var(--gray-08);
    display: flex;
    justify-content: space-between;
    background-color: var(--debug-c-04);
    user-select: none;
}
.doc-entry-stat-id {
    background-color: var(--debug-c-05);
    margin-left: 1.0em;
}
.doc-entry-stat-date {
    background-color: var(--debug-c-06);
    margin-right: 1.0em;
}
.doc-entry-button {
    /* position: absolute; */
    /* height: 100%; */
    /* justify-content: space-between; */
    display: flex;
    flex-direction: column-reverse;
    padding: 0;
    background-color: var(--debug-c-07);
}

/* .doc-entry-button-del button { */
/*     box-shadow: 1px 1px 1px #444; */
/*     border-width: 0.2px 2px 0.2px 0.2px !important; */
/*     /1* border-width: 2px 0.5px 0.5px 2px !important; *1/ */
/*     box-sizing: border-box; */
/*     border-color: #393939 !important; */
/*     border-style: solid !important; */
/* } */

.doc-entry-button-fav.starred button {
    background-color: var(--gray-07) !important;
}
.doc-entry-button-del button,
.doc-entry-button-fav button
{
    margin-top: 4px;
    margin-left: auto;
    margin-right: auto;
}


.doc-entry {
    color: var(--tray-entry-fg);
    background-color: var(--tray-entry-bg);
    border-radius: 0.65em;
    max-width: var(--width-display-message);
    padding: calc(var(--doc-entry-outer-padding) * 2) var(--doc-entry-outer-padding) var(--doc-entry-outer-padding) calc(var(--doc-entry-outer-padding) * 2);
    /* margin-left: 0.2rem; */
    margin-top: 1.0rem;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}
.doc-entry.doc-type-msg {
    border-color: black;
}
.doc-entry.doc-type-file {
    border-color: blue;
    /* font-size: 10px; */
}
.doc-entry.doc-type-removed {
    border-color: #d96969;
    border-width: 2px;
    border-style:inset;
    padding: 0.5em 1em;
    background-color: #d9696966 !important;
    /* box-shadow: none; */
    color: var(--gray-08);
    /* box-shadow: 2px 2px 1px red inset; */
}
.doc-entry-type-container a {
    color: var(--color-01);
    font-weight: 300;
    font-family: monospace;
}
.doc-entry button {
    display: block;
    align-self: flex-end;
    background-color: var(--tray-entry-bg);
    text-align: center;
    padding: 5px;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    aspect-ratio: 1 / 1;
    border-width: 0;
    color: var(--gray-01);
}
.doc-entry button:hover {
    background-color: var(--gray-03);
    color: var(--gray-03);
}


#footer {
    bottom: 0;
    position: absolute;
    height: 2.5rem;
    background-color: #333333;
    width: 100%;
}
#header {
    top: 0;
    position: absolute;
    height: 2.5rem;
    background-color: #333333;
    width: 100%;
}
#header ul.header {
    line-height: 2.5rem;
    width: 70%;
    margin: auto;
    overflow: hidden;
    list-style-type: none;
}
#header ul.header li {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 0 16px;
    background-color: #333333;
}
#header ul.header li a{
    color: white;
}
#header ul.header li:hover {
    background-color: #222222;
}

footer ul.footer {
    line-height: 2.5rem;
    width: 70%;
    margin: auto;

    /* border: solid 1px black; */
    /* padding: 0px; */
    /* margin: -3em 0 0 0; */
    /* margin: 0; */
    overflow: hidden;

    list-style-type: none;
}
footer ul.footer li {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 0 16px;
    /* margin: 0 16px; */
    background-color: #333333;
}
footer ul.footer li:hover {
    background-color: #111111;
}
