/**
 * MAYHM Forms - Public stylesheet
 * All classes are prefixed with `mayhm-` to stay isolated from theme styles.
 */

.mayhm-form-wrapper {
	--mayhm-primary: #111111;
	--mayhm-accent: #d4af37;
	--mayhm-error: #c0392b;
	--mayhm-success: #1e7e34;
	--mayhm-border: #d7d7d7;
	--mayhm-radius: 6px;

	max-width: 640px;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}

.mayhm-form-wrapper * {
	box-sizing: border-box;
}

.mayhm-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mayhm-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mayhm-field label {
	font-weight: 600;
	font-size: 14px;
	color: var(--mayhm-primary);
}

.mayhm-required {
	color: var(--mayhm-error);
}

.mayhm-field input[type="text"],
.mayhm-field input[type="email"],
.mayhm-field select,
.mayhm-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--mayhm-border);
	border-radius: var(--mayhm-radius);
	font-size: 15px;
	line-height: 1.4;
	background: #fff;
	color: #111;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.mayhm-field input:focus,
.mayhm-field select:focus,
.mayhm-field textarea:focus {
	outline: none;
	border-color: var(--mayhm-accent);
	box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.mayhm-field input.mayhm-invalid,
.mayhm-field select.mayhm-invalid,
.mayhm-field textarea.mayhm-invalid {
	border-color: var(--mayhm-error);
}

.mayhm-error-msg {
	font-size: 13px;
	color: var(--mayhm-error);
	min-height: 1em;
}

.mayhm-hp-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.mayhm-submit-field {
	margin-top: 6px;
}

.mayhm-submit-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 28px;
	background: var(--mayhm-primary);
	color: #fff;
	border: none;
	border-radius: var(--mayhm-radius);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.mayhm-submit-btn:hover {
	background: #000;
}

.mayhm-submit-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.mayhm-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mayhm-spin 0.6s linear infinite;
}

.mayhm-submit-btn.mayhm-loading .mayhm-spinner {
	display: inline-block;
}

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

.mayhm-form-message {
	display: none;
	padding: 12px 16px;
	border-radius: var(--mayhm-radius);
	font-size: 14px;
}

.mayhm-form-message.mayhm-show {
	display: block;
}

.mayhm-form-message.mayhm-success {
	background: rgba(30, 126, 52, 0.1);
	color: var(--mayhm-success);
	border: 1px solid rgba(30, 126, 52, 0.3);
}

.mayhm-form-message.mayhm-error {
	background: rgba(192, 57, 43, 0.1);
	color: var(--mayhm-error);
	border: 1px solid rgba(192, 57, 43, 0.3);
}

.mayhm-recaptcha-field {
	overflow-x: auto;
}

@media (max-width: 480px) {
	.mayhm-submit-btn {
		width: 100%;
	}
}
