html, body, main {
	width: 100%;
	height: 100%;
}

table {
	text-align: right;
	border-spacing: 0;
	font-family: monospace;
}

#chain td, th {
	padding: 0.375em;
}

body {
	display: flex;
	flex-direction: column;

	margin: 0;
	font-family:
		system-ui,
		-apple-system,
		"Segoe UI",
		Roboto,
		"Helvetica Neue",
		"Noto Sans",
		"Liberation Sans",
		Arial,
		sans-serif,
		"Apple Color Emoji",
		"Segoe UI Emoji",
		"Segoe UI Symbol",
		"Noto Color Emoji";
}

nav {
	padding: 0.25rem;
	margin-bottom: .125rem;
	display: flex;
	gap: 0.5rem;
	border-bottom: 1px solid;
}

input, span, button {
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 500;
}

#table {
	width: 100%;
}


#ticker input, #stop, #target, #leverage #number, #date, #position, #type, .delete, .strike, button {
	padding: 0.375rem 0.75rem;

	border: 1px solid lightgrey;
	border-radius: 5px;
}

.position, .type, .delete {
	color: white;
}

#leverage #number {
	max-width: 3em;
}

#leverage {
	display: flex;
	flex-direction: row;
}

#price {
	background-color: lightgrey;
	padding: 0.375rem 0.75rem;
	border-top-right-radius: 5px;
	border-bottom-right-radius: 5px;
}

#ticker {
	display: flex;
}

#ticker input {
	width: 100%;
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

#date {
	margin: 0 0 0 0;
}

main {
	flex-grow: 1;
	gap: 0.5rem;

	display: flex;
	flex-direction: row;

	min-height: 0;
	min-width: 0;
}

@media (orientation: portrait) {
	main {
		flex-direction: column;
	}

	nav {
		flex-direction: column;
	}

	#price-points  {
		width: 100%;
	}

	#ticker, ticker input, #slider {
		width: 100%;
	}

	.position, .type, .strike {
		width: 100%;
	}

}

@media (orientation: landscape) {
	#stop, #target, #leverage #number, #slider {
		max-width: 6em;
	}

	.position, .type, .strike {
		width: 6em;
	}

	#leverage {
		display: flex;
		flex-direction: row;
	}

	#price-points {
		margin-left: auto;
	}

	.strike {
		max-width: 6em;
	}

	#ticker input {
		max-width: 8em;
	}
}

#price-points input {
	width: 100%;
}

#price-points {
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
}

#canvas {
	display: block;
	object-fit: contain;

	flex-grow: 1;

}

canvas {
	width: 100%;
	height: 100%;
}

#chain {
	overflow: scroll;

	flex-shrink: 1;
}

#legs {
	flex-shrink: 1;
}

.selected {
	background-color: lightgrey;
}

.green {
	background-color: green;
}

.red {
	background-color: red;
}

.delete {
	color: black;
}

#legs div {
	display: flex;
	gap: .125em;
	padding-bottom: .125em;
}

