html {
	height: auto;
}
body {
	width: 100%;
	height: auto;
	color: var(--black);
	background: gray !important;
	overflow-y: scroll;
	padding-bottom: 50px;
	font-family: "Oswald", sans-serif;
}

input[type="search"] {
	width: 400px;
}

/* Fancy radiobutton/checkbox toggle */
/* Symbols: https://symbl.cc/en/unicode-table/#geometric-shapes */
/* Symbols: https://symbl.cc/en/unicode-table/#geometric-shapes-extended */
.fancy-check .checkbox-state:before {
	font-size: 1.5em;
	line-height: 1;
	height: 1em;
	/* vertical-align: top; */
	content: '✘';
	color: #D33;
	text-shadow: 0 1px 1px rgba(88,88,88,0.3);
}
.maps .fancy-check input:indeterminate ~ .checkbox-state:before,
.maps .fancy-check input[readonly] ~ .checkbox-state:before {
	content: '\f091';
}
.fancy-check input:indeterminate ~ .checkbox-state:before,
.fancy-check input[readonly] ~ .checkbox-state:before {
	content: '\25EA';
	color: #AD3;
}
.fancy-check input:checked ~ .checkbox-state:before {
	content: '✔';
	color: #3C3;
}
.fancy-toggle .checkbox-state {
	display: inline-block;
	width: 30px;
	position: relative;
	height: 1em;
	line-height: 1;
	text-align: left;
	user-select: none;
	margin: 0 0.2em;
}
.fancy-toggle .checkbox-state:before {
	display: inline-block;
	border-radius: 100%;
	height: 0;
	width: 0;
	content: '';
	padding: 6px;
	position: relative;
	background-color: #777;
	vertical-align: top;
	border: 1px solid rgba(100,100,100,0.3);
	z-index: 1;
	left: 0;
	right: calc(100% - 12px);
	top: 50%;
	transform: translateY(-50%);
	transition: left 0.3s, right 0.3s, background-color 0.4s;
}
.fancy-toggle .checkbox-state:after {
	display: inline-block;
	height: 4px;
	width: 100%;
	content: '';
	border-radius: 2px;
	vertical-align: middle;
	position: absolute;
	background-color: #888;
	border: 1px solid rgba(150,150,150,0.2);
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
}
.fancy-toggle input[type="radio"],
.fancy-check input[type="checkbox"],
.fancy-toggle input[type="checkbox"] {
	display: none;
}
.fancy-toggle input:checked + .checkbox-state:before,
input:checked + .fancy-toggle .checkbox-state:before {
	right: 0;
	left: calc(100% - 12px);
	background-color: #6D6;
}
.fancy-toggle input:checked + .checkbox-state:after,
input:checked + .fancy-toggle .checkbox-state:after {
	background-color: #7E7;
}

.fancy-toggle input[disabled] + .checkbox-state:before {
	display: none;
}
.fancy-check input[disabled] + .checkbox-state:before {
	content: '🚫';
	color: #888;
	font-size: 1em;
}

form.inline {
	display: inline;
}
input, select, button {
	min-height: 2em;
	vertical-align: top;
	line-height: 1;
}
textarea {
    text-align: left;
    display: block;
    padding: 0.3em;
    line-height: 1.5em;
    width: 100%;
    margin: 0 auto;
    min-height: 150px;
    overflow: visible;
    resize: vertical;
}

/* STYLESHEET */
.no-server {
    position: sticky;
    top: 52px;
    left: 0;
    right: 0;
    background-color: #C00;
    line-height: 1;
    padding: 5px;
    z-index: 999999;
    text-align: center;
}

.inputs {
	line-height: 1.5em;
}

:root {
	--section-header-height: 40px;
}

