/* Overlay para escurecer o fundo */
.modalOverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 998;
	display: none;
}

.modalOpen .modalOverlay {
	display: block;
}

.modal {
	z-index: 1000;
	position: fixed;

	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);

	width: 90%;
	max-width: 600px;

	background-color: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);

	padding: 20px;
	flex-direction: column;
	gap: 20px;
}

.addGameModalTitle {
	text-transform: uppercase;
}

.modal input {
	padding: 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 16px;
	transition: border-color 0.2s ease;
}

.modal input:focus {
	border-color: #007bff;
	outline: none;
}

/* ORGANIZAÇÃO DOS INPUTS */
#addGameForm {
	margin-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.inputContainer {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	flex: 1;
}

.inputPlayersNumber {
	display: flex;
	gap: 2rem;
	justify-content: space-between;
}

/* EFEITO DAS LABELS */
.inputContainer label {
	position: absolute;
	top: 50%;
	left: 12px;
	transform: translateY(-50%);
	font-size: 16px;
	color: #777;
	transition: all 0.2s ease;
	pointer-events: none;
}

.modal input:focus + label,
.modal input:not(:placeholder-shown) + label {
	top: 15%;
	font-size: 12px;
	color: #007bff;
	background-color: #fff;
	padding: 0 4px;
	transform: translateY(-100%);
}

/* BOTÕES */
.buttonsContainer {
	display: flex;
	gap: 1rem;
	align-self: flex-end;
}

.modal button {
	background-color: #007bff;
	color: white;
	border: none;
	padding: 10px 20px;
	font-size: 16px;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.modal button:hover {
	background-color: #0056b3;
}

.modal button[type='button'] {
	background-color: #fff;
	color: #0056b3;
}

.modal button[type='button']:hover {
	background-color: #f4f4f4;
}

.modal button:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
	.modal {
		max-width: 80%;
	}

	.inputPlayersNumber {
		flex-direction: column;
		gap: 1rem;
	}
}
