/**
 * Etchmail Signup — Frontend CSS.
 *
 * @package Etchmail_Signup
 */

/* Wrapper */
.cems-signup-wrapper {
	max-width: 480px;
}

.cems-signup-title {
	margin: 0 0 0.75em;
	font-size: 1.2em;
}

/* Honeypot — hidden from humans */
.cems-hp {
	position: absolute;
	left: -9999px;
	height: 0;
	width: 0;
	overflow: hidden;
	opacity: 0;
}

/* Fields */
.cems-field {
	margin-bottom: 0.75em;
}

.cems-field label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
	font-size: 0.9em;
}

.cems-field input[type="text"],
.cems-field input[type="email"] {
	width: 100%;
	padding: 0.5em 0.75em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	box-sizing: border-box;
}

.cems-field input[type="text"]:focus,
.cems-field input[type="email"]:focus {
	border-color: #0073aa;
	outline: none;
	box-shadow: 0 0 0 1px #0073aa;
}

.cems-required {
	color: #d63638;
}

/* Submit button */
.cems-submit-btn {
	display: inline-block;
	padding: 0.6em 1.5em;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1em;
	cursor: pointer;
	transition: background 0.2s;
}

.cems-submit-btn:hover,
.cems-submit-btn:focus {
	background: #005a87;
}

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

/* Messages */
.cems-message {
	margin-top: 0.75em;
	padding: 0;
	font-size: 0.9em;
	display: none;
}

.cems-message.cems-success {
	display: block;
	color: #00a32a;
}

/* Prominent success state — replaces the form */
.cems-message.cems-success-prominent {
	margin-top: 0;
	padding: 1em 1.25em;
	font-size: 1.05em;
	font-weight: 600;
	color: #00a32a;
	background: #f0faf0;
	border: 1px solid #00a32a;
	border-radius: 4px;
	text-align: center;
}

.cems-message.cems-error {
	display: block;
	color: #d63638;
}

/* Loading state */
.cems-signup-form.cems-loading .cems-submit-btn::after {
	content: "";
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-left: 0.5em;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: cems-spin 0.6s linear infinite;
	vertical-align: middle;
}

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