.dashboard-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	text-align: center;
	padding: 10px 30px;
	font-size: 20px;
	background-color: rgba(205,205,205,1);
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
}
.dashboard-header button {
	font-size: inherit;
	padding: 0.2em 0.4em;
	min-height: auto;
}
.sections {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	padding-top: 75px;
}
.tally-strip:not(:empty) ~ .sections {
	padding-top: 55px;
	padding-left: 177px;
	position: sticky;
}
.section {
	display: block;
	min-width: 400px;
	max-width: 800px;
	font-size: 20px;
	margin: 0.5em auto;
	border: 1px solid black;
	position: relative;
	background-color: white;
}
.section-header {
	top: 0;
	left: 0;
	right: 0;
	z-index: 99;
	font-weight: bold;
	line-height: var(--section-header-height);
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
}
.section-header label:before {
	content: '';
}
.section-toggle:checked ~ .section-header label:before {
	content: '';
}
.section-header label {
	line-height: 41px;
	flex-grow: 2;
	padding: 0 0.5em;
	background-color: rgba(var(--black-rgb), 0.1);
}
.section-content,
.sub-section-content {
	height: 0;
	opacity: 0;
	padding: 0 0.3em;
	overflow: hidden;
	transition: all 0.5s;
	position: relative;
	z-index: 1;
}
.section-toggle,
.sub-section-toggle {
	display: none;
}
.section-toggle:checked ~ .section-header {
	background-color: rgba(var(--black-rgb), 0.2);
	border-bottom: 1px solid rgba(var(--black-rgb), 0.8);
	position: absolute;
}
.section-toggle:checked ~ .section-content {
	height: auto;
	opacity: 1;
	overflow: visible;
	margin-top: calc(var(--section-header-height) + 0.25em);
	margin-bottom: 0.25em;
	transition: height 0.4s, overflow 1s, opacity 1s;
}
.sub-section-toggle:checked + .sub-section-header + .sub-section-content {
	display: initial;
	opacity: 1;
	overflow: visible;
}

.sub-section-header label:before {
	content: '⮚';
	width: 1em;
	display: inline-block;
}
.sub-section-toggle:checked ~ .sub-section-header label:before {
	content: '⮟';
}

/* debug pre */
#stored-data {
	font-family: monospace;
	text-transform: initial;
	font-size: 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* custom input widths */
input.timeout-duration {
	width: 75px;
}

label {
	display: inline-flex;
	align-items: center;
}
label .label-text { order: 1; padding-right: 0.25em; }
label input, label select { order: 3; }
label button[data-action*="reset"],
label button[data-action*="clear"] { order: 2; }
label button[data-action*="save"] { order: 4; }

/* Interview preview */
.interview-name-preview {
	position: relative;
	display: inline-block;
	padding: 0 0.1em;
}
.interview-name-preview:before {
	content: '\01F3A4';
}
.interview-name-preview:hover .interview-name-display {
	display: flex;
}
.interview-name-display {
	background-color: rgba(var(--black-rgb), 0.9);
	color: var(--white);
	font-family: "Jost", sans-serif;
	font-size: 40px;
	line-height: 50px;
	padding: 0 10px;
	height: 50px;
	min-width: 100px;

	text-align: right;

	display: flex;
	display: none;
	align-items: center;
	justify-content: space-between;

	position: absolute;
	top: 100%;
	left: 0;
	z-index: 999;
}

.interview-name-display img {
	max-height: 40px;
	margin-right: 10px;
	filter: drop-shadow(0px 0px rgba(var(--white-rgb), 1));
}

/* Caster selection */
.caster-nameplates {
	list-style: none;
	padding-left: 0;
	margin: 0;
}

/* Spotlight */
.spotlight-stat-name {
	display: inline-block;
	width: 75px;
}

/* timeout side icons */
.icon.ingame-side:before {
	content: '';
	vertical-align: top;
	background: center no-repeat;
	background-size: contain;
	margin-right: 0.1em;
	width: 1em;
	height: 1em;
	display: inline-block;
	filter: drop-shadow(0 0 0.05em rgba(var(--black-rgb), 1));
	order: 1;
	flex-shrink: 0;
}
.icon.ingame-side.attacker:before,
.icon.ingame-side.attackers:before {
	background-image: url('../img/val_attackers.png');
}
.icon.ingame-side.defender:before,
.icon.ingame-side.defenders:before {
	background-image: url('../img/val_defenders.png');
}
.icon.ingame-side.t:before,
.icon.ingame-side.terrorists:before {
	background-image: url('../img/cs_terrorists.png');
}
.icon.ingame-side.counter-ct:before,
.icon.ingame-side.counter-terrorists:before {
	background-image: url('../img/cs_counter-terrorists.png');
}

