/* Базовые стили */
.form-page {
	display: flex;
	align-items: flex-start;
	gap: 30px;
	margin-top: 60px;
	position: relative;
}

.form-page .wave_big {
	top: 510px;
	right: -500px;
}
.form-page .wave_small {
	top: 80px;
	left: -250px;
}
.form-page .wave_small.small2 {
	top: 1230px;
	left: -250px;
}

.form {
	width: 100%;
}

.form h2 {
	color: var(--site-white-color);
	display: inline-block;
	border-radius: var(--site-border-radius);
	background-color: var(--site-accent-color);
	padding: 18px 30px;
	margin-bottom: 60px;
}

.section-contact {
	margin-bottom: 100px;
}

.form .intro {
	margin-bottom: 30px;
	font-weight: 700;
}

.form-group {
	position: relative;
	margin-bottom: 60px;
}

.form-group label {
	display: block;
	position: absolute;
	left: 0;
	bottom: 8px;
	transition: var(--site-transition);
}

.textarea.form-group label {
	top: 16px;
	left: 15px;
	transform: translate(0, 0);
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 9px 0;
	border-bottom: 1px solid var(--site-white-color);
	transition: var(--site-transition);
	caret-color: var(--site-white-color);
}

.form-group input {
	border-radius: 0;
}

.form-group textarea {
	border-radius: var(--site-border-radius);
	border: 1px solid var(--site-white-color);
	background: #ffffff12;
}

.form-group input:focus,
.form-group textarea:focus {
	border-color: var(--site-accent-color);
	outline: none;
}

.form-group input:focus + label,
.form-group label.active {
	bottom: 40px;
	font-size: 18px;
	transform: translateY(0);
}

.form-group textarea:focus + label,
.form-group.textarea label.active {
	top: -29px;
	font-size: 18px;
	left: 0;
}

.form-group textarea {
	height: 200px;
	resize: none;
	padding: 15px;
}

.error-message {
	display: none;
	color: var(--site-accent-color);
	font-size: 18px;
	position: absolute;
	line-height: 20px;
	bottom: -25px;
	left: 0;
}

.error-message.visible {
	display: block;
}

.required {
	color: var(--site-accent-color);
}

.form-group input:-webkit-autofill {
	box-shadow: 0 0 0 1000px transparent inset !important;
	-webkit-box-shadow: 0 0 0 1000px transparent inset !important;
	-webkit-text-fill-color: var(--site-white-color);
	transition: background-color 9999s ease-in-out 0s !important;
}

/* Общий контейнер */
.custom-select-group {
	position: relative;
	cursor: pointer;
}

.custom-select {
	position: relative;
	padding: 9px 0;
	border-bottom: 1px solid var(--site-white-color);
	background-color: var(--site-dark-accent-color);
	color: var(--site-white-color);
	/* transition: var(--site-transition); */
	height: 45px;
	display: flex;
	align-items: center;
}

/* .custom-select:focus-within,
.custom-select.open {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
} */

/* Стрелка */
.custom-select svg {
	pointer-events: none;
	transition: var(--site-transition);
	position: absolute;
	top: 50%;
	right: 0;
	transform: translate(0, -50%) rotate(180deg);
}

.custom-select.open {
	/* border: none; */
}

.custom-select.open svg {
	transform: translate(0, -50%);
}

/* Выбранный текст */
.custom-select .selected {
	position: relative;
	z-index: 2;
	pointer-events: none;
}

/* Список опций */
.custom-select .options {
	position: absolute;
	top: calc(100% + 1px);
	left: 0;
	width: 100%;
	background-color: var(--site-dark-accent-color);
	border: none;
	padding: 0px 1px;
	/* border-top: 1px solid var(--site-white-color); */

	border-radius: 0 0 var(--site-border-radius) var(--site-border-radius);
	max-height: 0;
	overflow: hidden;
	/* transition: max-height 0.3s ease; */
	z-index: -1;
}

