/*---------------------------------------
CSS for edit backend (dictedit) of
diksionariu.com / diksionario.com
v.042, 2025/02/06

Extends dict.css

Main organization of dictedit:
body
	#ribbon
	#search-container
	{#main-page-block	}  show one of these two
	{#results-container	}
	
CSS Contents:
 ** Color Variables **
 
 (Overrides to:)
	** Global Things **
	** Search Bar **
	** Main Block **
	** Results Block **

 ** Edit **
	** Edit Button Toolbar **
	
 ** Change Log **
 
 ** Mobile Formatting **
 ** Dark Mode Colors **
---------------------------------------*/

/******* Color Variables *******/
:root {
	--diksionariu_main: #8b0000;		/* dark red */
	--diksionariu_lighter: #bb8a8a;		/* dusty rose */
	--diksionariu_highlight: #ffe1e1;	/* light pink */
	--diksionariu_darker: #600;			/* darker red */
	--background_white: white;
	--page_background_black: black;
	--text_black: black;
	--text_white: white;
	--text_bold: black;
	--text_button: white;
	--text_error: #900;					/* medium red */
	--text_minor_gray: #444;			/* dark gray */
	--text_redirect_gray: #666;			/* medium-dark gray */
	--text_gold: darkgoldenrod;
	--non_active_gray: #999;			/* medium gray */
	--placeholder_gray: gray;
	--trim_white: white;
	--block_light_gray: #eee;			/* very light gray */
	--block_dark_gray: #bbb;			/* medium light gray */
	--block_gray_text: gray;
	--visited_link: #600;				/* same as main, darker */
	--markup_link: #8b0000;				/* same as main */
	--markup_external: #600;			/* same as main, darker */
	--search_bar_english: #e7e1e1;		/* light dusty pink */
	--horizontal_separator: silver;
	--fuzzy_bar_color: #8b0000;			/* same as diksionariu_main */
	--fuzzy_bar_gray: #ddd;				/* fairly light gray */
	--fuzzy_match_text: #8b0000;		/* same as diksionariu_main */
	--form_missing_required: yellow;
	--spec_character_button: #f55;		/* bright red */
	--history_new_panel: #efe;			/* very light green */
	--history_new_text: green;			/* regular green */
	--history_new_text_light: #5caa5c;	/* lighter green */
	--history_light_gray: #f9f9f9;		/* very light gray */
}


/******* Global Things *******/
html, body {
	background-color: var(--background_white);
}
.underbody {
	background: linear-gradient(var(--diksionariu_main) 40%, var(--background_white) 40%);
}
.underbody-advanced {
	background: linear-gradient(var(--diksionariu_highlight) 40%, var(--background_white) 40%);
}
.no-show {
	display: none;
}


/******* Search Bar *******/
.entry-english {
	color: var(--diksionariu_darker) !important;
}


/******* Main Block *******/
#main-page-block {
	min-height: calc(100% - 13em);	/*no footer*/
}
#new-entry-button {
	display: inline-flex;
	align-items: center;
	margin: 0 1em;
	padding: 0.25em;
	height: 2.15em;
	background-color: var(--diksionariu_main);
	color: var(--text_button);
	border: 2px solid var(--trim_white);
	border-radius: 0.25em;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	font-size: 1.30em;
	cursor: pointer;
}


/******* Results Block *******/
#results-container {
	min-height: calc(100% - 13em);	/*no footer*/
}
.results-multiple-button {
	background-image: url('/images/edit.svg');
}
.history-link {
	display: block;
}
.history-button {
	position: relative;
	float: right;
	margin: 0;
	padding: 0;
	font-size: 1.5em;
	width: 1.5em;
	height: 1.5em;
	border: none;
	background-color: var(--background_white);
	background-image: url('/images/history.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	z-index: 10;
	cursor: pointer;
	content: ' ';
}
.history-highlight {
	background-color: var(--diksionariu_highlight);
}
.history-entry-header {
	color: var(--text_gold);
	font-weight: bold;
}
.history-entry-new {
	color: var(--text_error);
}
.history-first-entry {
	text-align: center;
	display: inline-block;
	width: 100%;
	flex: auto;
	align-content: center;
	background: var(--history_new_panel);
	color: var(--history_new_text);
}
.history-panels {
	display: flex;
}
.history-row:nth-child(2n) {
	background-color: var(--history_light_gray);
}
.history-edit {
	display: block;
	position: relative;
	width: fit-content;
	height: 4em;
	padding: .5em;
}
.history-edit > a {
	float: left;
	margin-right: 1em;
}
.history-formatted-panel {
	flex: 1;
	display: flex;
}
#results a {
	color: var(--fuzzy_match_text);
}

