/**
 * WebNO Zendesk Form – styling.
 * Every value is driven by custom properties so the look can be adapted to
 * each site (matched against its existing design) without touching the rest.
 */

.webno-zf {
	/* Override these per site: */
	--webno-zf-color-primary: #2e7d32;          /* button/accent */
	--webno-zf-color-primary-hover: #1b5e20;
	--webno-zf-color-primary-contrast: #ffffff; /* text on button */
	--webno-zf-color-text: #1f2933;
	--webno-zf-color-border: #cbd2d9;
	--webno-zf-color-input-bg: #ffffff;
	--webno-zf-color-error: #b42318;
	--webno-zf-color-error-bg: #fef3f2;
	--webno-zf-color-success: #067647;
	--webno-zf-color-success-bg: #ecfdf3;
	--webno-zf-radius: 6px;
	--webno-zf-spacing: 1rem;
	--webno-zf-font-size: 1rem;
	--webno-zf-focus-ring: 0 0 0 3px rgba(46, 125, 50, 0.25);

	color: var(--webno-zf-color-text);
	font-size: var(--webno-zf-font-size);
}

.webno-zf__form {
	display: flex;
	flex-direction: column;
	gap: var(--webno-zf-spacing);
}

/* Two columns on wide screens, one on mobile */
.webno-zf__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--webno-zf-spacing);
}

@media (max-width: 640px) {
	.webno-zf__row {
		grid-template-columns: 1fr;
	}
}

.webno-zf__field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.webno-zf__label {
	font-weight: 600;
}

.webno-zf__input {
	font: inherit;
	color: inherit;
	background: var(--webno-zf-color-input-bg);
	border: 1px solid var(--webno-zf-color-border);
	border-radius: var(--webno-zf-radius);
	padding: 0.625rem 0.75rem;
	width: 100%;
	box-sizing: border-box;
}

.webno-zf__input:focus {
	outline: none;
	border-color: var(--webno-zf-color-primary);
	box-shadow: var(--webno-zf-focus-ring);
}

.webno-zf__input--invalid {
	border-color: var(--webno-zf-color-error);
}

.webno-zf__textarea {
	resize: vertical;
	min-height: 8rem;
}

.webno-zf__error {
	margin: 0;
	font-size: 0.875em;
	color: var(--webno-zf-color-error);
}

/* Honeypot: moved off-viewport, but NOT display:none (some bots skip that).
   aria-hidden + tabindex=-1 in the markup keep the field away from screen
   readers and keyboard users. */
.webno-zf__hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.webno-zf__status {
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: var(--webno-zf-radius);
}

.webno-zf__status--success {
	color: var(--webno-zf-color-success);
	background: var(--webno-zf-color-success-bg);
}

.webno-zf__status--error {
	color: var(--webno-zf-color-error);
	background: var(--webno-zf-color-error-bg);
}

.webno-zf__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font: inherit;
	font-weight: 600;
	color: var(--webno-zf-color-primary-contrast);
	background: var(--webno-zf-color-primary);
	border: none;
	border-radius: var(--webno-zf-radius);
	padding: 0.75rem 2rem;
	cursor: pointer;
	align-self: flex-start;
	transition: background-color 0.15s ease;
}

.webno-zf__submit:hover:not(:disabled),
.webno-zf__submit:focus-visible {
	background: var(--webno-zf-color-primary-hover);
}

.webno-zf__submit:focus-visible {
	outline: none;
	box-shadow: var(--webno-zf-focus-ring);
}

.webno-zf__submit:disabled {
	opacity: 0.7;
	cursor: default;
}

/* Simple spinner while sending */
.webno-zf__spinner {
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: webno-zf-spin 0.7s linear infinite;
}

@keyframes webno-zf-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.webno-zf__spinner {
		animation-duration: 2s;
	}
}
