/* ==================== ORDER FORM (block webmaster/order-form) ==================== */

/* .order-form > button .order-form__open + .order-form__modal (backdrop + dialog with form).
   Modal opens via :target without JS, via .is-open with JS (view.js). Button sizes — --order-btn-*. */

.order-form{
	margin: 0;
}

.order-form .order-form__open-wrap{
	width: 100%;
}

.order-form .order-form__open{
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: var(--order-btn-height);
	padding: 0 24px;
	border-radius: var(--radius-full);
	background: var(--color-accent);
	color: #fff;
	font-size: var(--order-btn-size);
	font-weight: 500;
	text-decoration: none;
	transition: background .2s ease;
}

.order-form .order-form__open:hover{
	background: var(--color-accent-hover);
	color: #fff;
}

html.has-order-form{
	overflow: hidden;
}

.order-form__modal{
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.order-form__modal:target,
.order-form__modal.is-open{
	display: flex;
}

.order-form__modal .order-form__backdrop{
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.order-form__modal .order-form__dialog{
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--order-dialog-width);
	max-height: calc(100vh - 32px);
	padding: var(--order-dialog-padding);
	overflow: auto;
	border-radius: var(--radius-xl);
	background: var(--color-bg);
	box-shadow: 0 24px 64px rgba(26, 26, 26, .2);
	color: var(--color-text);
	text-align: left;
	text-transform: none;
}

/* Закрыть: крестик в сером круге */
.order-form__modal .order-form__close{
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	border-radius: var(--radius-full);
	background: var(--color-surface);
	transition: background .2s ease;
}

.order-form__modal .order-form__close:hover{
	background: var(--color-accent-soft);
}

.order-form__modal .order-form__close::before,
.order-form__modal .order-form__close::after{
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	border-radius: 1px;
	background: var(--color-text);
	transform: translate(-50%, -50%) rotate(45deg);
}

.order-form__modal .order-form__close::after{
	transform: translate(-50%, -50%) rotate(-45deg);
}

.order-form__modal .order-form__title{
	margin: 0 44px 8px 0;
	font-family: var(--font-heading);
	font-size: var(--order-title-size);
	font-weight: 700;
	line-height: 1.25;
	color: var(--color-text);
}

.order-form__modal .order-form__product{
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--color-text-2);
}

.order-form__modal .order-form__price{
	display: block;
	margin-top: 2px;
	color: var(--color-accent);
	font-size: 18px;
	font-weight: 700;
}

.order-form__modal .order-form__message{
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: var(--radius-md);
	font-size: 15px;
	line-height: 1.4;
}

.order-form__modal .order-form__message.is-success{
	background: #e7f6ec;
	color: #0a6b2d;
}

.order-form__modal .order-form__message.is-error{
	background: #fde8e8;
	color: #b3161b;
}

/* ---------- Встроенная форма (если Fluent Forms выключен) ---------- */

.order-form__modal .order-form__form{
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 0;
}

.order-form__modal .order-form__form[hidden]{
	display: none;
}

