/**
 * Game Controls frontend styles.
 *
 * @package Game_Engine
 * @since 0.8
 */

.ge-game-controls .ge-controls-row {
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* D-pad */
.ge-game-controls .ge-dpad {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ge-game-controls .ge-dpad-row {
	display: grid;
	grid-template-columns: repeat(3, 48px);
	gap: 4px;
	justify-items: center;
}

/* Shared button style */
.ge-game-controls .ge-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #666;
	border-radius: 6px;
	background: #2c2c2c;
	color: #eee;
	font-family: monospace;
	font-weight: 700;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
	box-shadow: 0 3px 0 #111;
	transition: box-shadow 0.05s, transform 0.05s;
}

.ge-game-controls .ge-btn:active,
.ge-game-controls .ge-btn.ge-btn--active {
	transform: translateY(2px);
	box-shadow: 0 1px 0 #111;
	background: #444;
}

/* Key buttons (WASD) */
.ge-game-controls .ge-btn-key {
	width: 48px;
	height: 48px;
	font-size: 16px;
}

/* Action buttons */
.ge-game-controls .ge-action-buttons {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ge-game-controls .ge-btn-action {
	width: 88px;
	height: 48px;
	font-size: 13px;
}

.ge-game-controls .ge-btn-space {
	width: 148px;
	height: 48px;
	font-size: 13px;
}

/* Fullscreen */
.ge-game-controls .ge-fullscreen-wrap {
	display: flex;
	align-items: flex-start;
}

.ge-game-controls .ge-btn-fullscreen {
	width: 48px;
	height: 48px;
	padding: 0;
}

.ge-game-controls .ge-btn-fullscreen svg {
	display: block;
}

/* Fullscreen: hide controls, scene fills the screen */
:fullscreen .ge-game-controls {
	display: none;
}

:fullscreen {
	background: #000;
	overflow: hidden;
}

/* Exit fullscreen hint */
:fullscreen .ge-fullscreen-exit {
	position: fixed;
	top: 12px;
	right: 12px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	z-index: 9999;
	opacity: 0;
	transition: opacity 0.3s;
}

:fullscreen:hover .ge-fullscreen-exit {
	opacity: 1;
}

/* Responsive: stack on small screens */
@media (max-width: 480px) {
	.ge-game-controls .ge-controls-row {
		gap: 12px;
		padding: 8px;
	}

	.ge-game-controls .ge-dpad-row {
		grid-template-columns: repeat(3, 42px);
	}

	.ge-game-controls .ge-btn-key {
		width: 42px;
		height: 42px;
		font-size: 14px;
	}

	.ge-game-controls .ge-btn-action {
		width: 76px;
		height: 42px;
	}

	.ge-game-controls .ge-btn-space {
		width: 120px;
		height: 42px;
	}

	.ge-game-controls .ge-btn-fullscreen {
		width: 42px;
		height: 42px;
	}
}
