.pses-wrapper {
	max-width: 780px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--wp--preset--color--contrast, #111111);
}

.pses-wrapper [hidden] {
	display: none !important;
}

.pses-heading {
	margin: 0 0 0.5rem;
}

.pses-lead {
	margin: 0 0 1.5rem;
	color: var(--wp--preset--color--accent-4, #555555);
	line-height: 1.5;
}

.pses-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.pses-alert {
	padding: 1rem 1.25rem;
	margin-bottom: 1.5rem;
	border-radius: 6px;
	border: 1px solid transparent;
	line-height: 1.5;
}

.pses-alert--success {
	background-color: #eef8f1;
	border-color: #9ed3ae;
	color: #155724;
}

.pses-alert--error {
	background-color: #fdf2f2;
	border-color: #f0b4b4;
	color: #842029;
}

.pses-section {
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	padding: 1.25rem 1.5rem 1.5rem;
	margin: 0 0 1.5rem;
	background-color: var(--wp--preset--color--base, #ffffff);
}

.pses-section__title {
	font-weight: 600;
	font-size: 1.05rem;
	padding: 0 0.5rem;
	color: var(--wp--preset--color--contrast, #111111);
}

.pses-grid {
	display: grid;
	gap: 1rem;
}

.pses-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pses-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-bottom: 1rem;
}

.pses-section > .pses-field:last-child,
.pses-subpanel > .pses-field:last-child,
.pses-grid > .pses-field {
	margin-bottom: 0;
}

.pses-grid {
	margin-bottom: 1rem;
}

.pses-section > .pses-grid:last-child,
.pses-subpanel > .pses-grid:last-child {
	margin-bottom: 0;
}

.pses-label {
	font-size: 0.925rem;
	font-weight: 500;
}

.pses-req {
	color: #c62828;
}

.pses-input,
.pses-select,
.pses-textarea,
.pses-file {
	width: 100%;
	box-sizing: border-box;
	padding: 0.625rem 0.75rem;
	border: 1px solid #cccccc;
	border-radius: 6px;
	background-color: #ffffff;
	color: #111111;
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pses-input:focus,
.pses-select:focus,
.pses-textarea:focus,
.pses-file:focus {
	border-color: var(--wp--preset--color--accent-3, #503aa8);
	box-shadow: 0 0 0 2px rgba(80, 58, 168, 0.16);
	outline: none;
}

.pses-input.is-invalid,
.pses-select.is-invalid,
.pses-textarea.is-invalid,
.pses-file.is-invalid {
	border-color: #c62828;
	background-color: #fffafa;
}

.pses-textarea {
	resize: vertical;
	min-height: 110px;
}

.pses-file {
	padding: 0.5rem 0.65rem;
	background-color: #fafafa;
}

.pses-hint {
	font-size: 0.82rem;
	color: var(--wp--preset--color--accent-4, #686868);
}

.pses-field-error {
	font-size: 0.84rem;
	color: #c62828;
	min-height: 0;
}

.pses-field-error:empty {
	display: none;
}

.pses-field--checkbox {
	margin-bottom: 1rem;
}

.pses-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-size: 0.95rem;
	user-select: none;
}

.pses-checkbox input[type="checkbox"] {
	width: 1.05rem;
	height: 1.05rem;
	margin: 0;
	accent-color: var(--wp--preset--color--accent-3, #503aa8);
}

.pses-subpanel {
	margin-top: 0.75rem;
	margin-bottom: 1rem;
	padding: 1rem;
	border-radius: 6px;
	border: 1px dashed #cccccc;
	background-color: var(--wp--preset--color--accent-5, #fbfaf3);
}

.pses-section > .pses-subpanel:last-child {
	margin-bottom: 0;
}

.pses-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
}

.pses-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.78rem 1.75rem;
	border: none;
	border-radius: 6px;
	background-color: var(--wp--preset--color--contrast, #111111);
	color: var(--wp--preset--color--base, #ffffff);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.pses-submit:hover:not(:disabled) {
	opacity: 0.9;
}

.pses-submit:active:not(:disabled) {
	transform: translateY(1px);
}

.pses-submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.pses-actions__note {
	margin: 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--accent-4, #686868);
}

@media (max-width: 640px) {
	.pses-section {
		padding: 1rem 1rem 1.25rem;
	}

	.pses-grid--2 {
		grid-template-columns: 1fr;
	}

	.pses-submit {
		width: 100%;
	}
}