/****** Hover Preview Popup ********/
#hover-preview-popup a, a:visited {
	color: var(--fuzzy_match_text);
}
#hover-preview-popup .results h3 a, a:hover {
	color: var(--fuzzy_match_text);
}
	
/******* New Entry Choice Page *******/
#new-entry-button-container {
	display: flex;
	gap: 2em;
	margin: 3em;
}
.entry-choice-button {
	flex: 1;
	margin: 1em;
	padding: 1em;
	font-size: 1.15em;
	background: var(--background_white);
	border: 2px solid var(--fuzzy_bar_gray);
	border-radius: 5px;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
.entry-choice-button p {
	color: var(--text_black);
}
.entry-choice-button:hover {
	border: 2px solid var(--diksionariu_main);
	background: var(--history_light_gray);
}
.entry-choice-squib:hover {
	border-style: dashed;
}
.entry-choice-label {
	height: 3em;
	width: 100%;
	margin: 1em 0 0 0;
	background: var(--diksionariu_highlight);
	color: var(--diksionariu_main);
	border: 2px solid var(--diksionariu_main);
	border-radius: 5px;
	font-size: 1.25em;
	cursor: pointer;
	align-content: center;
}
.entry-choice-label-squib {
	background: var(--diksionariu_highlight);
	color: var(--diksionariu_main);
	border: 2px solid var(--diksionariu_main);
}

/******* Edit *******/
.edit-label {
	font-weight: bold;
}
.edit-input {
	width: 100%;
	margin-bottom: 1em;
	font-size: 1.25em;
	color: var(--diksionariu_main);
	background-color: var(--background_white);
}
.edit-hidden {
	display: none;
}
.non-edit-input {
	width: 100%;
	margin-bottom: 1em;
	font-size: 1.25em;
	color: var(--diksionariu_main);
	background-color: #0000;
	border: none;
}
.non-edit-pair {
	margin-bottom: 0 !important;
}
.non-edit-subtext {
	font-size: 0.75em;
	color: var(--non_active_gray);
	font-style: italic;
}
.field-length {
	float: right;
	color: var(--diksionariu_main);
	font-weight: bold;
}
.update-button {
	display: inline-block;
	margin: 0 0 1.5em 0;
	padding: 0.25em;
	background-color: var(--diksionariu_main);
	color: var(--text_button);
	border: none;
	border-radius: 0.25em;
	text-align: center;
	text-decoration: none;
	font-size: 1.5em;
	cursor: pointer;
}
.update-button:active {
	background-color: var(--diksionariu_lighter);
}
.update-button:disabled {
	background-color: var(--diksionariu_lighter);
	cursor: default;
}
#feedback {
	margin-bottom: 2em;
}
.missing-required {
	background-color: var(--form_missing_required) !important;
}
.update-fail {
	background: var(--diksionariu_highlight);
	border: none;
	border-left: 5px solid var(--diksionariu_lighter);
	padding-left: 0.5em;
	font-style: italic;
}
#error-display {
	margin-bottom: 1em;
	font-size: 1.4em;
	background: var(--form_missing_required);
	width: fit-content;
}
.popup-overlay {
	display: block;
	position: fixed;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: #fff9;
}
.popup-helper {
	display: block;
	padding: 4em;
	background: var(--background_white);
	border: 1px solid var(--text_black);
	margin: auto;
	width: 40%;
	min-width: 400px;
	max-width: 600px;
	position: absolute;
	top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#link-overlay {
	z-index: 150;
}
#list-item--remove-popup {
	z-index: 145;
}
.list-item--remove-blocks {
	display: flex !important;
}
.list-item--remove-left {
	font-size: 7em;
	flex: 1;
}
.list-item--remove-right {
	flex: 1;
	align-content: center;
}
#link-helper-button {
	font-size: 1em;
}