.custom-select .options.open {
	max-height: 500px;
	/* overflow-y: auto; */
	padding: 0;
	z-index: 7;
	border: 1px solid var(--site-white-color);
	top: calc(100%);
}

.custom-select .options li {
	padding: 10px 12px;
	cursor: pointer;
	transition: background 0.2s;
}

.custom-select .options li:hover {
	background-color: var(--site-accent-color);
}

/* Лейбл */
.custom-select-group label {
	position: absolute;
	bottom: 50%;
	left: 0;
	color: var(--site-white-color);
	transition: var(--site-transition);
	pointer-events: none;
	transform: translate(0, 50%);
	z-index: 1;
}

.custom-select.selected-active label,
.custom-select-group label.active {
	top: -18px;
	font-size: 18px;
	color: var(--site-white-color);
	z-index: 1;
	transform: translate(0, 0);
}

/* Radio */
.radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--site-white-color);
	margin-bottom: 60px;
}

.radio-group legend {
	margin-bottom: 20px;
	font-size: 20px;
	line-height: 26px;
	font-family: var(--site-font-family);
}

.radio-options {
	display: flex;
	gap: 130px;
}

.radio-option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
	cursor: pointer;
	color: var(--site-white-color);
}

.radio-option input[type="radio"] {
	opacity: 0;
	position: absolute;
	pointer-events: none;
}

.custom-radio {
	width: 20px;
	height: 20px;
	border: 1px solid var(--site-white-color);
	border-radius: 50%;
	display: inline-block;
	position: relative;
	transition: var(--site-transition);
}

.radio-option input[type="radio"]:checked + .custom-radio::after {
	content: "";
	width: 12px;
	height: 12px;
	background-color: var(--site-accent-color);
	border-radius: 50%;
	position: absolute;
	top: 3px;
	left: 3px;
}

/* Загрузка файлов */
.file-upload-group {
	display: flex;
	justify-content: space-between;
	gap: 15px;
	line-height: 26px;
	margin-bottom: 45px;
}

.file-upload-group .note {
	color: var(--site-accent-color);
}

/* Кнопка */
.form-actions {
	text-align: center;
	margin: 20px 0 50px;
}

.upload-wrapper {
	display: flex;
	flex-direction: column;
	gap: 1em;
}

.upload-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--site-accent-color);
	color: var(--site-white-color);
	border: none;
	border-radius: var(--site-border-radius);
	padding: 10px 20px;
	font-size: 18px;
	line-height: 26px;
	cursor: pointer;
	transition: var(--site-transition);
}

.upload-btn:hover {
	background-color: var(--site-white-color);
	color: var(--site-accent-color);
}
.upload-btn:hover svg path {
	stroke: var(--site-accent-color);
}

.file-preview {
	display: flex;
	flex-direction: column;
	gap: 15px;
	margin-bottom: 45px;
}

.file-preview.hidden {
	display: none;
}
.preview-item {
	border: 1px solid var(--site-white-color);
	border-radius: var(--site-border-radius);
	padding: 8px;
	width: 100%;
	text-align: center;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 15px;
	position: relative;
}

.preview-item img {
	max-width: 100%;
	max-height: 100px;
	object-fit: cover;
	border-radius: var(--site-border-radius);
}

.preview-item .remove-btn {
	top: 10px;
	right: 15px;
	position: absolute;
	cursor: pointer;
}

.last-img {
	height: 420px;
}

#form-message {
	font-size: 22px;
	font-weight: 600;
	line-height: 1;
	margin: 30px 0;
}

#form-message.success {
	color: var(--site-green-color);
}
#form-message.error {
	color: var(--site-accent-color);
}

.checkbox-group {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 45px;
	color: var(--site-white-color);
}

.form-group .checkbox-label {
	display: flex;
	align-items: center;
	cursor: pointer;
	position: relative;
	transform: none;
}

.form-group .checkbox-label input[type="checkbox"] {
	opacity: 0;
	position: absolute;
}

