/* Widget Workspace */
.wgt-space {
	width: inherit;
	height: inherit;
	padding: 1px;
	position: relative;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 12px;
}

#wgtSpaceToolbar {
	width: 100%;
	height: auto;
	border-bottom: 1px solid white;
	background-color: white;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	padding-bottom: 2px;
}

.wgt-hidden {
	display: none;
}

.wgt-hidden.wgt-el-editable {
	display: block;
}

.wgt-hidden.wgt-el-editable .wgt-el-cover {
	opacity: 0.2;
	background: repeating-linear-gradient(
	  45deg,
	  transparent,
	  transparent 3px,
	  #000000 1px,
	  #000000 4px
	);
}

.sln-btn {
	box-shadow: 1px 1px 1px 0px black;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	user-select: none;
}

.sln-btn:active,
.wgt-editor-btn:active {
	position: relative;
	top: 1px;
	left: 1px;
}

.sln-btn:active {
	box-shadow: none;
}

.sln-btn:hover {
	filter: contrast(150%);
}

/* Widget */
.wgt-el {
	box-sizing: border-box;
	position: absolute;
	min-width: 80px;
	min-height: 28px;
	overflow: hidden;
	font-family: 'Arial';
	font-size: 12px;
}

.wgt-el-frame {
	padding: 5px;
	display: block;
	box-sizing: border-box;
	overflow: hidden;
	height: 100%;
}

.wgt-el-cover {
	height: 100%;
	width: 100%;
	position: absolute;
	top: 0;
	left: 0;
	display: none;
	cursor: move;
}

.wgt-el-inner {
	height: 100%;
}

.wgt-el-focused > .wgt-el-frame {
	border: 1px dashed white;
	padding: 4px;
}

.wgt-el-editable .wgt-el-cover {
	display: block;
}

.wgt-el-editable .wgt-el-inner {
	opacity: 0.8;
}

/* JQuery Overrides */

.wgt-el .ui-resizable-handle {
	z-index: auto;
}

.wgt-el .ui-icon-gripsmall-diagonal-se {
	right: 3px;
	bottom: 3px;
	width: 18px;
	height: 18px;
	background-position: -80px -224px;
}

.wgt-el .ui-resizable-e, .wgt-el .ui-resizable-w {
	right: 0;
	width: 10px;
}

.wgt-el .ui-resizable-s {
	bottom: 2px;
}

/* LabelWidget */
.wgt-lbl, .wgt-databox, .wgt-slider {
	background: Gainsboro;
	color: black;
	overflow: hidden;
	border: black solid 1px;
	border-radius: 2px;
	box-sizing: border-box;
	height: 100%;
	padding: 3px;
}

.wgt-slider .wgt-title, .wgt-databox .wgt-title {
	font-weight: bold;
}

/* PushButtonWidget */
.wgt-btn, .wgt-togglebtn {
	height: 100%;
	background: #4857ff;
	color: WhiteSmoke;
	box-sizing: border-box;
	padding: 2px 8px;
	min-width: 40px;
	overflow: hidden;
	border-radius: 4px;
}

/* ToggleButton */
.wgt-center-horizontal {
	display: inline-block;
	width: auto;
	margin: auto;
}

.wgt-center-horizontal > * {
	display: inline-block;
}

.wgt-icon-power {
	width: 13px;
	height: 13px;
	margin-right: 4px;
	color: rgba(0, 0, 0, 0.45);
	vertical-align: text-bottom;
}

.wgt-toggled .wgt-icon-power {
	color: #4ade80;
}

/* DataBoxWidget */
.wgt-text {
	width: 100%;
	margin-top: 1px;
}

/* TitleWidget */
.wgt-title-holder {
	display: flex;
	align-items: center;
	gap: 4px;
	background: Gainsboro;
	font-weight: bold;
	border-bottom: 1px solid #1A1A1A;
	padding: 5px;
}

.wgt-title-holder .wgt-title {
	flex: 1;
}

.wgt-body {
	padding: 5px;
	overflow: hidden;
}

.wgt-titled {
	background: white;
	border: 1px solid #1A1A1A;
}

/* SliderWidget */
.wgt-slider-inner {
	vertical-align: middle;
	height: auto;
	width: auto;
	padding: .5em 1em;
	overflow-x: hidden;
}

.wgt-slider-holder {
	overflow: hidden;
	min-width: 100px;
}

.wgt-slider-inner .wgt-slider-handle {
	overflow: hidden;
	width: auto;
	height: auto;
	display: inline-block;
	font-size: 8px;
	padding: 2px 4px;
	color: #fff;
	text-align: center;
	text-decoration: none;
	background: #000;
	border-radius: 4px;
}

.wgt-slider-lbl {
	width: auto;
	height: 1em;
	line-height: 1em;
	margin-top: .4em;
	padding: 0;
	vertical-align: middle;
	cursor: default;
	user-select: none;
}

.wgt-el-left {
	display: inline-flex;
	justify-content: flex-start;
	text-align: left;
}

