/* Synth module unit */
synth-module > form {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	border: 1px solid black;
	border-radius: 0.5rem;
	margin: 1rem 1rem 2rem 1rem;
	padding: 1rem;
	background-color: lightgrey;
}

synth-module > form h2 {
	width: 100%;
	margin: -0.5rem 0rem 0.75rem 0rem;
}

/* Help buttons */
help-button > button {
	position: absolute;
	top: -0.25rem;
	right: 0.25rem;
	border-radius: 100%;
	padding: 0rem;
	font-size: 0.75rem;
	line-height: 0.75rem;
	width: 1rem;
	height: 1rem;
}

help-button > button dialog {
	text-align: start;
	font-size: 1rem;
	line-height: 1rem;
}

help-button > button dialog::backdrop {
	background-color: rgba(0, 0, 0, 0.6);
}

help-button > button dialog ul {
	padding-left: 1.5rem;
}

help-button > button dialog p {
	text-align: center;
	margin: 0rem;
	font-size: 0.75rem;
}

/* Fieldsets */
synth-module > form fieldset {
	position: relative;
	border: 1px solid black;
	border-radius: 0.25rem;
}

synth-module > form fieldset legend {
	font-weight: bold;
}

/* Primary outer fieldset */
synth-module > form  > .web-component > fieldset {
	display: flex;
	flex-direction: row;
	margin-bottom: 1rem;
	padding: 0.75rem;
	column-gap: 0.5rem;
}

synth-module > form > .web-component > fieldset > legend {
	text-transform: uppercase;
}

/* Secondary inner fieldset */
synth-module > form fieldset fieldset {
	border-color: grey;
}

/* Parameter input */
synth-module > form fieldset div {
	display: block;
	margin-bottom: 0.2rem;
}

synth-module > form fieldset div label {
	display: inline-block;
	width: 7ch;
}

synth-module > form fieldset div button,
synth-module > form fieldset div select,
synth-module > form fieldset div input {
	margin: 0rem 1rem;
	cursor: pointer;
	vertical-align: middle;
	accent-color: darkslategrey;
}

synth-module > form fieldset div select,
synth-module > form fieldset div input {
	width: 30ch;
}

synth-module > form fieldset div span {
	display: inline-block;
	width: 8ch;
	font-size: 0.7rem;
}

synth-module > form fieldset filter-params > fieldset div span {
	width: 14ch;
}

synth-module > form fieldset fieldset div span {
	width: 12ch;
}

synth-module > form fieldset div select:focus,
synth-module > form fieldset div input:focus {
	background-color: lightgray;
	accent-color: gray;
}

/* Toggle input */
toggle-input > div button {
	width: 1rem;
	height: 1rem;
	background-color: red;
}

toggle-input > div button:has(input[checked]) {
	background-color: green;
}

/* Module add/remove buttons */
synth-module > form module-buttons > div {
	position: absolute;
	bottom: -0.75rem;
}

synth-module > form module-buttons > div button {
	font-weight: bold;
	width: 4rem;
	height: 1.5rem;
	margin-right: 0.3rem;
}

synth-module > form:only-of-type module-buttons > div button:last-child {
	cursor: not-allowed;
}