/* Ловушка для ботов — за экраном, не display:none (часть ботов пропускает скрытые поля). */
.order-form__modal .order-form__hp{
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.order-form__modal .order-form__field{
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.order-form__modal .order-form__label{
	font-size: 14px;
	font-weight: 500;
}

.order-form__modal .order-form__textarea{
	resize: vertical;
}

.order-form__modal .order-form__consent{
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--color-text-2);
}

.order-form__modal .order-form__consent input{
	flex: none;
	margin: 2px 0 0;
	accent-color: var(--color-accent);
}

/* ---------- Поля и кнопка: встроенная форма + Fluent Forms (окно заявки, «Контакты», «Вопрос-ответ») ---------- */
/* Макет (Контакты → form): поле белое, рамка, радиус 6, поля 14×16; кнопка — оранжевая пилюля. */

.order-form__modal .order-form__fluent .fluentform .ff-el-group,
.contacts .contacts__form .fluentform .ff-el-group,
.faq-ask .fluentform .ff-el-group{
	margin-bottom: 14px;
}

.order-form__modal .order-form__fluent .fluentform .ff-el-input--label label,
.contacts .contacts__form .fluentform .ff-el-input--label label,
.faq-ask .fluentform .ff-el-input--label label{
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
}

.order-form__modal .order-form__fluent .fluentform .ff-el-is-required.asterisk-right label::after,
.contacts .contacts__form .fluentform .ff-el-is-required.asterisk-right label::after,
.faq-ask .fluentform .ff-el-is-required.asterisk-right label::after{
	color: var(--color-accent);
}

.order-form__modal .order-form__input,
.order-form__modal .order-form__fluent .fluentform .ff-el-form-control,
.contacts .contacts__form .fluentform .ff-el-form-control,
.faq-ask .fluentform .ff-el-form-control{
	box-sizing: border-box;
	width: 100%;
	padding: var(--field-pad);
	border: 1px solid var(--field-border);
	border-radius: var(--radius-md);
	background: var(--color-bg);
	box-shadow: none;
	color: var(--color-text);
	font-family: inherit;
	font-size: var(--field-size);
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.order-form__modal .order-form__input::placeholder,
.order-form__modal .order-form__fluent .fluentform .ff-el-form-control::placeholder,
.contacts .contacts__form .fluentform .ff-el-form-control::placeholder,
.faq-ask .fluentform .ff-el-form-control::placeholder{
	color: var(--color-muted);
}

.order-form__modal .order-form__input:focus,
.order-form__modal .order-form__fluent .fluentform .ff-el-form-control:focus,
.contacts .contacts__form .fluentform .ff-el-form-control:focus,
.faq-ask .fluentform .ff-el-form-control:focus{
	border-color: var(--color-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--color-accent-soft);
}

.order-form__modal .order-form__fluent .fluentform .ff_t_c,
.contacts .contacts__form .fluentform .ff_t_c,
.faq-ask .fluentform .ff_t_c,
.order-form__modal .order-form__fluent .fluentform .ff-el-form-check-label,
.contacts .contacts__form .fluentform .ff-el-form-check-label,
.faq-ask .fluentform .ff-el-form-check-label{
	font-size: 13px;
	line-height: 1.4;
	color: var(--color-text-2);
}

.order-form__modal .order-form__fluent .fluentform input[type="checkbox"],
.contacts .contacts__form .fluentform input[type="checkbox"],
.faq-ask .fluentform input[type="checkbox"]{
	accent-color: var(--color-accent);
}

.order-form__modal .order-form__submit,
.order-form__modal .order-form__fluent .fluentform .ff-btn-submit,
.contacts .contacts__form .fluentform .ff-btn-submit,
.faq-ask .fluentform .ff-btn-submit{
	width: 100%;
	min-height: 48px;
	padding: 12px 24px;
	border: 0;
	border-radius: var(--radius-full);
	background: var(--color-accent);
	color: #fff;
	font-family: inherit;
	font-size: var(--btn-size);
	font-weight: 500;
	text-transform: none;
	cursor: pointer;
	transition: background .2s ease;
}

/* На странице (Контакты, Вопрос-ответ) кнопка — по ширине текста, как в макете; в окне и на телефоне — во всю ширину */
.contacts .contacts__form .fluentform .ff-btn-submit,
.faq-ask .fluentform .ff-btn-submit{
	width: auto;
}

@media (max-width: 600px){
	.contacts .contacts__form .fluentform .ff-btn-submit,
	.faq-ask .fluentform .ff-btn-submit{
		width: 100%;
	}
}

.order-form__modal .order-form__submit:hover,
.order-form__modal .order-form__fluent .fluentform .ff-btn-submit:hover,
.contacts .contacts__form .fluentform .ff-btn-submit:hover,
.faq-ask .fluentform .ff-btn-submit:hover{
	background: var(--color-accent-hover);
	opacity: 1;
}

.order-form__modal .order-form__submit:disabled{
	opacity: .6;
	cursor: wait;
}

.order-form__modal .order-form__fluent .ff-message-success,
.contacts .contacts__form .ff-message-success,
.faq-ask .ff-message-success{
	margin: 0;
	padding: 12px 16px;
	border: 0;
	border-radius: var(--radius-md);
	background: #e7f6ec;
	box-shadow: none;
	color: #0a6b2d;
	font-size: 15px;
}
