/**
 * Deliberately minimal. Fields inherit from the theme so the form looks like
 * part of mkyong.com rather than a bolted-on widget. The one place this file
 * does assert itself is the result banner: a submission outcome the visitor
 * misses is a message they will send twice.
 */

.mkcf-form {
	max-width: 42rem;
	margin: 1.5rem 0;
}

.mkcf-title {
	margin: 0 0 1rem;
}

.mkcf-field {
	margin-bottom: 1rem;
}

.mkcf-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9375rem;
}

.mkcf-form input[type="email"],
.mkcf-form input[type="text"],
.mkcf-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.6rem 0.75rem;
	font: inherit;
	color: inherit;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	opacity: 0.95;
}

.mkcf-form textarea {
	resize: vertical;
	min-height: 20rem;
	line-height: 1.55;
}

.mkcf-form input[type="email"]:focus-visible,
.mkcf-form input[type="text"]:focus-visible,
.mkcf-form textarea:focus-visible,
.mkcf-submit:focus-visible,
.mkcf-status:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.mkcf-submit {
	font: inherit;
	font-weight: 600;
	padding: 0.6rem 1.4rem;
	cursor: pointer;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
}

.mkcf-submit[disabled] {
	opacity: 0.55;
	cursor: progress;
}

.mkcf-turnstile {
	margin-bottom: 1rem;
}

/*
 * Result banner. Own colours rather than inherited ones — this is the one
 * element that must not blend into the page.
 */
.mkcf-status {
	margin: 1.25rem 0 0;
	padding: 1rem 1.15rem;
	border: 1px solid;
	border-left-width: 5px;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}

.mkcf-status[hidden] {
	display: none;
}

.mkcf-status.mkcf-ok {
	color: #14532d;
	background: #edfbf0;
	border-color: #1a7f37;
}

.mkcf-status.mkcf-error {
	color: #7a1b12;
	background: #fdf0ee;
	border-color: #b42318;
}

.mkcf-status.mkcf-busy {
	color: #3d3d3d;
	background: #f4f4f5;
	border-color: #9a9a9a;
	font-weight: 500;
}

/* A single flash on appearance, so a repeat submission still reads as new. */
.mkcf-status.mkcf-ok,
.mkcf-status.mkcf-error {
	animation: mkcf-pop 0.35s ease-out;
}

@keyframes mkcf-pop {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.mkcf-status.mkcf-ok,
	.mkcf-status.mkcf-error {
		animation: none;
	}
}

/* Dark themes: keep the banners readable without inverting their meaning. */
@media ( prefers-color-scheme: dark ) {
	.mkcf-status.mkcf-ok {
		color: #b6f0c4;
		background: #10281a;
	}

	.mkcf-status.mkcf-error {
		color: #ffc4bd;
		background: #2c1310;
	}

	.mkcf-status.mkcf-busy {
		color: #d8d8d8;
		background: #232323;
	}
}

/*
 * Honeypot. Moved off-screen instead of display:none, which the better bots
 * detect and skip. Kept out of the tab order and hidden from screen readers.
 */
.mkcf-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}
