.form-section {
	background: url('/assets/four-section.svg') no-repeat center;
	padding: 75px 0;
	max-width: 1400px;
	margin: 0 auto;
	margin-top: 20px;
	border-radius: 16px;

	opacity: 0;
	transform: translateY(50px);
	transition: opacity 1s ease, transform 1s ease;
}

.form-section.visible {
	opacity: 1;
	transform: translateY(0);
}

.form-card {
	margin: 0 50px;
	max-width: 600px;
	padding: 32px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
	.form-card {
		padding: 24px;
		max-width: 90%;
	}
}

.form-card__title {
	margin-bottom: 24px;
	font-size: 2rem;
	font-weight: 700;
	color: #111;
}

.form-tabs {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
	list-style: none;
	white-space: nowrap;
}

.form-tabs li {
	position: relative;
	padding: 8px 16px 12px; /* верх/стороны/низ */
	background: #f5f5f5;
	border-radius: 8px;
	cursor: pointer;
	color: #555;
	font-weight: 500;
	white-space: nowrap;
}

.form-tabs li.active {
	background: transparent;
	color: #000;
}

.form-tabs li.active::after {
	content: '';
	position: absolute;
	bottom: 0; /* прижали к низу самого <li> */
	left: 0;
	width: 100%;
	height: 3px;
	background: #000;
	border-radius: 2px;
}

.form-tabs li .idx {
	margin-left: 6px;
	width: 18px;
	height: 18px;
	line-height: 18px;
	text-align: center;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 0.75rem;
	display: inline-block;
}

.form-tabs li .remove {
	position: absolute;
	top: 50%; /* по центру по вертикали */
	right: -10px; /* отступ от правого края таба */
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	background: #e00;
	color: #fff;
	border: none;
	border-radius: 50%;
	font-size: 12px;
	line-height: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.form-step {
	margin-bottom: 32px;
}

.form-step.hidden {
	display: none;
}

.form-room label {
	display: block;
	margin-bottom: 16px;
	font-size: 0.9rem;
	color: #333;
}

.form-room input {
	width: 100%;
	height: 48px;
	padding: 0 12px;
	border: 1px solid #111;
	border-radius: 8px;
	font-size: 1.2rem;
	background: #fff;
	font-family: 'Montserrat Alternates', sans-serif;
}

.form-controls {
	display: flex;
	gap: 16px;
	justify-content: flex-end;
}

#add-room-btn {
	position: relative;
	color: black;
	font-size: 18px;
	width: 300px;
	border: 1px solid black;
	border-radius: 10px;
	padding: 10px;
	overflow: hidden;
	cursor: pointer;

	transform: translateY(50px);
	transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.3s;
}

#add-room-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

#add-room-btn::before {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 0%;
	background: black;
	z-index: 0;
	transition: height 0.5s ease;
}

#add-room-btn .button-text {
	position: relative;
	z-index: 1; /* Текст всегда поверх */
	color: inherit;
	transition: color 0.5s ease;
}

#add-room-btn:hover::before,
#add-room-btn:focus::before {
	height: 100%;
}

#add-room-btn:hover,
#add-room-btn:active {
	color: white;
}

.form-controls button {
	position: relative;
	color: black;
	font-size: 18px;
	width: 300px;
	border: 1px solid black;
	border-radius: 10px;
	padding: 10px;
	overflow: hidden;
	cursor: pointer;

	transform: translateY(50px);
	transition: opacity 1s ease-out 0.5s, transform 1s ease-out 0.3s;
}

.form-controls button::before {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 0%;
	background: black;
	color: white;
	z-index: -1;
	transition: height 0.5s ease;
}

.form-controls button:hover::before {
	height: 100%;
}

.form-controls button:hover,
.form-controls button:active {
	color: white;
}

.form-card__subtitle {
	margin: 0 0 24px;
	font-size: 1.5rem;
	font-weight: 600;
	color: #111;
}

.form-room label {
	margin-bottom: 16px;
}

.form-room input {
	height: 48px;
}

@media (max-width: 768px) {
	.form-section {
		padding: 40px 10px;
	}

	.form-card {
		margin: 0 auto;
		padding: 20px;
		max-width: 95%;
	}

	.form-card__title {
		font-size: 1.5rem;
		text-align: center;
		margin-bottom: 16px;
	}

	.form-room label {
		font-size: 0.85rem;
		margin-bottom: 8px;
	}

	.form-room input,
	.custom-select-button {
		height: 44px;
		font-size: 1rem;
		padding: 0 10px;
	}

	.form-controls {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}

	.form-controls button {
		width: 100%;
		font-size: 16px;
		padding: 10px 0;
		transform: none;
	}

	#add-room-btn {
		width: 100%;
		font-size: 16px;
		padding: 10px 0;
		transform: none;
	}
}

@media (max-width: 480px) {
	.form-card__title {
		font-size: 1.3rem;
	}

	.form-tabs {
		font-size: 12px;
	}

	.custom-select-button {
		font-size: 14px;
		height: 40px;
	}

	.form-room input {
		font-size: 14px;
		height: 40px;
	}

	.form-controls button,
	#add-room-btn {
		font-size: 14px;
		padding: 8px 0;
	}
}

.custom-select {
	position: relative;
	font-family: 'Montserrat Alternates', sans-serif;
}

.custom-select-button {
	width: 100%;
	height: 48px;
	padding: 0 12px;
	border: 1px solid #111;
	border-radius: 8px;
	font-size: 14px;
	line-height: 48px;
	cursor: pointer;
	background: transparent;
	color: #000;
	position: relative;
}

.custom-select-button::after {
	content: '';
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
	width: 8px;
	height: 8px;
	border-right: 2px solid #555;
	border-bottom: 2px solid #555;
	pointer-events: none;
}

.custom-select-options {
	position: absolute;
	top: 52px;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	opacity: 0;
	transform: translateY(-10px);
	pointer-events: none;
	transition: all 0.3s ease;
	z-index: 10;
}

.custom-select.show .custom-select-options {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.custom-select-option {
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	transition: background 0.2s ease;
}

.custom-select-option:hover {
	background: #f5f5f5;
}

.popup-message {
	position: fixed;
	left: 50%;
	bottom: 10%;
	transform: translate(-50%, -50%) scale(0.9);
	background: #fff;
	border-radius: 10px;
	padding: 20px 30px;
	font-size: 18px;
	color: #111;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: all 0.4s ease;
	z-index: 1000;
}

.popup-message.show {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
	pointer-events: auto;
}

input.error {
	border: 1px solid red !important;
}
