/* Chord Display — theme-aware styles (piano keys stay fixed-color) */

.chord-app {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	max-width: 1100px;
	margin: 0 auto;
	background-color: var(--pico-background-color);
}

/* Status bar at top */
.status-bar {
	background: var(--pico-card-background-color);
	border-radius: var(--pico-border-radius);
	padding: 1rem 1.25rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	box-shadow: var(--pico-box-shadow);
	flex-flow: column;
}

:fullscreen .status-bar {
	flex: 2;
}

:fullscreen .midi-status {
	display: none;
}

.midi-status {
	display: flex;
	flex-direction: row;
	align-items: start;
	gap: 0.5rem;
	flex: 1;
	width: 100%;
}

#midi-status-text {
	font-size: 0.875rem;
	color: var(--pico-muted-color);
	flex: 2;
}

/* Fullscreen toggle button */
#fullscreen-btn {
	align-self: flex-end;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	padding: 0.25rem 0.5rem;
	border-radius: var(--pico-border-radius);
	color: var(--pico-muted-color);
	transition:
		background-color 0.2s,
		color 0.2s;
}

#fullscreen-btn:hover {
	background: var(--pico-card-background-color-hover);
	color: var(--pico-color);
}

/* Chord name display (center) */
.chord-display {
	text-align: center;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	scroll-snap-stop: always;
	scroll-snap-type: y mandatory;
}

#chord-name {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--pico-color);
	transition: opacity 0.2s;
	line-height: 1.2;
}

#key-label {
	font-size: 0.875rem;
	color: var(--pico-muted-color);
	margin-top: 0.25rem;
}

/* Piano container */
#piano-container {
	max-width: 100%;
	overflow-x: auto;
}

.piano {
	background: gray;
	border-radius: 0px 0px 16px 16px;
	padding: 10px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
	overflow-x: auto;
	width: fit-content;
	margin: auto;
}

.keys {
	display: flex;
	gap: 2px;
	position: relative;
}

.key {
	border-radius: 0px 0px 4px 4px;
	cursor: pointer;
	transition:
		background-color 0.1s,
		transform 0.1s,
		box-shadow 0.1s;
	position: relative;
}

/* Piano keys — fixed colors regardless of theme */
.key.white {
	width: 16px;
	height: 58px;
	background: white;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
	z-index: 0;
}

.key.black {
	background: black;
	width: 12px;
	margin-left: -7px;
	margin-right: -7px;
	height: 38px;
	margin-bottom: 15px;
	z-index: 1;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key.highlighted {
	background: #e94560 !important;
	box-shadow:
		0 0 15px rgba(233, 69, 96, 0.6),
		inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key.highlighted.black {
	background: #ff6b6b !important;
}

/* Fullscreen mode — only chord-display and piano-container visible */
.chord-app.fullscreen {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: var(--pico-background-color);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 2rem;
	padding: 2rem;
}

.chord-app.fullscreen .status-bar {
	max-width: 100%;
	width: 100%;
}

.chord-app.fullscreen #chord-name {
	font-size: 4rem;
}

@media (max-width: 768px) {
	.status-bar {
		flex-direction: column;
		text-align: center;
	}

	#chord-name {
		font-size: 1.75rem;
	}
}
