/* Web Soft System Core: form and consent UI. Uses the theme tokens when present. */

.wss-form {
	--f-ink: var(--wss-ink, #101820);
	--f-soft: var(--wss-ink-soft, #4A5566);
	--f-line: #B9C3CF;
	--f-bg: var(--wss-white, #fff);
	--f-focus: var(--wss-blue-ink, #3F5F8F);
	--f-error: #A3261E;
	--f-ok: #1F6B45;
	color: var(--f-ink);
	font-family: var(--wss-font, system-ui, sans-serif);
}
.wss-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem 1.25rem;
}
.wss-field { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.wss-field--full { grid-column: 1 / -1; }
.wss-field label { font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--f-ink); }
.wss-req { color: var(--f-error); }
.wss-opt { font-weight: 400; color: var(--f-soft); }
.wss-field input[type="text"],
.wss-field input[type="email"],
.wss-field input[type="tel"],
.wss-field select,
.wss-field textarea {
	width: 100%;
	min-height: 52px;
	padding: .8rem .95rem;
	background: var(--f-bg);
	border: 1px solid var(--f-line);
	border-radius: var(--wss-radius, 3px);
	color: var(--f-ink);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color .2s, box-shadow .2s;
}
.wss-field select {
	appearance: none;
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5 6 8.5l4-4' fill='none' stroke='%23101820' stroke-width='1.6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
}
.wss-field textarea { min-height: 160px; resize: vertical; }
.wss-field input:focus,
.wss-field select:focus,
.wss-field textarea:focus {
	outline: none;
	border-color: var(--f-focus);
	box-shadow: 0 0 0 3px rgba(63, 95, 143, .22);
}
.wss-field [aria-invalid="true"] { border-color: var(--f-error); }
.wss-field__hint { margin: 0; font-size: .8125rem; color: var(--f-soft); }
.wss-field__error {
	margin: 0;
	font-size: .875rem;
	font-weight: 600;
	color: var(--f-error);
}
.wss-field--check { flex-direction: row; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.wss-field--check input[type="checkbox"] {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin: .1rem 0 0;
	accent-color: var(--wss-navy, #07111F);
}
.wss-field--check label { flex: 1; font-weight: 400; color: var(--f-soft); }
.wss-field--check label a { color: var(--f-focus); }
.wss-field--check .wss-field__error { flex-basis: 100%; padding-left: 34px; }

.wss-form__hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.wss-form__status {
	margin-bottom: 1.5rem;
	padding: 1rem 1.2rem;
	border-left: 3px solid var(--f-error);
	background: #FBEDEC;
	color: #6E1A14;
	font-weight: 600;
	line-height: 1.5;
}
.wss-form__status[data-type="success"] { border-left-color: var(--f-ok); background: #E9F5EE; color: #144A30; }
.wss-form__status:focus { outline: none; }
.wss-form__status[hidden] { display: none; }

.wss-form__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	margin-top: 1.75rem;
}
.wss-form__note { margin: 0; font-size: .8125rem; color: var(--f-soft); }
.wss-form__submit[disabled] { opacity: .7; cursor: progress; }
.wss-form.is-sending .wss-form__submit { cursor: progress; }

@media (max-width: 640px) {
	.wss-form__grid { grid-template-columns: 1fr; }
	.wss-form__submit { width: 100%; }
}

/* Consent banner ------------------------------------------------------- */
.wss-consent {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 1000;
	max-width: 560px;
	background: var(--wss-paper, #F8F9FB);
	color: var(--wss-ink, #101820);
	border: 1px solid var(--wss-line, #D9E0E8);
	border-top: 2px solid var(--wss-gold, #C8A96B);
	border-radius: var(--wss-radius-lg, 6px);
	box-shadow: 0 24px 60px -20px rgba(7, 17, 31, .45);
	font-family: var(--wss-font, system-ui, sans-serif);
	font-size: .9375rem;
	line-height: 1.55;
}
.wss-consent[hidden] { display: none; }
.wss-consent__inner { padding: 1.5rem; max-height: 80vh; overflow-y: auto; }
.wss-consent__title { margin: 0 0 .5rem; font-size: 1.125rem; font-weight: 650; color: var(--wss-navy, #07111F); }
.wss-consent p { margin: 0 0 1rem; color: var(--wss-ink-soft, #4A5566); }
.wss-consent a { color: var(--wss-blue-ink, #3F5F8F); }
.wss-consent__prefs { display: grid; gap: .75rem; margin-bottom: 1rem; }
.wss-consent__prefs[hidden] { display: none; }
.wss-consent__pref { display: flex; gap: .75rem; align-items: flex-start; }
.wss-consent__pref input { width: 20px; height: 20px; margin-top: .15rem; flex-shrink: 0; accent-color: var(--wss-navy, #07111F); }
.wss-consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.wss-consent__actions .wss-btn { min-height: 46px; padding: .6rem 1.1rem; flex: 1 1 auto; }
.wss-consent__actions .wss-btn--line { color: var(--wss-ink, #101820); border-color: rgba(16, 24, 32, .35); }
.wss-consent__actions [hidden] { display: none; }
@media (min-width: 640px) {
	.wss-consent { right: auto; left: 24px; bottom: 24px; }
}
