trevor/src/index.css
@font-face {
	font-family: "TopazPlusA1200";
	src: url("/fonts/Topaza600a1200a400.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: "TopazPlusA1200";
	src: url("/fonts/TopazPlusa600a1200a4000.woff2") format("woff2");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	font-family:
		"TopazPlusA1200", system-ui, Avenir, Helvetica, Arial, sans-serif; /* Use the Amiga font */
	/* line-height: 1.1; */
	font-weight: 400;

	color-scheme: light;
	color: #000000; /* Amiga Workbench text color */
	background-color: #c0c0c0; /* Amiga Workbench background color */

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;

	width: 100%;
	height: 100%;
}

html {
	filter: sepia(0.15) hue-rotate(5deg);
}

html,
body,
#root {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	font-family:
		"TopazPlusA1200", system-ui, Avenir, Helvetica, Arial, sans-serif; /* Use the Amiga font */
}

button,
select,
pre,
textarea,
input {
	font-family: inherit;
}

body {
	display: flex;
	flex-direction: column;
	background-color: #c0c0c0; /* Amiga Workbench background */
}

pre {
	font-size: 18px;
}

a {
	font-weight: 500;
	color: #000080; /* Amiga Workbench link color */
	text-decoration: none;
}
a:hover {
	color: orange; /* Hover color for links */
}

h1 {
	font-size: 1.5em;
	line-height: 1.2;
	color: #000000;
}

h3 {
	margin-top: 0px;
	margin-bottom: 2px;
}

button,
input,
textarea,
select {
	background-color: #d0d0d0; /* Amiga-style button background */
	border: 2px solid #808080; /* Amiga-style border */
	color: #000000;
	padding: 4px;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000; /* Amiga-style 3D effect */
	cursor: pointer;
}
button:hover,
input:hover,
textarea:hover,
select:hover {
	background-color: #e0e0e0; /* Slightly lighter hover effect */
}
button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: none;
	/* border-color: #0000ff; */
	border-color: orange;
}

input:disabled,
select:disabled,
label input:disabled + span,
label select:disabled + span {
	color: #808080; /* Slightly greyish text for disabled fields */
	background-color: #e0e0e0; /* Keep the Amiga-style background */
}

input[type="text"]:disabled {
	color: #808080; /* Greyish text for disabled text inputs */
}

.logWindow {
	position: fixed;
	background: black;
	color: white;
	padding: 4px 8px;
	border-radius: 4px;
	pointer-events: none;
	z-index: 1000;
	width: 500px;
	height: 300px;
	overflow-y: auto;
}

.logWindow pre {
	font-size: 15px;
	white-space: pre-wrap;
	word-wrap: break-word;
	overflow-x: hidden,;
}

.three-panel-layout {
	display: flex;
	height: 100vh;
	background-color: #d0d0d0; /* Amiga-style panel background */
	border: 2px solid #808080; /* Amiga-style border */
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.left-panel {
	width: 80%; /* 80% of the horizontal space */
	display: flex;
	flex-direction: column;
	border-right: 2px solid #808080;
	background-color: #d0d0d0;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.information-panel {
	display: flex;
	flex-direction: column;
}

.top-right-panel,
.bottom-right-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	padding: 10px;
	border-bottom: 2px solid #808080;
	overflow-y: auto;
}

.bottom-right-panel {
	border-bottom: none; /* Remove border for the last panel */
}

