/* Tailwinder Forms — theme shell + token polish */

/* Hub form name is an admin label. Visitor heading is hero_form_title / form_title. */
.tw-hero-form .twf-form__title {
	display: none;
}

.tw-form-shell .twf-form__input,
.tw-form-shell .twf-form__select,
.tw-form-shell .twf-form select,
.tw-form-shell .twf-form textarea {
	border-radius: var(--tw-radius-input, 1rem);
	border-color: var(--tw-color-border, #dbe4ff);
	min-height: 2.75rem;
	/* Match forms public.css — Tailwind preflight / WP admin zero padding (textarea especially). */
	padding: 0.65rem 0.75rem;
	box-sizing: border-box;
}

.tw-form-shell .twf-form textarea.twf-form__input,
.tw-form-shell .twf-form textarea {
	/* Multi-line: keep same inset as inputs (not flush to the border). */
	padding: 0.65rem 0.75rem;
	resize: vertical;
}

.tw-form-shell .twf-form__input--file {
	min-height: 2.75rem;
	display: flex;
	align-items: center;
}

.tw-form-shell .twf-form__input--file::file-selector-button {
	border-radius: var(--tw-radius-button, 9999px);
	border-color: var(--tw-color-border, #dbe4ff);
	background: color-mix(in srgb, var(--tw-color-brand-primary) 12%, transparent);
}

.tw-form-shell .twf-form__radio-group {
	gap: 0.65rem;
}

.tw-form-shell .twf-form__radio,
.tw-form-shell .twf-form__checkbox {
	color: var(--tw-color-text, #0f172a);
}

.tw-form-shell .twf-form__radio-input,
.tw-form-shell .twf-form__checkbox-input {
	accent-color: var(--tw-color-brand-primary);
}

.tw-form-shell .twf-form__help {
	color: var(--tw-color-muted, #64748b);
}

.tw-form-shell .twf-form__select {
	appearance: auto;
	background-image: none;
}

.tw-form-shell .twf-form__submit {
	background: var(--tw-color-brand-primary) !important;
	color: var(--tw-color-on-primary, #fff) !important;
	border: none !important;
	border-radius: var(--tw-radius-button, 9999px);
	font-weight: 600;
	padding: var(--tw-button-padding-y, 0.875rem) var(--tw-button-padding-x, 1.5rem);
	min-height: 2.75rem;
	cursor: pointer;
}

.tw-form-shell .twf-form__submit:not(:disabled):hover {
	filter: brightness(0.95);
}

.tw-form-shell .twf-form__label {
	color: var(--tw-color-text, #0f172a);
	font-weight: 500;
}

.tw-form-shell .twf-form__error {
	color: #b91c1c;
}

.tw-form-shell .twf-form__field.is-invalid .twf-form__input,
.tw-form-shell .twf-form__field.is-invalid .twf-form__select,
.tw-form-shell .twf-form__field.is-invalid select,
.tw-form-shell .twf-form__field.is-invalid textarea {
	border-color: #b91c1c;
}

.tw-form-shell .twf-form__message:not(.is-error) {
	color: var(--tw-color-brand-primary);
	font-weight: 500;
}

/* Dark shell (footer / dark form layout) */
.tw-form-shell--dark .twf-form__input,
.tw-form-shell--dark .twf-form__select,
.tw-form-shell--dark .twf-form select,
.tw-form-shell--dark .twf-form textarea,
.tw-footer-newsletter__form .twf-form__input,
.tw-footer-newsletter__form .twf-form__select,
.tw-footer-newsletter__form .twf-form select,
.tw-footer-newsletter__form .twf-form textarea {
	background: rgba(255, 255, 255, 0.12) !important;
	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	color: #fff !important;
}

.tw-form-shell--dark .twf-form__radio,
.tw-form-shell--dark .twf-form__checkbox,
.tw-form-shell--dark .twf-form__help,
.tw-footer-newsletter__form .twf-form__radio,
.tw-footer-newsletter__form .twf-form__checkbox,
.tw-footer-newsletter__form .twf-form__help {
	color: rgba(255, 255, 255, 0.9);
}

.tw-form-shell--dark .twf-form__input::placeholder,
.tw-form-shell--dark .twf-form textarea::placeholder,
.tw-footer-newsletter__form .twf-form__input::placeholder,
.tw-footer-newsletter__form .twf-form textarea::placeholder {
	color: rgba(255, 255, 255, 0.55) !important;
}

.tw-form-shell--dark .twf-form__label,
.tw-form-shell--dark .twf-form__title,
.tw-footer-newsletter__form .twf-form__label,
.tw-footer-newsletter__form .twf-form__title {
	color: rgba(255, 255, 255, 0.9);
}

.tw-footer-newsletter__form .twf-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	max-width: none;
}

.tw-footer-newsletter__form .twf-form__field {
	flex: 1 1 220px;
	margin: 0;
}

.tw-footer-newsletter__form .twf-form__label {
	display: none;
}

.tw-footer-newsletter__form .twf-form__title {
	display: none;
}

.tw-footer-newsletter__form .twf-form__actions {
	flex: 0 0 auto;
}

.tw-footer-newsletter__form .twf-form__submit {
	background: var(--tw-color-brand-primary) !important;
	color: var(--tw-color-on-primary, #fff) !important;
	border-radius: var(--tw-radius-button, 9999px);
	white-space: nowrap;
}

@media (max-width: 768px) {
	.tw-footer-newsletter__form .twf-form {
		flex-direction: column;
		align-items: stretch;
	}

	.tw-footer-newsletter__form .twf-form__submit {
		width: 100%;
	}
}