.form-group .custom-checkbox {
	width: 20px;
	height: 20px;
	min-width: 20px;
	border: 1px solid var(--site-white-color);
	border-radius: var(--site-border-radius);
	display: inline-block;
	margin-right: 10px;
	position: relative;
}

.form-group .checkbox-label.active {
	position: relative;
	top: 0;
	display: flex;
	align-items: center;
	font-size: 20px;
}

.custom-checkbox .checkmark {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: none; /* по умолчанию скрыта */
	pointer-events: none;
	width: 14px;
}

.form-group .checkbox-label input[type="checkbox"]:checked + .custom-checkbox .checkmark {
	display: block;
}

.form-group.checkbox-group.has-error .custom-checkbox {
	border: 1px solid var(--site-accent-color);
}

.honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 767px) {
	.form-actions {
		margin: 30px auto;
		display: flex;
		justify-content: center;
	}
}

@media (max-width: 560px) {
	.form-page {
		padding-top: 80px;
		margin-top: 0;
	}

	.form h2 {
		padding: 12px 20px;
		margin-bottom: 36px;
		font-size: 18px;
		line-height: 22px;
	}

	.form .intro {
		font-size: 28px;
		line-height: 30px;
		text-align: center;
		margin-bottom: 36px;
	}

	.section-contact {
		margin-bottom: 60px;
	}

	.form-group {
		margin-bottom: 36px;
		line-height: 1.2;
	}

	.form-group.checkbox-group {
		margin-bottom: 50px;
	}

	.form-group.textarea {
		margin-bottom: 20px;
	}

	.form-group .checkbox-label.active {
		font-size: 16px;
	}

	/* .form-group.required-field {
		font-weight: 600;
	} */

	.form-group input:focus + label,
	.form-group label.active {
		font-weight: 400;
		font-size: 12px;
		line-height: 14px;
		bottom: 36px;
	}

	.custom-select {
		height: 38px;
	}

	.custom-select-group label.active,
	.custom-select-group label.active {
		top: auto;
	}

	.form-group input:focus {
		border-color: var(--site-white-color);
	}

	.form-group.checkbox-group label.active {
		font-size: 16px;
		line-height: 20px;
	}

	.form-group textarea {
		height: 100px;
		padding: 12px 14px;
	}

	.form-group textarea:focus + label,
	.form-group.textarea label.active {
		font-weight: 400;
		font-size: 12px;
		line-height: 14px;
		top: -22px;
	}

	.section-yacht {
		position: relative;
	}

	.section-yacht h2 {
		margin-bottom: 20px;
	}

	.section-yacht .wave_big {
		top: 0;
		left: 175px;
		right: auto;
	}

	.section-yacht .wave_small.textarea-bottom-wave {
		position: relative;
		top: 0;
		left: -36px;
		margin: 20px 0;
	}

	.radio-group {
		position: relative;
	}

	.radio-group .wave_small {
		position: relative;
		top: 0;
		left: auto;
		right: -105px;
		margin: 20px 0 0;
	}

	.section-yacht .g-img {
		margin-bottom: 36px;
		height: 380px;
		background-position: center;
		object-fit: cover;
	}

	.radio-group {
		margin-bottom: 36px;
	}

	.radio-group legend {
		font-size: 16px;
		line-height: 22px;
	}

	.last-img {
		height: 240px;
		background-position: center;
		background-size: cover;
	}

	.error-message {
		font-size: 12px;
		line-height: 22px;
		top: 100%;
	}

	.preview-text {
		margin-bottom: 18px;
	}

	.file-upload-group {
		align-items: center;
		line-height: 1.2;
	}

	.preview-item {
		flex-direction: column;
	}

	.bottom-block {
		position: relative;
		padding-bottom: 85px;
	}

	.bottom-block .wave_big.mobile_wave.left {
		top: auto;
		bottom: 6px;
	}

	#form-message {
		font-size: 16px;
	}
}