/* Edit Squib page formatting */
.squib-form {
	border-left: 5px dotted var(--diksionariu_lighter);
	padding-left: 2em;
}
.squib-optional {
	color: var(--non_active_gray);
}
.squib-optional-summary {
	font-size: 1.25em;
	margin: 1em 0;
}
.squib-field {
	border-left: 2px dotted var(--diksionariu_main);
	padding-left: 1em;
}
.squib-entry--select-button {
	display: inline-block;
	margin: 0 0 1em 0;
	background-color: var(--diksionariu_main);
	color: var(--text_button);
	border: none;
	border-radius: 0.25em;
	text-align: center;
	text-decoration: none;
	font-size: 1.15em;
	cursor: pointer;
}
.squib-entry--select-button:active {
	background-color: var(--diksionariu_lighter);
}
.squib-entry--select-button:disabled {
	background-color: var(--diksionariu_lighter);
	cursor: default;
}

/* Linked Entry overlay */
#linked-entry--overlay {
	display: block;
	position: fixed;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: #fff9;
	z-index: 110;
}
#linked-entry--helper {
	display: flex;
	flex-direction: column;
	padding: 4em;
	background: var(--background_white);
	border: 1px solid var(--text_black);
	margin: auto;
	width: 40%;
	min-width: 400px;
	max-width: 600px;
	height: 65%;
	max-height: 1200px;
	position: absolute;
	top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#linked-entry--search {
	display: flex;
	flex-grow: 1;
	flex-direction: column;
	overflow: scroll;
}
#linked-entry--search-and-dropdown {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
}
#linked-entry--search-bar {
	width: 100%;
	height: 1.5em;
	margin-right: 0;
	border-radius: 0.15em;
	border: solid 2px var(--diksionariu_main);
	color: var(--text_black);
	background-color: var(--background_white);
	font-size: 1.25em;
}
#linked-entry--search-dropdown {
	top: 1.25em;
}
.linked-entry--dropdown-link {
	padding: 0.25em !important;
	cursor: pointer;
}
#linked-entry--results {
	flex-grow: 1;
	overflow: auto;
	margin-top: 1em;
	border-radius: 0.15em;
	border: solid 1px var(--fuzzy_bar_gray);
	background-color: var(--background_white);
	color: var(--text_redirect_gray);
}
.linked-entry--list {
	list-style-position: inside;
	width: 100%;
	padding: 0;
}
.linked-entry--choice {
	width: 100%;
	padding: .5em 1em .5em 2.5em;
	text-indent: -2em;
	cursor: pointer;
}
.linked-entry--choice:nth-child(even) {
	background: var(--history_light_gray);
}
.linked-entry--selected {
	background: var(--diksionariu_highlight) !important;
}
#linked-entry--buttons {
	font-size: 0.8em;
}


/******* Edit Button Bar *******/
#insert-markup-toolbar {
	display: block;
	position: sticky;
	width: 100%;
	top: 1.75em;
	text-align: center;
	height: fit-content;
	background: #4449;
	color: white;
	border: gray;
	z-index: 160;
}
#insert-special, #insert-markup {
	display: inline;
}
#insert-markup {
	margin-left: 2em;
}
.spec-char-button, .markup-button {
	margin: 0.25em 0 0.25em 0.5em;
	font-size: 1.15em;
	background: brown;
	color: white;
	border: 3px solid var(--spec_character_button);
	cursor: pointer;
}
.spec-char-button:nth-of-type(even) {
	margin: 0.25em 0.25em 0.25em 0;
	font-size: 1em;
}
.markup-button {
	background: var(--diksionariu_darker);
}
#insert-bold {
	font-weight: bold;
}
#insert-italics {
	min-width: 1.5em;
}



/******* List Editing ******/
#new-list-button {
	display: inline-block;
	align-items: center;
	margin: 2em 0 1em 0;
	padding: 0.5em;
	height: 2.25em;
	background-color: var(--diksionariu_main);
	color: var(--text_button);
	border: 2px solid var(--block_light_gray);
	border-radius: 0.4em;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	font-size: 1.15em;
	cursor: pointer;
}
#list-metadata--display {
	margin-bottom: 1em;
	padding: .5em 0;
	border: 1px solid var(--placeholder_gray);
	text-align: center;
	background: var(--history_light_gray);
}
.list-metadata--display-container {
	display: flex;
}
.list-metadata--display-subcontainer {
	flex: 1;
	text-align: left;
}
#list-metadata--name-ch {
	font-size: 1.5em;
	font-weight: bold;
}
#list-metadata--name-eng {
	font-size: 1.5em;
}
.list-metadata {
	padding-right: 1em;
	color: var(--diksionariu_darker);
}
div.list-metadata {
	padding: 0 1em 0 3em;
	text-indent: -2em;
}
.list-metadata--summary {
	font-weight: bold;
	color: var(--text_black) !important;
	text-wrap: nowrap;
}
#list-info--overlay {
	z-index: 110;
}
#list-item--overlay {
	z-index: 120;
}