/* */
.overlay-graphic-link {
	font-size: 0.9em;
	text-decoration: none;
	vertical-align: top;
}
.overlay-graphic-link:hover,
.section-header .overlay-graphic-link:hover {
	background-color:  rgba(var(--black-rgb), 0.5);
}
.section-header .overlay-graphic-link {
	font-size: 1em;
	padding: 0 0.25em;
	width: 41px;
	text-align: center;
	margin-left: -0.5em;
	margin-right: 0.25em;
	background-color: rgba(var(--black-rgb), 0.3);
}

/* Draggable elements */
.handle {
	cursor: move;
	cursor: -webkit-grab;
}
.handle:before {
	content: '⮁';
	padding: 0 5px;
	vertical-align: top;
}
.sortable-ghost {
	opacity: .5;
}
.sortable-swap-highlight input {
	border-color: rgba(34,36,38,.45);
}

/* Mover Arrows */
.section:first-of-type .mover.up, .section:last-of-type .mover.down {
	color: rgba(var(--black-rgb), 0.25);
	cursor: default;
	background-color: inherit;
}
.section-movers {
	display: flex;
	flex-direction: column;
	flex-wrap: no-wrap;
	text-align: center;
	font-size: 16px;
	line-height: 20px;
	color: rgba(var(--black-rgb), 0.8);
	border-left: 1px solid var(--black);
	align-items: center;
}
.section-movers .mover {
	height: 50%;
}
.mover:before {
	display: inline-block;
	content: '';
	padding: 0 0.2em;
	vertical-align: top;
}
.mover.up:before {
	content: '🠝';
	content: '⮝';
}
.mover.down:before {
	content: '🠟';
	content: '⮟';
}
.section-movers .mover:hover {
	color: var(--black);
	background-color: rgba(var(--black-rgb), 0.1);
	cursor: pointer;
}
.section-movers .mover + .mover {
	border-top: 1px solid var(--black);
}

/* ── Tally strip ─────────────────────────────────────────────────────────
 * Colour = where the graphic's page renders (broadcast tally convention):
 * solid red = program & shown, red border = program & hidden,
 * green = preview/dev browser, grey = page not running. */
.tally-strip {
	position: fixed;
	top: 52px;
	left: 0;
	width: 175px;
	bottom: 0;
	z-index: 998;
	display: flex;
	flex-wrap: no-wrap;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	overflow-y: auto;
	gap: 6px;
	padding: 10px 8px;
	background-color: rgba(185,185,185,1);
	border-bottom: 1px solid rgba(var(--black-rgb), 0.35);
}
.tally-strip:empty {
	width: 0;
	display: none;
}
.tally-btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 7px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	min-height: auto;
	padding: 5px 10px;
	border: 2px solid #777;
	border-radius: 5px;
	background: transparent;
	color: #555;
	cursor: pointer;
	user-select: none;
	flex-grow: 1;
}
.tally-btn .dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #777;
	flex-shrink: 0;
}
.tally-label {
	flex-grow: 1;
	text-align: left;
}
.tally-btn.shown:not(.live) {
	background: rgba(var(--white-rgb), 0.55);
}
.tally-btn.pvw { border-color: #2E8548; color: #205E33; }
.tally-btn.pvw .dot { background: #2E8548; }
.tally-btn.pgm { border-color: #C22; color: #A11; }
.tally-btn.pgm .dot { background: #C22; }
.tally-btn.live {
	background: #C22;
	color: var(--white);
}
.tally-btn.live .dot {
	background: var(--white);
	animation: tally-pulse 1.6s ease-in-out infinite;
}
@keyframes tally-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}
.tally-btn .pin {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.05em;
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 1px 4px;
	opacity: 0.45;
}
.tally-btn .pin:hover { opacity: 0.8; }
.tally-btn.pinned .pin {
	opacity: 1;
	background: rgba(var(--black-rgb), 0.2);
}
.tally-btn.live.pinned .pin { background: rgba(var(--white-rgb), 0.25); }

/* Companion cheat-sheet (generated from the registry) */
.docs {
	margin: 1em;
	font-size: 15px;
}
.companion-table {
	border-collapse: collapse;
	margin-top: 0.5em;
}
.companion-table th,
.companion-table td {
	text-align: left;
	border-bottom: 1px solid rgba(var(--black-rgb), 0.25);
	padding: 2px 10px 2px 0;
}
.companion-table code {
	font-size: 13px;
	user-select: all;
}