/*

MIT License

Copyright (c) 2022 Anthony Maranto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

/* Make sure floating windows are on top of everything else */
div.jswindow {
	z-index: 10000; /* This should be higher than Leaflet's z-index values */
	border: 3px solid #000000; /* May eventually be gray */
	border-radius: 2px;
	position: absolute;
	background-color: white;
	overflow: hidden; /* Allows the windows to run off the screen, to an extent */
}

/* Ehh, I'll just do it for all windows */
.windowcontent table, .windowcontent th, .windowcontent td {
	border: 1px solid black;
}

/* NOTE: overflow: auto should fix child content rendering outside its parent */

div.titlebar {
	padding-top: 10px;
	padding-bottom: 15px;
	padding-right: 50px;
	padding-left: 50px;
	top: 0px;
	z-index: 10001;
	border-bottom: 1px solid #cccccc;
	background-color: #eeeeee;
	cursor: move;
}

div.windowcontent {
	margin: 10px;
	min-width: 300px;
	min-height: 200px;
	max-width: 600px;
	max-height: 600px;
	overflow: auto; /* Adds a scrollbar when the content is too large */
}

p.titlebartitle {
	margin-top: 0px;
	margin-bottom: 0px;
	text-align: center;
}

a.button, img.button {
	z-index: 11000;
	height: 30px;
	width: 30px;
	line-height: 30px;
	font-size: 22px;
	position: absolute;
	border: 2px solid #000000;
	border-radius: 3px;
	cursor: pointer;
	color: #000000;
	text-decoration: initial;
	text-align: center;
}

a.xbutton {
	right: 0px;
	top: 0px;
	background-color: red;
	margin: 4px;
	background-image: url("images/close-back.svg");
	background-size: cover;
}

iframe.windowiframe {
	width: 100%;
	height: 100%;
}

.inline {
	display: inline;
}

.centeredx {
	margin-left: auto;
	margin-right: auto;
}

div.greyout {
	position: fixed;
	left: 0px;
	top: 0px;
	height: 100%;
	width: 100%;
	background-color: black;
	opacity: 0.5;
	z-index: 9999;
}

/* EditorFactory stuff */

textarea.editorarea {
	width: 100%;
	min-height: 150px;
}

div.editorlist {
	width: 100%;
}

div.editorlistholder {
	width: 100%;
	border: 1-x dotted black;
}

div.editorlistelement {
	
}

.editorbutton {
	position: absolute;
	height: 20px;
	width: 20px;
	line-height: 30px;
	font-size: 22px;
	border: 2px solid #000000;
	border-radius: 3px;
	cursor: pointer;
	color: #000000;
	text-decoration: initial;
	text-align: center;
}

a.addbutton {
	background-color: green;
	background-image: url("images/add.svg");
	background-size: cover;
}

a.removebutton {
	background-color: red;
	background-image: url("images/remove.svg");
	background-size: cover;
}

.editorbutton[disabled] {
	background-color: grey;
}

.editorevents {
	/* Receives editor events that could pertain to it */
}

/* Table editing */

table.editabletable {
	border: 1px solid black;
	border-collapse: collapse;
}

table.editabletable td {
	border: 1px solid black;
	border-collapse: collapse;
}

table.editabletable th {
	border: 1px solid black;
	border-collapse: collapse;
}

td.addrow {
	background-color: lime;
	cursor: pointer;
	font-style: italic;
}

input.rowdeletebtn {
	background-color: red;
}

p.dataresult {
	background-color: lightblue;
	transition: background-color 1s;
}

td.disabled {
	background-color: grey;
}

caption {
	font-style: italic;
}

/* Smart input */

.settingslabel {
	padding-right: 10px;
}

/* Smart sliders */

div.slidercontainer {
	width: 100%;
}

input.slider {
	-webkit-appearance: none; /* also slider-horizontal */
	appearance: none;
	width: 100%;
	height: 25px;
	background-color: #d3d3d3;
	outline: none;
	opacity: 0.7;
	-webkit-transition: 0.2s;
	transition: opacity 0.2s;
}