.wgt-el-right {
	display: inline-flex;
	justify-content: flex-end;
	margin-left: auto;
	text-align: right;
}

.wgt-slider .wgt-body {
	padding-left: 0px;
	padding-right: 0px;
}

.wgt-slider .ui-slider-handle {
	z-index: inherit;
	top: -.4em;
}

/* Widget Editor */
.wgt-editor {
	position: absolute;
	background-color: #f1f1f1;
	border: 1px solid black;
	border-radius: 4px;
	padding: 4px;
}

.wgt-editor table {
	border-collapse: collapse;
}

.wgt-editor td {
	padding: 3px;
}

.wgt-editor td label {
	margin: 0;
	font-weight: normal;
}

.wgt-editor td:first-child,
.wgt-chart-legend td:first-child {
	text-align: right;
	font-weight: bold;
}

.wgt-series-row {
	padding: 2px 2px 2px 0;
}

.wgt-series-row > * {
	vertical-align: middle;
	display: inline-block;
}

.wgt-series-row > div {
	margin-left: 5px;
}

.wgt-series-columns {
	margin-bottom: 5px;
}

.wgt-editor-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	color: #696969;
	background: white;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	user-select: none;
	box-shadow: 0 0 0 1px #696969;
	border: none;
	height: 1.5em;
	line-height: 1.5em;
}

.wgt-editor-btn:hover {
	box-shadow: 0 0 0 3px #E65F25;
	color: #E65F25;
}

.wgt-editor-disabled {
	pointer-events: none;
}

.wgt-editor-disabled > .wgt-editor-btn,
.wgt-editor-btn.wgt-editor-disabled {
	color: lightGrey;
	box-shadow: 0 0 0 1px lightGrey;
}

.wgt-editor-roundbtn {
	width: 1.5em;
	height: 1.5em;
	border-radius: 1em;
}

.wgt-editor-smallbtn {
	font-size: 10px;
}

.wgt-editor-bigbtn {
	font-size: 18px;
}

.wgt-editor-rrectbtn {
	border-radius: .2em;
	padding: 0 5px;
	color: black;
}

.wgt-editor-btnlabel {
	margin-left: 5px;
}

.wgt-deletebtn,
.wgt-closebtn {
	display: inline-flex;
	margin-left: auto;
}

.wgt-deletebtn {
	margin-top: 10px;
}

.wgt-editor-btnicon {
	pointer-events: none;
	width: 14px;
	height: 14px;
}

.wgt-editor-select {
	display: inline-block;
	position: relative;
}

.wgt-editor-selectcaret {
	margin-left: 5px;
}

.wgt-editor-select ul {
	border-radius: 0;
}

.wgt-editor-select li {
	background: white;
}

.wgt-editor-selectcollapsed .wgt-editor-select-options {
	display: none;
}

input[type="checkbox"] {
	margin-right: 3px;
}

/* ChartWidget */
.wgt-chartWidget {
	width: 200px;
	height: 200px;
}

.wgt-chart-holder {
	min-width: 50px;
	min-height: 50px;
	width: 320px;
	height: 240px;
}

.wgt-chart-holder div {
	z-index: 0;
}

.wgt-chart-legend {
	position: absolute;
	right: 0;
	bottom: 0;
	border: 1px solid black;
	background-color: white;
	padding: 2px;
	font-size: 10px;
	cursor: default;
}

.wgt-chart-legend-color {
	width: 12px;
	height: 12px;
	display: inline-block;
}

.wgt-chart-legend table {
	border-collapse: collapse;
}

.wgt-chart-legend td {
	padding: 1px;
}

#wgtViewmodeBtn {
	margin-left: auto;
}

#wgtDownloadBtn:active, #wgtViewmodeBtn:active {
	transform: translate(1px, 1px);
}

.wgt-tableview {
	display: none;
	border: 1px solid #CCC;
	width: 100%;
	font-weight: normal;
	border-collapse: collapse;
}

.wgt-tableview td,
.wgt-tableview th {
	border: 1px solid #CCC;
	padding: 2px;
}

.wgt-tableview td {
	background-color: #FFF;
	color: #000;
}

.wgt-tableview th {
	background-color: #EEE;
	color: #222;
}

.wgt-tableview thead th {
	padding: 5px 2px;
}

.wgt-tableview thead {
	display: table;
	table-layout: fixed;
}

.wgt-tableview tbody {
	overflow-x: auto;
	overflow-y: scroll;
	height: 150px;
	display: block;
}

.wgt-tableview tr {
	width: 100%;
	text-align: left;
	display: table;
	table-layout: fixed;
}

.wgt-chart.wgt-tablemode .wgt-tableview {
	display: block;
}

.wgt-chart.wgt-tablemode .wgt-chart-holder,
.wgt-chart.wgt-tablemode .wgt-chart-legend {
	display: none;
}

/* dygraph overrides */
.dygraph-legend {
	right: 0;
	left: 0;
	text-align: center;
	font-size: 10px;
	background: transparent;
}

.dygraph-legend > span {
	background: white;
}

.dygraph-label, .dygraph-axis-label {
	user-select: none;
}
