/* Заявка оптовика. Кольори беруться з токенів теми, а не дублюються:
   якщо палітра зміниться, форма поїде за нею. */

.sg-ws {
	margin-top: 26px;
}

button.sg-ws-open {
	background: var(--sg-accent, #a6822e);
	color: #fff;
	border: 0;
	cursor: pointer;
}

/* --- вікно --- */

.sg-ws-modal {
	position: fixed;
	inset: 0;
	z-index: 140;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/*
 * Закрите вікно.
 *
 * Скрипт відкриває й закриває вікно атрибутом hidden, але браузерне
 * правило [hidden]{display:none} має майже нульову специфічність — і
 * будь-який display за класом його перебиває. Без цього рядка анкета
 * стоїть розгорнутою з моменту завантаження сторінки, а хрестик
 * знімає атрибут, якого ніхто не бачить.
 */
.sg-ws-modal[hidden] {
	display: none;
}

.sg-ws-back {
	position: absolute;
	inset: 0;
	background: rgba(16, 13, 10, .55);
}

.sg-ws-box {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	overflow-y: auto;
	padding: 30px 30px 26px;
	border-radius: var(--sg-radius-lg, 12px);
	background: #fff;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
	text-align: left;
}

.sg-ws-x {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: var(--sg-muted, #6b6259);
	cursor: pointer;
}

.sg-ws-x:hover {
	background: var(--sg-card, #f7f4ef);
}

.sg-ws-box h3 {
	margin: 0 0 6px;
	font-size: 22px;
	color: var(--sg-ink, #1c1917);
}

.sg-ws-lead {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--sg-muted, #6b6259);
}

/* --- поля --- */

.sg-ws-field {
	display: block;
	margin-bottom: 14px;
}

.sg-ws-label {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 500;
	color: var(--sg-ink, #1c1917);
}

.sg-ws-label b {
	color: var(--sg-accent, #a6822e);
}

.sg-ws-field input,
.sg-ws-field select,
.sg-ws-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--sg-line, #ddd6c9);
	border-radius: 10px;
	background: #fff;
	font-family: var(--sg-font, system-ui);
	font-size: 15px;
	color: var(--sg-ink, #1c1917);
	outline: none;
}

.sg-ws-field textarea {
	resize: vertical;
	min-height: 74px;
	line-height: 1.5;
}

.sg-ws-field input:focus,
.sg-ws-field select:focus,
.sg-ws-field textarea:focus {
	border-color: var(--sg-accent, #a6822e);
}

.sg-ws-field small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--sg-faint, #9a9188);
}

/* Пастка для роботів: людині її не видно, читалки теж пропускають —
   поле сховане і з розмітки (aria-hidden), і з розкладки. */
.sg-ws-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sg-ws-submit {
	width: 100%;
	margin-top: 6px;
	border: 0;
	cursor: pointer;
	background: var(--sg-accent, #a6822e);
	color: #fff;
}

.sg-ws-submit:disabled {
	opacity: .6;
	cursor: default;
}

.sg-ws-note {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--sg-muted, #6b6259);
}

.sg-ws-note.is-ok {
	color: #3f6b34;
	font-weight: 500;
}

.sg-ws-note.is-err {
	color: #b3261e;
}

.sg-ws-privacy {
	margin: 12px 0 0;
	font-size: 12px;
	line-height: 1.45;
	color: var(--sg-faint, #9a9188);
}

.sg-ws-privacy a {
	color: var(--sg-accent-dark, #8a6a2f);
}

/* Сторінка під вікном не має прокручуватись: інакше на телефоні форма
   «тікає» з-під пальця. */
body.sg-ws-locked {
	overflow: hidden;
}

@media (max-width: 767px) {
	.sg-ws-modal {
		padding: 0;
		align-items: flex-end;
	}

	.sg-ws-box {
		max-width: none;
		max-height: 92vh;
		padding: 24px 18px 20px;
		border-radius: 16px 16px 0 0;
	}

	button.sg-ws-open {
		width: 100%;
	}
}