.list-overlay {
	display: block;
	position: fixed;
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	background: #fff9;
}
.list-overlay--container {
	display: flex;
	flex-direction: column;
	position: absolute;
	top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
	width: 80%;
	min-width: 400px;
	max-width: 1000px;
	height: 80%;
	max-height: 1200px;
	padding: 1.5em 0 4em 0;
	background: var(--background_white);
	border: 1px solid var(--text_black);
	overflow: hidden;
}
.list-overlay--subcontainer {
	display: flex;
	flex-direction: row;
	overflow: hidden;
}
.list-overlay--errors {
	background: var(--form_missing_required);
	margin: .5em 0 1.75em 0;
}
.list-overlay--header {
	width: 100%;
	padding-bottom: 0.8em;
	font-size: 1.5em;
	font-weight: bold;
	color: var(--diksionariu_main);
	background: var(--background_white);
	text-align: center;
}
.list-overlay--inner-container {
	height: 100%;
	overflow: auto;
	width: 100%;
	padding: 0 2em 0 4em;
}
.list-overlay--search {
	margin-right: 4em;
	padding: 0;
	background: var(--history_light_gray);
	font-family: monospace;
}
.list-overlay--search-results {
	position: relative;
	width: 100%;
}
.list-overlay--search-category {
	padding: 1em;
	font-size: 1.15em;
	text-align: center;
	font-weight: bold;
	color: var(--block_gray_text);
}
.list-overlay--search-results ul {
	margin: 0;
	padding: 0;
	font-size: 1.15em;
}
.list-overlay--search-results ul > li {
	list-style: none;
	padding: 0.5em 1em;
}
.dropdown-nonlink {
	color: var(--non_active_gray);
}
.dropdown-highlight {
	background-color: var(--form_missing_required);
}
.list-overlay--grouping-container {
	display: flex;
}
.lookup-click {
	margin-bottom: 0;
	border-radius: 2em;
	flex-grow: 1;
}
.list-overlay-add-button {	/* 'Add' button */
	flex: 1;
	margin-left: 0.5em;
	padding: 0 .5em;
	height: 2em;
	border: none;
	border-radius: 2em;
	font-weight: bold;
	font-size: 1em;
	color: var(--text_white);
	background: var(--diksionariu_main);
}
.list-term-buttons {
	margin-bottom: 1em;
}
.list-term-buttons button {
	margin: 0 .25em;
	padding: 0.1em 1.5em 0.1em 0.4em;
	border: none;
	border-radius: 1em;
	font-size: .85em;
	color: var(--text_white);
	background: var(--diksionariu_main);
	white-space: nowrap;
}
.list-term-buttons button::after {
	content: "";
	background-image: url('data:image/svg+xml,<%3Fxml version="1.0" encoding="utf-8"%3F><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 96 96" enable-background="new 0 0 96 96" xml:space="preserve"><polygon fill="%23AAA" points="96,14 82,0 48,34 14,0 0,14 34,48 0,82 14,96 48,62 82,96 96,82 62,48 "/></svg>');
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-left: 0.5em;
	margin-right: -1em;
}
#list-info--list-url-preview {
	margin-bottom: 0.5em !important;
}
.list-url-path {
  flex: 1;
  text-wrap: nowrap;
  padding-top: .05em;
}
.list-info--buttons {
	height: fit-content;
}
.list-item--add-new {
	height: fit-content;
	margin-top: 2em;
	padding: .1em;
}
.list-item--add-new-line {
	background: green;
	border-radius: 2px;
	height: .25em;
	margin-bottom: 1em;
	margin-top: 1em;
}
.list-item--add-new-plus {
	font-weight: bold;
	color: white;
	background: var(--history_new_text_light);
	width: 1.25em;
	height: 1.25em;
	font-size: 1.5em;
	margin-top: -.75em;
	border-radius: 1em;
	text-align: center;
	margin-left: 3em;
	border: 2px solid var(--history_new_text);
	vertical-align: middle;
	display: inline-block;
}
.list-item--add-new:hover .list-item--add-new-line {
  box-shadow: lightgreen 0 0 1px 1px;
}
.list-item--add-new .list-item--add-new-plus {
  box-shadow: var(--text_white) 0 0 1px 4px;
}
#list-item--chart .list-position {
	cursor: grab !important;
}
.list-edit > #list-item--chart a {
	color: var(--fuzzy_match_text);
	cursor: pointer;
}
.list-edit > #list-item--chart tr,
.list-edit > #list-item--chart td {
	cursor: pointer;
	color: var(--fuzzy_match_text);
}
.list-edit > #list-item--chart th:first-child {
	background: none;
	color: initial;
	box-shadow: inset 0 0 0 1px var(--text_black);
}
.search-dropdown.list-item--dropdown {
	font-size: 1.25em;
	background: none;
	border: none;
}
.search-dropdown.list-item--dropdown li {
	padding: 0.25em 1em;
}
.list-item--dropdown-link {
	padding: 0.25em !important;
	cursor: pointer;
}
#list-item--search-links ul > li {
	padding: 0.25em 1em;
}
#list-item--entry-links {
	font-size: 0.8em;
}
#list-item--entry-links li {
	list-style: unset;
	padding-left: 3.5em;
}