input.slider:hover {
	opacity: 1;
}

/* Bars */

div.sidebarLeft {
	position: fixed;
	left: -50px;
	top: 0px;
	bottom: 60px;
	width: 60px;
	z-index: 10002;
	background-color: #ffffff;
	border: 1px solid black;
	transition: left 0.2s;
}

div.sidebarLeft:hover {
	left: 0px;
}

.sidebarelement {
	height: 50px;
	width: 50px;
	margin: 5px;
	border: 1px solid black;
	padding: 1px;
	cursor: pointer;
}

.sidebarbutton:hover {
	border: 2px solid green;
	padding: 0px;
}

.disabledbutton {
	height: 50px;
	width: 50px;
	background-color: #888888;
	margin: 5px;
	border: 1px solid black;
	padding: 1px;
	cursor: pointer;
}

.disabledbutton:hover {
	
}

.tooloptions {
	position: fixed;
	right: 0px;
	top: 0px;
	bottom: 60px;
	width: 60px;
	z-index: 10002;
	background-color: #ffffff;
	border: 1px solid black;
}

.tooloptionselement {
	height: 50px;
	width: 50px;
	margin: 5px;
	border: 1px solid black;
	padding: 1px;
	cursor: pointer;
}

.tooloptionselement:hover {
	border: 2px solid green;
	padding: 0px;
}

.taskbarelement {
	height: 50px;
	width: 50px;
	margin: 5px;
	float: left;
	border: 1px solid black;
	cursor: pointer;
	padding: 1px;
}

.taskbarbutton:hover {
	border: 2px solid green;
	padding: 0px;
}

div.barBottom {
	position: fixed;
	left: 60px;
	bottom: 0px;
	right: 0px;
	height: 60px;
	z-index: 10001;
	background-color: #ffffff;
	border: 1px solid black;
}

/* Table listing/searching */

table.tablesearchresults {
	border: 1px solid black;
	border-collapse: collapse;
}

table.tablesearchresults td, table.tablesearchresults th {
	cursor: pointer;
	border: 1px solid black;
}

table.tablesearchresults tr.tablesearchresult:hover {
	border: 4px solid black;
	font-weight: bold;
}

img.refreshbutton {
	margin: auto;
	border: 1px solid black;
	cursor: pointer;
}

img.tabledeletebutton {
	border: 1px solid black;
	cursor: pointer;
}
img.tabledeletebutton:hover {
	filter: invert(0.8);
}

/* Status element */

div.status {
	position: fixed;
	left: 0px;
	bottom: 0px;
	width: 60px;
	height: 60px;
	z-index: 10002;
	background-color: #ffffff;
	border: 1px solid black;
	transition: min-width 0.4s, min-height 0.4s, width 0.4s, height 0.4s, float 0.4s, max-width 0.4s, font-size 0.4s;
	overflow: hidden;
	font-size: 10px;
	/* white-space: nowrap; */
}

div.status p {
	display: inline;	
}

div.status:hover {
	min-width: 60px;
	min-height: 60px;
	max-width: 1000px;
	float: left;
	width: auto;
	height: auto;
	font-size: initial;
	/* overflow: hidden; */
}

/* Hover Info */

div.hoverinfo > * {
	max-width: 900px;
	position: absolute;
	z-index: 4;
	border: 1px solid black;
	width: auto;
	height: auto;
	background: white;
	font-size: initial;
	text-align: left;
}

/* General settings */

.noselect {
	user-select: none;
}

.secretnoselect  {
	user-select: none;
}

.secretnoselect span, .secretnoselect p, .secretnoselect label,
span.secretnoselect, p.secretnoselect, label.secretnoselect {
	cursor: text;
}

/* Table of contents */

div.sidebar {
	position: sticky;
	top: 10px;
	left: 10px;
	padding: 5px;
}

div.tableOfContents {
	border: 2px solid grey;
	background-color: #eeeeee;
}

a.tocItem:visited {
	color: blue;
}

/* Quill modifications */

.ql-editor {
    resize: vertical; 
    overflow-y: scroll;
	min-height: 200px;
	width: 1000px;
}
