/* ==========================================================================
   Email Hub — Front-end Form Styles
   ========================================================================== */

/* Container */
.email-hub-wrap {
	--eh-btn-color: #0073aa;
	--eh-btn-text-color: #ffffff;
	background-color: #f8f9fa;
	border: 1px solid #e2e6ea;
	border-radius: 8px;
	padding: 28px 32px;
	margin: 32px 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Title */
.email-hub-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 8px;
	padding: 0;
	line-height: 1.3;
	border: none;
}

/* Description */
.email-hub-description {
	font-size: 0.95rem;
	color: #555;
	margin: 0 0 18px;
	line-height: 1.5;
}

/* The form element itself */
.email-hub-form {
	margin: 0;
	padding: 0;
}

/* Input row: email + button side by side */
.email-hub-input-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
}

/* Email input */
.email-hub-email-input {
	flex: 1 1 200px;
	min-width: 0;
	padding: 10px 14px;
	font-size: 0.95rem;
	border: 1px solid #ccd0d4;
	border-radius: 5px;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	box-sizing: border-box;
	background: #ffffff;
	color: #333;
	line-height: 1.4;
}

.email-hub-email-input:focus {
	border-color: var(--eh-btn-color);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--eh-btn-color) 20%, transparent);
}

.email-hub-email-input::placeholder {
	color: #aab;
}

/* Submit button */
.email-hub-submit-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	font-size: 0.95rem;
	font-weight: 600;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	background-color: var(--eh-btn-color);
	color: var(--eh-btn-text-color);
	transition: filter 0.15s ease, opacity 0.15s ease;
	white-space: nowrap;
	line-height: 1.4;
	box-sizing: border-box;
}

.email-hub-submit-btn:hover:not(:disabled) {
	filter: brightness(1.1);
}

.email-hub-submit-btn:active:not(:disabled) {
	filter: brightness(0.95);
}

.email-hub-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Spinner inside button */
.email-hub-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: email-hub-spin 0.7s linear infinite;
	flex-shrink: 0;
}

.email-hub-submit-btn.is-loading .email-hub-spinner {
	display: inline-block;
}

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

/* Checkbox rows */
.email-hub-checkbox-row {
	margin-top: 12px;
	font-size: 0.9rem;
	color: #444;
	line-height: 1.4;
}

.email-hub-checkbox-row label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}

.email-hub-checkbox-row input[type="checkbox"] {
	margin: 2px 0 0;
	flex-shrink: 0;
	cursor: pointer;
}

/* Response area */
.email-hub-response {
	display: none;
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 5px;
	font-size: 0.95rem;
	line-height: 1.5;
	font-weight: 500;
}

.email-hub-response.email-hub-success {
	display: block;
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.email-hub-response.email-hub-error {
	display: block;
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

/* Honeypot — always visually hidden */
.email-hub-hp {
	position: absolute !important;
	left: -9999px !important;
	height: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ==========================================================================
   Responsive — stack input + button on mobile
   ========================================================================== */
@media (max-width: 600px) {
	.email-hub-wrap {
		padding: 20px 18px;
	}

	.email-hub-input-row {
		flex-direction: column;
	}

	.email-hub-email-input,
	.email-hub-submit-btn {
		flex: 1 1 auto;
		width: 100%;
	}
}
