html, body {
   	width: 100%;
    height: 100%;
    background: #393939;
    margin: 0;
    box-sizing: border-box;
}

body {
	display: flex;
    flex-direction: column;
    gap: 1ch;
    padding: 1ch;
}

td.editor-sequencer-toggle {
  position: relative;
  padding: 0;
  height: 25px;
  cursor: pointer;
  min-width: 1ch;
}

input[type="checkbox"].editor-sequencer-toggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

td:has(input[type="checkbox"]:checked:not(:disabled)).editor-sequencer-toggle-decoration {
    background-color: #fdda99;
}

td:has(input[type="checkbox"]:not(:checked):not(:disabled)).editor-sequencer-toggle-decoration {
    background-color: #ac5f00;
}

td:has(input[type="checkbox"]:disabled).editor-sequencer-toggle-decoration {
    visibility: hidden;
}

td:has(input[type="checkbox"]:checked).editor-sequencer-toggle-drum {
    background-color: lightgreen;
}

td:has(input[type="checkbox"]:not(:checked)).editor-sequencer-toggle-drum {
    background-color: green;
}

input[inputmode="numeric"]::-webkit-outer-spin-button, input[inputmode="numeric"]::-webkit-inner-spin-button, .score-sequencer-option-box {
    -webkit-appearance: none;
    margin: 0;
}

input[type="numeric"], .score-sequencer-option-box {
	-moz-appearance: textfield;
}

td.editor-sequencer-subdivision-control {
    position: relative;
    padding: 0;
    height: 25px;
}

input[inputmode="numeric"].editor-sequencer-subdivision-control {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

input[inputmode="numeric"].editor-sequencer-subdivision-control, .score-sequencer-option-box {
  border: none;
  background-color: lightgray;
  text-align: center;
  padding: 0px;
}

.score-sequencer-option-box {
  border-radius: 0.5ch;
}

.editor-sequencer-table tr:first-child th + td input {
	border-top-left-radius: 0.5ch;
}

.editor-sequencer-table tr:first-child td:last-child input {
	border-top-right-radius: 0.5ch;
}

.editor-sequencer-table tr:last-child th + td {
	border-bottom-left-radius: 0.5ch;
}

.editor-sequencer-table tr:last-child td:last-child {
	border-bottom-right-radius: 0.5ch;
}

body {
    position: absolute;
    box-sizing: border-box;
}

.score-component {
    position: absolute;
}

#rendered-pane, #editor-pane {
    box-sizing: border-box;
    border-radius: 1ch;
    background: #262626;
}

#component-container {
    width: 210mm;
	height: 297mm;
	background: white;
	transform-origin: left top;
	position: relative;
}

#component-container-container {
	margin: auto;
	width: 210mm;  /* Default size, will be overridden on first zoom. Same as size of component-container */
	height: 297mm;
	position: relative;
}

#rendered-pane {
	position: relative;
	overflow: hidden;
    flex: 1;
}

#rendered-pane-padding {
	padding: 1ch;
	overflow: auto;
	box-sizing: border-box;
	width: 100%;
  	height: 100%;
}

.scroll {
	overflow: auto;
}

#component-controls, #file-controls {
	position: absolute;
	z-index: 10;
	display: flex;
    flex-direction: column;
}

#component-controls {
	right: 1ch;
	bottom: 1ch;
}

#file-controls {
	right: 1ch;
	top: 1ch;
}

#editor-pane {
	padding: 1ch;
	color: white;
	overflow-x: auto;
	align-items: flex-start;
	gap: 1ch;
    flex: 0 1 auto;
    max-height: 50vh;
}

#editor-pane:has(*) {
    display: flex;
}

#editor-pane:not(:has(*)) {
    display: none;
}

#editor-pane > * {
	flex: 0 0 auto;
}

#editor-pane > .text-component-text-content {
	flex-grow: 1;
	height: 100%;
    box-sizing: border-box;
}

body > * {
} 

.editor-sequencer-table {
	border-collapse: separate;
	border-spacing: 1px 1px;
}

.editor-sequencer-subdivision-decoration-divider, .editor-sequencer-decoration-drum-divider {
	height: 1px;
}

.editor-squencer-beat-divider {
	width: 1px;
}

svg {
	overflow: visible;
	transition: background 0.1s, border-color 0.1s;
	border: 1mm solid;
	border-radius: 3mm;
	border-color: rgba(255, 127, 0, 0);
	position: absolute;
}

svg path, g path {
	fill: none;
	stroke: black;
	stroke-width: 1;
}

svg circle, g circle {
	fill: black;
	stroke: none;
}

svg text {
    fill: black;
    stroke: none;
    text-anchor: middle;
    dominant-baseline: middle;
    white-space: preserve;
}

svg .tuplet-text {
    font-style: italic;
    font-weight: bold;
    font-size: 5px;
}

svg:not(:hover):not([data-selected]) {
	background: rgba(0, 255, 0, 0.2);
}

svg:not(:hover)[data-selected] {
	background: rgba(212, 255, 0, 0.3);
}

svg:hover:not([data-selected]) {
	background: rgba(255, 127, 0, 0.2);
	border-color: rgba(255, 127, 0, 0.9);
}

svg:hover[data-selected] {
	background: rgba(255, 127, 0, 0.3);
	border-color: rgba(255, 127, 0, 0.9);
}

@media print {
	body {
		visibility: hidden;
	}
	
	#component-container {
		visibility: visible;
		position: absolute;
		top: 0px;
		left: 0px;
	}

}

.editor-selectors-container {
	display: flex;
}

.editor-selectors-container > table {
	height: fit-content;
}