.top-panel {
	flex: 1; /* 50% of the vertical space */
	display: flex;
	background-color: #e0e0e0;
	border-bottom: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.top-panel .midi-output,
.top-panel .midi-inputs {
	flex: 1; /* 50% of the horizontal space */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-right: 2px solid #808080;
	padding: 10px;
}

.top-panel .midi-inputs {
	border-right: none; /* Remove border for the last panel */
}

.middle-panel {
	flex: 1;
	background-color: #e0e0e0;
	border-bottom: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.bottom-panel {
	flex: 1;
	display: flex;
	background-color: #e0e0e0;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.instance-creation {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: auto;
	background-color: #d0d0d0;
}

.instance-creation-main-panel {
	display: flex;
	width: 100%;
	flex-direction: column;
	background-color: #e0e0e0;
}

.instance-creation-midi-output,
.instance-creation-midi-inputs,
.instance-creation-info-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 10px;
	overflow: auto;
}

.instance-creation-midi-output {
	flex: 4; /* 40% of the horizontal space */
	border-right: 2px solid #808080;
}

.instance-creation-midi-inputs {
	flex: 4;
	/* border-right: 2px solid #808080; */
}

.instance-creation-info-panel {
	flex: 2;
}

.info-content {
	font-size: 18px;
	color: #000000;
	text-align: center;
	background-color: #f0f0f0;
	padding: 10px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.device-class-left-panel {
	flex: 4;
	background-color: #d0d0d0;
	border-right: 2px solid #808080;
}

.device-list {
	display: flex;
	flex-direction: row;
	gap: 10px;
	width: 100%;
	justify-content: flex-start;
	align-items: center;
	height: 100%;
	overflow-x: auto;
}

.device-name {
	font-size: 18px;
	font-weight: bold;
	color: #000000;
	text-align: center;
	margin-bottom: 3px;
}

.device-item {
	font-size: 18px;
	padding: 5px;
	cursor: pointer;
	background-color: #d0d0d0;
	border: 1px solid #808080;
	margin-bottom: 5px;
	text-align: left;
}

.device-item:hover {
	background-color: #e0e0e0;
}

.device-class-right-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 10px;
	overflow-y: auto;
	overflow-x: hidden;
}

.device-class-list {
	list-style-type: none;
	padding: 0;
	margin: 0;
	width: 100%;
}

.device-class-item {
	font-size: 18px;
	padding: 5px;
	cursor: pointer;
	background-color: #d0d0d0;
	border: 1px solid #808080;
	margin-bottom: 5px;
	text-align: left;
}

.device-class-item:hover {
	background-color: #e0e0e0;
}

.device-patching {
	display: flex;
	width: 100%;
	height: 100%;
	background-color: #d0d0d0;
	border: 2px solid #808080;
	/* box-shadow: inset -1px -1px 0px #ffffff, inset 1px 1px 0px #000000; */
}

.device-patching-main-section {
	display: flex;
	flex-direction: row;
	border-right: 2px solid #808080;
	width: 100%;
	position: relative;
	overflow-x: auto;
}

.device-patching-side-section {
	display: flex;
	flex-direction: column;
	background-color: #e0e0e0;
	border-left: 2px solid #808080;
	width: 260px;
	flex: 1;
}

.device-patching-top-panel {
	height: 40px; /* Fixed height for the Associate button */
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #d0d0d0;
	border-bottom: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.device-patching-middle-panel {
	flex: 1; /* 50% of the remaining space */
	background-color: #e0e0e0;
	border-bottom: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.device-patching-bottom-panel {
	flex: 1; /* 50% of the remaining space */
	background-color: #e0e0e0;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.main-section {
	width: 80%; /* 80% of the horizontal space */
	border-right: 2px solid #808080;
	display: flex;
	flex-direction: column; /* Stack RackRows vertically */
	align-items: stretch; /* Ensure RackRows take full width */
	justify-content: flex-start;
	gap: 4px; /* Add gap between rows */
	background-color: #e0e0e0;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.rack-row {
	position: relative;
	background-color: #d0d0d0; /* Darker gray for RackRow */
	border: 1px solid #aaa; /* Slightly darker border */
	margin-bottom: 5px;
	width: 250px;
	display: flex;
	/* height: 100%; */
	align-items: center;
	justify-content: flex-start;
	overflow-x: auto;
	gap: 5px;
	flex-direction: column;
	min-width: 200px;
}

.inner-rack-row {
	display: inherit;
	align-items: inherit;
	justify-content: flex-start;
	overflow-x: inherit;
	gap: inherit;
	flex-direction: inherit;
}

.rack-row[data-slot]:hover {
	background-color: #d0d0d0; /* Highlight slot during drag-over */
	border: 2px dashed #808080; /* Dashed border for drop area */
}

.rack-row select {
	width: 100%;
}

.rack-row.horizontal {
	.parameters-grid.right .parameter {
		display: inline-flex;
		flex-direction: column;
		align-items: flex-start;
		vertical-align: top;
		height: auto;
		min-height: unset;
		padding-bottom: 2px;
		margin-bottom: 0;
	}
	align-items: center;
	width: 100%;
	height: 150px;
	min-height: 150px;
	flex-direction: row;
}

.rack-row.horizontal select {
	min-width: 21px;
	width: 21px;
	height: 100%;
}

.rack-row.horizontal > button {
	height: 100% !important;
	width: 22px !important;
	writing-mode: vertical-rl;
	text-orientation: sideways;
	transform: rotate(-180deg);
}

.rack-row.horizontal > select {
	height: 100%;
	writing-mode: vertical-rl;
	text-orientation: sideways;
	transform: rotate(-180deg);
}

.rack-row.vertical .rack-top-bar {
	display: flex;
	flex-direction: column-reverse;
	height: 100%;
	width: 17px;
}

.rack-row.horizontal .rack-top-bar {
	height: 100%;
	width: 17px;
	writing-mode: vertical-rl;
	text-orientation: sideways;
	transform: rotate(-180deg);
}

.device-patching-main-section.horizontal {
	flex-direction: column;
}

.rightbar-button {
	width: 100%;
	padding: 0px;
	text-align: center;
	padding: 0px;
	height: 49px;
	font-size: 15px;
}

.device-component {
	background-color: #e0e0e0;
	border: 5px solid;
	border-color: #808080;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: 10px;
	width: 190px;
	min-width: 190px;
	height: 140px;
}

.device-sections {
	display: flex;
	justify-content: space-between; /* Position sections on sides */
	height: 100%;
	width: 100%;
	max-height: 100px; /* ou autre valeur selon ton besoin */
	overflow-y: auto;
}

.device-side {
	display: flex;
	flex-direction: column;
	justify-content: space-evenly; /* Distribute sections evenly */
	height: 100%;
}

.device-side.left {
	align-items: flex-start; /* Align sections to the left */
}

.device-side.right {
	align-items: flex-end; /* Align sections to the right */
}

.device-section {
	display: flex;
	align-items: center;
	gap: 1px; /* Space between section box and name */
	margin-top: 1px;
	margin-bottom: 1px;
}

.device-section-box {
	width: 20px;
	height: 20px;
	background-color: orange;
	border-radius: 3px;
	cursor: pointer;
}

.device-section-box.occupied {
	background-color: #bb995a;
}

.device-section.selected .device-section-box,
.device-section.selected .occupied {
	background-color: yellow;
}

.device-section-box:hover {
	background-color: yellow;
}

.device-section-name {
	font-size: 13px;
	font-weight: bold;
	color: #000000;
}

.device-section-name.left {
	margin-left: 5px; /* Add space to the left of the section box */
}

.device-section-name.right {
	margin-right: 5px; /* Add space to the right of the section box */
}

.side-section {
	width: 20%; /* 20% of the horizontal space */
	display: flex;
	flex-direction: column;
	background-color: #e0e0e0;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.ugly-button {
	width: 100%;
	height: 100%;
	background-color: #d0d0d0;
	border: 2px solid #808080;
	font-size: 21px;
	font-weight: bold;
	cursor: pointer;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000; /* Amiga-style 3D effect */
}

.ugly-button:hover {
	background-color: orange; /* Highlight in orange on hover */
}

.ugly-button.active {
	background-color: yellow;
	box-shadow:
		inset 1px 1px 0px #808080,
		inset -1px -1px 0px #ffffff; /* Inverted 3D effect */
}

button.active {
	background-color: yellow;
	box-shadow:
		inset 1px 1px 0px #808080,
		inset -1px -1px 0px #ffffff;
}

.patching-modal,
.about-modal,
.save-modal,
.load-modal,
.settings-modal,
.welcome-modal,
.error-modal {
	position: fixed;
	top: 50%;
	left: 50%;
	background-color: white;
	transform: translate(-50%, -50%); /* Center the modal */
	display: flex;
	flex-direction: column;
	border: 2px solid #808080;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	z-index: 30;
}

.patching-modal {
	width: 80%;
	height: 60%;
	z-index: 10;
}

.about-modal {
	width: 400px;
	height: 250px;
}

.error-modal {
	width: 80%;
	height: auto;
	max-height: 60%;
}

.save-modal {
	width: 400px;
	height: 250px;
}

.load-modal {
	width: auto;
	height: auto;
	max-height: 60%;
	max-width: 80%;
}

.settings-modal {
	z-index: 10;
	width: 680px;
	height: 100px;
}

.welcome-modal {
	width: 80%;
	height: 35%;
}

.modal-header {
	height: 40px; /* Fixed height for the header */
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #d0d0d0;
	border-bottom: 2px solid #808080;
	padding: 0 10px;
}

.modal-vdevice-selection {
	position: fixed;
	width: 80%;
	height: 60%;
	z-index: 30;
	border: 2px solid rgb(128, 128, 128);
	top: 50%;
	left: 50%;
	background-color: white;
	transform: translate(-50%, -50%);
	box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 10px;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
}

.modal-vdevice-selection-list {
	padding: 5px;
	display: grid;
	min-width: 100px;
	max-width: 200px;
	gap: 5px;
	overflow: auto;
	background-color: rgb(224, 224, 224);
	grid-template-columns: repeat(4, 1fr);
	min-height: 0px;
	border: 3px solid grey;
	justify-items: center;
	align-items: center;
}

.modal-vdevice-list {
	display: flex;
	flex-flow: column wrap;
	width: 100%;
	height: 353px;
	gap: 5px;
	margin: 0px;
	overflow: auto;
	padding: 5px;
	box-sizing: border-box;
}

.modal-vdevice-content {
	flex: 1 1 0%;
	display: flex;
	flex-direction: column;
	min-height: 0px;
	box-sizing: border-box;
	overflow: hidden;
}

.modal-vdevice-bottom {
	display: flex;
	flex: 1 1 0%;
	gap: 5px;
	min-height: 0px;
	width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.close-button {
	background-color: #d0d0d0;
	border: 2px solid #808080;
	padding: 5px 10px;
	cursor: pointer;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000; /* Amiga-style 3D effect */
}

.modal-body,
.about-modal-body,
.settings-modal-body,
.save-modal-body,
.load-modal-body {
	flex: 1;
	display: flex;
	flex-direction: row;
	height: 100%;
}

.about-modal-body,
.save-modal-body {
	align-items: center;
}

.save-modal-body {
	flex-direction: column;
	align-items: flex-start;
	margin-left: 10px;
	justify-content: space-around;
}

.error-modal-body,
.load-modal-body {
	margin-left: 10px;
	overflow-y: auto;
	overflow-x: auto;
}

.load-modal-body {
	margin-right: 20px;
}

.welcome-modal-body {
	display: flex;
	flex-direction: column;
	padding: 10px;
	overflow-y: auto;
}

.save-modal-body input[type="text"] {
	width: 45%;
	padding: 5px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	background-color: #d0d0d0;
	color: #000000;
}

.settings-modal-body input[type="text"] {
	width: 60%;
	padding: 5px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	background-color: #d0d0d0;
	color: #000000;
}

.left-panel {
	flex: 4; /* 80% of the horizontal space */
	display: flex;
	flex-direction: row;
	border-right: 2px solid #808080;
}

.top-left-panel {
	flex: 1;
	background-color: #e0e0e0;
	border-bottom: 2px solid #808080;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-start;
	padding: 10px;
	overflow-y: auto;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	overflow-x: auto;
	position: relative !important;
}

.top-left-panel .panel-dropdown {
	position: relative;
	width: 100%;
	top: 0;
	left: 0px;
	background-color: unset;
	justify-content: center;
}

.top-left-panel h3 {
	margin: 0 0 10px 0;
	font-size: 19px;
	font-weight: bold;
}

.top-left-panel ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.top-left-panel li {
	font-size: 18px;
	margin-bottom: 5px;
}

.bottom-left-panel {
	flex: 1; /* 50% of the vertical space */
	background-color: #e0e0e0;
	border-bottom: 2px solid #808080;
	display: flex;
	flex-direction: column;
	align-items: flex-start !important;
	justify-content: flex-start;
	padding: 10px;
	overflow-y: auto; /* Allow scrolling if content overflows */
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	position: relative !important;
}

.bottom-left-panel h3 {
	margin: 0 0 10px 0;
	font-size: 19px;
	font-weight: bold;
}

.bottom-left-panel ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.bottom-left-panel li {
	font-size: 18px;
	margin-bottom: 5px;
}

.right-panel {
	flex: 1;
	display: flex;
	flex-direction: column; /* nécessaire pour empiler top et bottom */
	background-color: #f0f0f0;
	border-left: 2px solid #808080;
	max-width: 340px;
}

.modal-content {
	background-color: white;
	width: 90%; /* Adjust content width */
	height: 80%; /* Adjust content height */
	padding: 20px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	overflow: auto; /* Allow scrolling if content overflows */
}

.parameters-grid {
	display: flex;
	justify-content: space-evenly;
	flex-direction: column;
	align-items: center;
	width: 100%; /* Take full horizontal space */
	height: 100%; /* Ensure the grid takes full height of the container */
	flex-wrap: wrap;
}

.parameters-grid.right {
	align-items: flex-start;
	/* transform: translateX(20%); */
}

.parameters-grid.left {
	display: flex;
	flex-wrap: nowrap;
	flex-direction: column;
	align-items: flex-end;
	position: relative;
	padding-left: 20px;
	width: 100%;
}

.parameter {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	overflow: visible;
}

.parameter-box {
	/* color: #bb995a */
	width: 20px;
	height: 20px;
	border-radius: 4px;
	background-color: #d0d0d0; /* Gray square for parameters */
	border: 2px solid #808080; /* Amiga-style border */
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000; /* Amiga-style 3D effect */
	position: relative;
}

.parameter-name {
	font-size: 15px;
	font-weight: bold;
	color: #000000; /* Black text for parameter names */
	position: absolute;
	text-align: left; /* Align the text to the left */
	white-space: nowrap; /* Adjust to align with the center of the parameter box */
}

.parameter-name.left {
	top: 50%;
	right: 100%; /* place à gauche du carré */
	transform: translateY(-50%);
	white-space: nowrap;
	text-align: right;
	padding-right: 4px; /* colle le texte au carré */
}

.parameter-name.right {
	top: 50%;
	left: 110%; /* Juste à droite du carré */
	transform: translateY(-50%);
	white-space: nowrap;
	text-align: left;
}

.parameter:hover .parameter-box,
.parameter.selected .parameter-box,
.midi-icon.selected,
.note-box.selected,
.patch.selected,
.patch.selected:hover,
.midi-icon.selected:hover,
.note-box.selected:hover {
	background-color: orange;
}

.parameter:not(.selected) .parameter-box {
	background-color: #d0d0d0;
}

.parameter:not(.selected) .parameter-box.occupied {
	background-color: #bb995a;
	border: 2px solid #bb995a;
}

.connection-setup {
	color: #000000;
	background-color: #e0e0e0;
	padding: 10px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.connection-setup h3 {
	margin: 0 0 10px 0;
	font-size: 19px;
	font-weight: bold;
}

.connection-setup label {
	display: block;
	margin-bottom: 10px;
	font-size: 18px;
}

.connection-setup input[type="checkbox"] {
	margin-right: 5px;
}

.connection-setup .form-group {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
	align-items: flex-end;
}

.connection-setup input[type="text"] {
	width: 45%;
	padding: 5px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	background-color: #d0d0d0;
	color: #000000;
}

.connection-setup select {
	width: 100%;
	padding: 5px;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	background-color: #d0d0d0;
	color: #000000;
}

.connection-item.selected {
	background-color: orange;
	font-weight: bold;
}

.connection-item:hover {
	background-color: #c0c0c0;
	font-weight: bold;
}

.parameter-info {
	height: 100%; /* Ensure consistent height */
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	padding: 10px;
	background-color: #e0e0e0;
	border: 2px solid #808080;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.connections-list {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.connections-list li {
	font-size: 15px;
	margin-bottom: 5px;
	color: #000000;
}

.app-layout {
	flex: 1;
	display: flex;
	flex-direction: column;
	height: 100vh;
	background-color: #c0c0c0;
}

.top-section {
	/* flex: auto; */
	/* max-height: 20%; */
	display: flex;
	border-bottom: 2px solid #808080;
}

.bottom-section {
	flex: auto;
	/* min-height: 80%; */
	display: flex;
}

.connection-svg {
	position: absolute;
	top: 30px;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none; /* Allow clicks to pass through the SVG */
}

.connection-svg.modal {
	z-index: 2;
}

.device-patching-svg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none; /* Allow clicks to pass through the SVG */
}

.midi-ports {
	display: flex;
	gap: 10px; /* Space between ports */
	justify-content: center;
	align-items: center;
}

.midi-ports-grid {
	display: flex;
	justify-content: space-between; /* Distribute ports evenly */
	align-items: center;
	width: 100%; /* Take full horizontal space */
}

.midi-port {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: relative;
}

.midi-port-name {
	font-size: 15px;
	font-weight: bold;
	color: #000000;
	margin-bottom: 5px; /* Space between name and circle */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 50px; /* Limit the width for truncation */
}

.midi-port-name:hover {
	overflow: visible;
	white-space: normal;
	background-color: #ffffff;
	padding: 2px;
	border: 1px solid #808080;
	position: absolute;
	top: -20px; /* Position above the name */
	z-index: 1;
}

.midi-port-circle {
	width: 30px;
	height: 30px;
	background-color: #d0d0d0;
	border: 2px solid #808080;
	border-radius: 50%;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

@media (prefers-color-scheme: light) {
	:root {
		color: #000000;
		background-color: #c0c0c0;
	}
	a:hover {
		color: #0000ff;
	}
	button {
		background-color: #d0d0d0;
	}
}

.amiga-button {
	font-family:
		"TopazPlusA1200", system-ui, Avenir, Helvetica, Arial, sans-serif;
	background-color: #d0d0d0;
	border: 2px solid #808080;
	color: #000000;
	font-size: 21px;
	font-weight: bold;
	padding: 5px 5px;
	cursor: pointer;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
}

.amiga-button:hover {
	background-color: #e0e0e0;
}

.play-pause-button {
	width: 24px;
}

.center-button {
	position: absolute;
	/* top: 50%; */
	/* left: 50%; */
	transform: translate(-50%, 60%);
}

/* UI for CodeMirror */
[class^="cm-theme"] {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

.cm-editor .cm-scroller,
.cm-content {
	box-sizing: border-box;
	font-family:
		"TopazPlusA1200", system-ui, Avenir, Helvetica, Arial, sans-serif;
	font-size: 19px;
}

.cm-gutters {
	font-size: 18px; /* tu peux réduire ici si tu veux */
}

.cm-tooltip {
	background: #f0f0f0; /* Couleur de fond clair comme les vieilles interfaces */
	color: #000; /* Texte noir */
	border: 2px solid #000; /* Bordure noire épaisse */
	border-radius: 4px;
	font-family:
		"TopazPlusA1200", system-ui, Avenir, Helvetica, Arial, sans-serif;
	font-size: 19px;
	box-shadow: 4px 4px 0px #ccc; /* effet de profondeur rétro */
}

.cm-tooltip-autocomplete {
	background: #e0e0e0; /* un peu plus gris clair pour l'autocompletion */
}

.cm-tooltip-autocomplete ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cm-tooltip-autocomplete li {
	padding: 4px 8px;
	cursor: pointer;
}

.cm-tooltip-autocomplete li[aria-selected] {
	background: #000;
	color: #fff;
}

.cm-tooltip,
.cm-tooltip-autocomplete,
.cm-tooltip-autocomplete ul,
.cm-tooltip-autocomplete li {
	font-family:
		"TopazPlusA1200", system-ui, Avenir, Helvetica, Arial, sans-serif !important;
	font-size: 18px;
}

.cm-lintRange-error {
	background-color: rgba(255, 0, 0, 0.1);
	background-image: none !important;
	border-bottom: 2px dotted red;
}

.scope {
	background-color: #e0e0e0;
	border: 5px solid #808080;
	box-sizing: border-box;
	position: inherit;
	align-items: center;
	padding: 5px;
	height: 140px;
	width: 190px;
}

.midi-container {
	width: fit-content;
	background-color: #f9f9f9;
	overflow: hidden;
	transition: all 0.3s ease;
}

.left-midi {
	transform: translateX(20%);
}

.right-midi {
	transform: translateX(-20%);
}

.midi-header {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	cursor: pointer;
	background-color: #e0e0e0;
	user-select: none;
}

.midi-icon {
	font-size: 23px;
	padding: 4px 6px;
	border: 2px solid #808080;
	border-radius: 4px;
	box-shadow:
		inset -1px -1px 0px #ffffff,
		inset 1px 1px 0px #000000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.midi-toggle-icon {
	font-size: 19px;
}

.midi-container.open .midi-header {
	justify-content: center;
}

.midi-grid-octaves {
	display: flex;
	gap: 2px;
	align-items: flex-start;
	justify-content: center;
	padding: 12px;
}

.octave-column {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.note-box {
	background-color: #eee;
	border: 1px solid #bbb;
	padding: 6px;
	font-size: 16px;
	text-align: center;
	border-radius: 3px;
	cursor: default;
}

.note-box:hover {
	background-color: #ccc;
}

.notification-bar {
	height: 32px;
	max-height: 32px;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	padding: 0 10px;
	background-color: #a0a0a0;
}

p.details,
li.details {
	font-size: 12px !important;
}

ul.details {
	padding-left: 16px;
	margin-top: 5px;
	margin-bottom: 5px;
}

p.details {
	margin-top: 5px;
	margin-bottom: 5px;
}

h3.details {
	margin-top: 10px;
	margin-bottom: 10px;
}

.flat-select {
	color: gray;
	z-index: 1;
	background-color: #e0e0e0;
	width: 40px;
	margin: 0px;
	text-align: left;
	cursor: pointer;
	border: 2px solid gray;
	box-shadow: unset;
}

.flat-form {
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: right;
	height: fit-content;
	padding: 10px;
	width: 250px;
	align-content: flex-start;
	flex-wrap: wrap;
	gap: 5px;
	margin-left: 15px;
	background-color: rgb(224, 224, 224);
	border: 5px solid #808080;
}

.flat-entry {
	display: flex;
	flex-direction: row;
	gap: 5px;
	align-items: center;
	justify-content: left;
	font-size: 15px;
	width: 100%;
}

.flat-label {
	color: gray;
}

.rack-top-bar {
	display: flex;
	flex-direction: row;
	width: 100%;
}

/* landscape */
@media (max-height: 450px) {
	h3 {
		font-size: 20px;
	}

	li {
		font-size: 16px !important;
	}

	.ugly-button {
		font-size: 19px;
	}

	p {
		font-size: 18px;
	}

	/* .device-patching.vertical {
		height: 145%;
	} */

	.parameters-grid {
		flex-wrap: nowrap;
	}

	.parameters-grid.right {
		align-items: flex-start;
		overflow-y: auto;
		transform: unset;
	}

	.parameters-grid.left {
		flex-wrap: nowrap;
		overflow-y: auto;
	}

	.device-patching-main-section {
		overflow-x: auto;
	}

	.rack-row {
		width: 200px;
		/* height: 100%; */
		min-width: 200px;
	}

	/* .top-section {
		max-height: 90%;
	} */

	.bottom-section {
		min-height: 84%;
	}

	.parameters-grid {
		flex-wrap: nowrap;
	}

	.right-panel {
		max-width: 35%;
	}

	.connection-svg {
		top: 30px;
	}

	.settings-modal {
		width: 90%;
	}

	.settings-modal-body input[type="text"] {
		width: 55%;
		padding: 5px;
	}

	.welcome-modal {
		width: 95%;
		height: 90%;
	}

	.logWindow {
		width: 93%;
		height: 80%;
		margin: 2% !important;
		left: 0px !important;
		top: 0px !important;
	}

	.logWindow pre {
		font-size: 15px;
		white-space: pre-wrap;
		word-wrap: break-word;
		overflow-x: hidden,;
	}

	.patching-modal {
		width: 95%;
		height: 77%;
	}

	.parameter-box {
		width: 20px;
		height: 20px;
	}

	.device-patching-svg {
		width: 100%;
		height: 100%;
	}

	.device-patching-svg.horizontal {
		width: 100%;
		height: 200%;
	}

	.modal-vdevice-selection {
		width: 95%;
		height: 95%;
	}

	.modal-vdevice-content {
		flex-direction: row;
		gap: 5px;
	}

	.modal-vdevice-list {
		flex-direction: row;
		flex: 0.8;
		flex-wrap: wrap;
		min-width: 0;
		gap: 20px;
	}

	.modal-vdevice-selection-list {
		/* grid-template-columns: repeat(100, 1fr); */
		display: flex;

		height: 105px;
		border: 3px solid gray;
		min-width: 95%;
		/* flex: 0.67 1 0%; */
		flex-direction: row;
	}

	.modal-vdevice-bottom {
		flex-direction: column;
	}

	.top-left-panel {
		gap: 5px;
	}

	.top-left-panel .panel-dropdown {
		position: relative;
		width: 100%;
		top: 0;
		left: 0px;
		background-color: unset;
		justify-content: center;
	}
	.bottom-left-panel {
		gap: 5px;
	}

	.bottom-left-panel .panel-dropdown {
		position: relative;
		width: 100%;
		top: 0;
		left: 0px;
		background-color: unset;
		justify-content: flex-start !important;
	}
}

/* portrait */
@media (max-width: 600px) {
	h3 {
		font-size: 20px;
	}

	.top-left-panel h3 {
		transform: rotate(90deg);
		transform-origin: right;
		margin-top: 10px;
		margin-right: 5px;
		max-width: 26px;
		position: relative;
	}

	.bottom-left-panel h3 {
		font-size: 19px;
		font-weight: bold;
		transform: rotate(90deg);
		transform-origin: left bottom;
		max-width: 10px;
		margin-top: -21px;
		margin-right: 5px;
	}

	li {
		font-size: 16px !important;
	}

	.ugly-button {
		font-size: 19px;
	}

	p {
		font-size: 18px;
	}
	.rack-row {
		align-items: center;
		/* height: 100%; */
		width: 200px;
		min-width: 200px;
	}

	.rack-row select {
		width: 100%;
		height: 21px;
	}

	.device-patching-main-section {
		overflow-x: auto;
	}

	.bottom-section {
		min-height: 93%;
	}

	.parameters-grid {
		flex-wrap: nowrap;
	}

	.connection-svg {
		top: 30px;
	}

	.settings-modal {
		width: 90%;
	}

	.settings-modal-body input[type="text"] {
		width: 55%;
		padding: 5px;
	}

	.welcome-modal {
		width: 95%;
		height: 90%;
	}

	.logWindow {
		width: 93%;
		height: 80%;
		margin: 2% !important;
		left: 0px !important;
		top: 0px !important;
	}

	.logWindow pre {
		font-size: 15px;
		white-space: pre-wrap;
		word-wrap: break-word;
		overflow-x: hidden,;
	}

	.modal-header.playground {
		height: 60px;
		flex-wrap: wrap;
	}

	.patching-modal {
		width: 92%;
		height: 70%;
	}

	.modal-header label {
		font-size: normal;
	}

	.modal-header label select {
		width: 20px;
	}

	.modal-body.patching {
		flex-direction: column;
	}

	.left-panel {
		flex-direction: column;
		width: 100%;
		flex: 2.5;
		min-height: 30%;
	}

	.right-panel {
		flex-direction: row-reverse;
		max-width: 100%;
		max-height: 30%;
	}

	/* .parameters-grid.left {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
		padding-left: 0;
		height: auto;
		min-height: unset;
		margin-top: 0;
		margin-bottom: 0;
		padding-top: 0;
		padding-bottom: 0;
	} */

	.parameter-box {
		width: 20px;
		height: 20px;
	}

	.parameter-name.left {
		display: inline-block;
		transform: rotate(90deg);
		transform-origin: right bottom;
		line-height: 1.2;
		top: -11px;
		right: 18px;
	}

	.text-wrapper {
		display: inline-block;
		writing-mode: vertical-rl;
		text-orientation: mixed;
		margin-bottom: 10px;
	}

	.parameters-grid.left {
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: flex-end;
		overflow-x: auto;
		width: 100%;
		min-width: 0;
		white-space: nowrap;
		padding-left: 0;
		height: auto;
		min-height: unset;
		margin-top: 0;
		margin-bottom: 0;
		padding-top: 0;
		padding-bottom: 0;
	}

	.parameters-grid.left .parameter,
	.parameters-grid.right .parameter {
		flex: 1 1 0;
		min-width: 8px;
		box-sizing: border-box;
		margin: 0 8px;
		gap: 5px;
		display: inline-flex;
		flex-direction: column;
		align-items: center;
		vertical-align: bottom;
		height: auto;
		min-height: unset;
		padding-bottom: 2px;
		margin-bottom: 0;
	}

	.parameters-grid.left .text-wrapper {
		order: 0;
		margin-bottom: 4px;
		margin-top: 0;
		width: auto;
		display: flex;
		justify-content: center;
	}
	.parameters-grid.left .parameter-name.left {
		position: static;
		writing-mode: vertical-rl;
		transform: none;
		padding: 0;
		margin: 0;
		text-align: center;
		white-space: normal;
		display: inline-block;
	}
	.parameters-grid.left .parameter-box {
		order: 1;
		margin-top: 0;
		margin-bottom: 0;
	}

	.parameters-grid.right {
		flex-direction: row-reverse;
		transform: unset;
	}

	.parameter-name.right {
		transform: rotate(90deg) translateX(59%);
		left: unset;
	}

	.about-modal {
		width: 90%;
		height: 32%;
	}

	.save-modal {
		width: 94%;
		height: 25%;
	}

	.bottom-left-panel {
		flex-direction: row-reverse;
		align-items: flex-start !important;
		position: relative;
		padding-bottom: 0;
		margin-bottom: 0;
	}

	.top-left-panel {
		/* flex-direction: row-reverse; */
		align-items: flex-end !important;
	}

	.device-patching-svg {
		width: 200%;
		height: 100%;
	}

	.device-patching-svg.horizontal {
		width: 100%;
		height: 100%;
	}

	.top-left-panel select,
	.bottom-left-panel select {
		align-self: flex-start;
		margin-bottom: 10px;
	}

	.bottom-left-panel .panel-dropdown {
		position: absolute;
		left: 10px;
		bottom: 0px;
		z-index: 10;
		background: inherit;
		margin-bottom: 0;
		width: auto;
	}

	.modal-vdevice-selection {
		width: 92%;
		/* height: 90%; */
		height: 70%;
	}

	.modal-vdevice-selection-list {
		grid-template-columns: repeat(2, 1fr);
		max-width: 100px;
	}

	.modal-vdevice-list {
		height: 235px;
		/* height: 350px; */
		/* border: 3px solid orange; */
		background-color: #e0e0e0;
		margin: 3px;
		width: 99%;
	}

	.parameters-grid.right {
		display: flex;
		flex-direction: row;
		justify-content: space-around;
		align-items: flex-start;
		overflow-x: auto;
		width: 100%;
		min-width: 0;
	}

	.parameters-grid.right .parameter-box {
		order: 0;
		margin-bottom: 0;
		margin-top: 0;
	}
	.parameters-grid.right .parameter-name.right {
		position: static;
		writing-mode: vertical-rl;
		transform: none;
		padding: 0;
		margin: 0;
		text-align: center;
		white-space: normal;
		display: inline-block;
		order: 1;
	}
	.parameters-grid.right .text-wrapper {
		order: 1;
		margin-top: 4px;
		margin-bottom: 0;
		width: auto;
		display: flex;
		justify-content: center;
	}
}

/* Walker animation */
.walker {
	/* animation */
	width: 32px;
	height: 32px;
	background-repeat: no-repeat;
	image-rendering: pixelated;
	background-size: 192px 32px;
	animation: play-sprite 1s steps(5) infinite;
	animation-play-state: running;

	/* position */
	top: 50%;
	left: 50%;
	transform: translate(149%, -83%);
	z-index: 10;
}

.walker.paused {
	animation: none;
	background-position: -160px 0;
}

@keyframes play-sprite {
	from {
		background-position: 0px 0px;
	}
	to {
		background-position: -160px 0px;
	}
}
