.stws-form {
	width: 100%;
	box-sizing: border-box;
}

.stws-form *,
.stws-form *::before,
.stws-form *::after {
	box-sizing: border-box;
}

.stws-field {
	display: block;
	margin: 0 0 1.1rem 0;
}

.stws-field .stws-label {
	display: block;
	font-weight: 600;
	margin: 0 0 0.35rem 0;
	line-height: 1.3;
}

.stws-required {
	color: #c0392b;
	margin-left: 2px;
}

.stws-form input[type="text"],
.stws-form input[type="number"],
.stws-form input[type="email"],
.stws-form input[type="tel"],
.stws-form input[type="date"],
.stws-form input[type="time"],
.stws-form select,
.stws-form textarea {
	width: 100%;
	display: block;
	/* `height: auto` defeats themes that pin a fixed height on inputs
	   (which, combined with our padding + border-box, can clip text).
	   `min-height` guarantees a comfortable tap target. */
	height: auto;
	min-height: 2.75rem;
	box-sizing: border-box;
	padding: 0.75rem;
	font-size: 1rem;
	line-height: 1.5;
	border: 1px solid #ccc;
	border-radius: 6px;
	background: #fff;
	color: var(--stws-field-color, #222);
	font-family: inherit;
	vertical-align: middle;
}

.stws-form select {
	min-height: 3rem;
}

/* Native dropdown options. Browsers handle these inconsistently, but
   this works in Chrome/Firefox on most OSes. */
.stws-form select option {
	color: var(--stws-field-color, #222);
	background: #fff;
}

.stws-form textarea {
	min-height: 120px;
	resize: vertical;
}

.stws-form input:focus,
.stws-form select:focus,
.stws-form textarea:focus {
	outline: none;
	border-color: #25D366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2);
}

.stws-field--invalid input,
.stws-field--invalid select,
.stws-field--invalid textarea {
	border-color: #c0392b;
}

.stws-field .stws-option {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0;
	line-height: 1.4;
	cursor: pointer;
	min-height: 44px;
}

.stws-field .stws-option input {
	margin: 0;
	flex: 0 0 auto;
	width: auto;
	min-width: 18px;
	min-height: 18px;
}

.stws-help {
	display: block;
	margin-top: 0.3rem;
	color: #666;
	font-size: 0.875rem;
}

.stws-submit {
	width: 100%;
	padding: 0.9rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background: #25D366;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1.3;
	transition: background 0.15s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
}

.stws-submit__icon {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	display: inline-block;
	vertical-align: middle;
}

.stws-submit__label {
	display: inline-block;
}

.stws-submit:hover,
.stws-submit:focus {
	filter: brightness(0.92);
	outline: none;
}

.stws-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.stws-form-error {
	padding: 0.75rem 1rem;
	background: #fdecea;
	color: #b71c1c;
	border: 1px solid #f5c6cb;
	border-radius: 6px;
}
