/* ===== ОСНОВНЫЕ СТИЛИ ===== */
.form-container {
	max-width: 1300px;
	width: 100%;
	background-color: #ffffff;
	border-radius: 28px;
	/* box-shadow: 0 20px 40px -10px rgba(0, 20, 40, 0.25); */
	/* padding: 35px 40px; */
}
.subhead {
	color: #546e7a;
	margin-bottom: 35px;
	font-size: 1rem;
	margin-left: 26px;
}
a.btn_opros {
    cursor: pointer;
    background: url(/upload/icon-oprosnik.png);
    background-position: 0px 2px;
    background-repeat: no-repeat;
    background-size: 30px;
}
form.formg fieldset {
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	padding: 28px 30px;
	margin-bottom: 35px;
	background-color: #fafcff;
}

form.formg legend {
	font-weight: 600;
	font-size: 1.3rem;
	background: white;
	padding: 6px 18px;
	border-radius: 40px;
	border: 1px solid #d0ddeb;
	color: #1a3b5d;
	box-shadow: 0 4px 8px rgba(0,0,0,0.02);
}

form.formg .form-row {
	display: flex;
	flex-direction: column;
	margin-bottom: 15px;
}

form.formg .form-row label {
	font-weight: 500;
	color: #1e293b;
	font-size: 0.95rem;
	margin-bottom: 10px;
}

form.formg .form-row .field-group {
	display: flex;
	flex-wrap: wrap;
	gap: 15px 25px;
	align-items: center;
	background: #ffffff;
	border-radius: 12px;
	padding: 5px 0;
	width: 100%;
}

form.formg .form-row .field-group label {
	text-align: left;
	padding-top: 0;
	font-weight: 400;
	color: #2d3a4b;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

form.formg input, form.formg select, form.formg textarea {
	width: 100%;
	padding: 10px 14px;
	font-size: 0.95rem;
	border: 1.5px solid #dde3ea;
	border-radius: 14px;
	background: white;
	transition: 0.15s;
	font-family: inherit;
}

form.formg input:focus, form.formg select:focus, form.formg textarea:focus {
	border-color: #2b7fc1;
	outline: none;
	box-shadow: 0 0 0 3px rgba(43, 127, 193, 0.2);
}

form.formg input[type="radio"], form.formg input[type="checkbox"] {
	width: auto;
	margin-right: 5px;
	accent-color: #2b7fc1;
	transform: scale(1.1);
}

form.formg .note {
	color: #5b6f82;
	font-size: 0.85rem;
	font-style: italic;
	background: #edf2f9;
	padding: 8px 14px;
	border-radius: 30px;
	line-height: 1.4;
	display: block;
	margin-top: 10px;
	max-width: max-content;
}

form.formg .note:empty {
	background: transparent;
	padding: 0;
}

form.formg textarea {
	resize: vertical;
	min-height: 80px;
}

form.formg .button-bar {
	display: flex;
	gap: 18px;
	justify-content: flex-end;
	margin-top: 20px;
	flex-wrap: wrap;
}

form.formg .btn {
	border: none;
	background: #1e3b5c;
	color: white;
	padding: 14px 38px;
	font-size: 1.05rem;
	border-radius: 40px;
	font-weight: 500;
	cursor: pointer;
	transition: 0.2s;
	box-shadow: 0 8px 16px -6px rgba(0,45,80,0.2);
	border: 1px solid #1e3b5c;
}

form.formg .btn:hover {
	background: #12314d;
	transform: scale(1.02);
}

form.formg .btn-outline {
	background: white;
	color: #1e3b5c;
	border: 1.5px solid #b3c9db;
	box-shadow: none;
}

form.formg .btn-outline:hover {
	background: #e4edf5;
	border-color: #1e3b5c;
	transform: none;
}

.consent-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 25px 0 20px;
	padding: 10px 20px;
	background: #f4f8fe;
	border-radius: 50px;
	border: 1px solid #d0ddeb;
}
.consent-row input[type="checkbox"] {
	transform: scale(1.2);
	margin-right: 8px;
}
.consent-row a {
	color: #1e3b5c;
	text-decoration: underline;
	font-weight: 500;
}
.consent-row a:hover {
	text-decoration: none;
}

@media (max-width: 800px) {
	.form-container {
		padding: 20px 15px;
	}
	fieldset {
		padding: 18px 15px;
	}
	.form-row {
		grid-template-columns: 1fr;
		gap: 5px;
	}
	.form-row label {
		text-align: left;
		font-weight: 600;
		padding-top: 5px;
	}
	.note {
		margin-top: 2px;
		margin-bottom: 8px;
	}
	legend {
		font-size: 1.2rem;
	}
	.button-bar {
		justify-content: center;
	}
	.consent-row {
		flex-wrap: wrap;
		border-radius: 30px;
		padding: 15px;
	}
}

@media (max-width: 480px) {
	.field-group {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

::placeholder {
	color: #9aaebb;
	opacity: 1;
}

input[type="number"] {
	-moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button {
	opacity: 0.5;
}

/* ===== КАСТОМНЫЕ МОДАЛЬНЫЕ ОКНА ===== */
.modal-custom {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0,0,0,0.5);
	z-index: 1000;
	justify-content: center;
	align-items: center;
	animation: fadeIn 0.2s ease;
}

.modal-custom.active {
	display: flex;
}

.modal-custom__dialog {
	background: white;
	/* border-radius: 28px; */
	width: 90%;
	max-width: 1300px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 40px rgba(0,0,0,0.3);
	animation: slideDown 0.2s ease;
}

.modal-custom__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 30px;
	border-bottom: 1px solid #e2e8f0;
	background-color: #fafcff;
	border-radius: 28px 28px 0 0;
	position: sticky;
	top: 0;
	background: white;
	z-index: 10;
}

.modal-custom__title {
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0;
	color: #1a3b5d;
}

.modal-custom__close {
	font-size: 38px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	line-height: 1;
	color: #7e8c9e;
	transition: color 0.2s;
}
.modal-custom__close:hover {
	color: #1e3b5c;
}

.modal-custom__body {
	padding: 20px 30px 30px;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes slideDown {
	from {
		transform: translateY(-30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Кнопки открытия */
.open-modal-buttons {
	text-align: center;
	margin: 40px 0;
}
.open-modal-buttons .btn {
	margin: 0 15px;
}


/* Контейнер с чекбоксами */
.checkbox-group label {
  position: relative;
  display: inline-block;
  padding-left: 28px;
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
  line-height: 1.4;
}

/* Скрываем стандартный чекбокс */
.checkbox-group label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Круглая рамка (псевдоэлемент before) */
.checkbox-group label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 15px;
  height: 15px;
  border: 1px solid #757575;
  background-color: #fff;
  border-radius: 50%;
  transition: all 0.2s ease;
}

/* Галочка (псевдоэлемент after) */
.checkbox-group label::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.1s ease;
}

/* Когда чекбокс выбран, меняем цвет круга и показываем галочку */
.checkbox-group label:has(input:checked)::before {
  background-color: #2196F3;
  border-color: #2196F3;
}

.checkbox-group label:has(input:checked)::after {
  opacity: 1;
}

/* Эффект при наведении на метку */
.checkbox-group label:hover::before {
  border-color: #888;
  background-color: #f5f5f5;
}

/* Фокус для доступности (опционально) */
.checkbox-group label input:focus-visible + ::before {
  outline: 2px solid #2196F3;
  outline-offset: 2px;
}