.list-item--chart-del {
	background: none;
	border: none;
	width: 2.5em;
}



/******* Change Log ******/
.change {
	font-family: monospace;
}

.change:nth-child(odd) {
	background: var(--fuzzy_bar_gray);
}



/******* Mobile formatting *******/
@media only screen and (max-width: 600px) {
	#search-container {
		padding-top: 3em;
	}
	#entry-button-container {
		position: absolute;
		top: -3em;
		left: -1.3em;
	}
	.history-formatted-panel > .entry {
		padding: .5em !important;
	}
	
	#new-entry-button-container {
		gap: .5em;
		margin: 1em;
	}
	.entry-choice {
		flex: 1;
		margin: .5em;
		padding: .5em;
		font-size: 1em;
		text-align: center;
		border: 2px solid #ffff;
		border-radius: 5px;
		cursor: pointer;
	}
	.entry-choice:hover {
		border: 2px solid var(--diksionariu_main);
		background: var(--history_light_gray);
	}
	.entry-choice-button {
		height: 3em;
		width: 100%;
		margin: 0.5em 0;
		color: var(--diksionariu_main);
		background: var(--diksionariu_highlight);
		border: 2px solid var(--diksionariu_main);
		border-radius: 5px;
		font-size: 1.15em;
		cursor: pointer;
	}
	
	.list-metadata--display-container {
		flex-direction: column;
	}
}
	
	
	
/******* Dark Mode *******/
@media (prefers-color-scheme: dark) {
	:root {
		--diksionariu_main: #782323;		/* dark red */
		--diksionariu_lighter: #bb8a8a;		/* dusty rose */
		--diksionariu_highlight: #881b1b;	/* red-brown */
		--diksionariu_darker: #cbb;			/* light red-gray */
		--background_white: black;
		--page_background_black: black;
		--text_black: #ccc;
		--text_white: black;
		--text_bold: #eee;
		--text_button: #eee;
		--text_error: #dc8c8c;			/* medium red */
		--text_minor_gray: #bbb;		/* dark gray */
		--text_redirect_gray: #bbb;		/* dark gray */
		--non_active_gray: #999;		/* medium gray */
		--placeholder_gray: #aaa;
		--trim_white: #ddd;
		--block_light_gray: #aaa;		/* very light gray */
		--block_dark_gray: #777;		/* medium light gray */
		--block_gray_text: #222;
		--visited_link: #ccf;
		--search_bar_english: #300;		/* very dark red */
		--horizontal_separator: silver;
		--fuzzy_bar_color: #b44646;		/* same as diksionariu_highlight */
		--fuzzy_bar_gray: #555;			/* fairly light gray */
		--fuzzy_match_text: #dcaaaa;	/* light pink */
		--form_missing_required: #00d;	/* strong blue */
		--history_new_panel: #172017;	/* dark dark green */
		--history_new_text: green;
		--history_light_gray: #202020;	/* very dark gray */
	}
	.underbody {
		background: linear-gradient(var(--diksionariu_main) 40%, var(--page_background_black) 40%);
	}
	.underbody-advanced {
		background: linear-gradient(var(--diksionariu_highlight) 40%, var(--page_background_black) 40%);
	}
	.edit-input {
		color: var(--text_black);
	}
	.non-edit-input {
		color: var(--text_black);
	}
	input.edit-input, select.edit-input, textarea.edit-input {
		background-color: #444;
	}
	#add-example {
		background-color: #444;
		border-radius: 0.35em;
	}
	.markup-button {
		background-color: var(--diksionariu_main);
	}
}