/* =============================================
   EMAIL SIGNUP BLOCK — frontend + editor
   ============================================= */

/* --- Wrapper: full-width indigo bar --- */
.telyrx-email-cta {
	background-color: var(--wp--preset--color--primary, #1d2e8a);
	padding: var(--wp--preset--spacing--65, 3.75rem) var(--wp--preset--spacing--50, 2rem);
	text-align: center;
}

/* Full-width breakout — ensures edge-to-edge even inside constrained layouts */
.telyrx-email-cta.alignfull {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
	margin-left: 0;
	margin-right: 0;
}

.telyrx-email-cta h2.telyrx-email-cta__heading,
.telyrx-email-cta p.telyrx-email-cta__description {
	max-width: 600px;
	margin-inline: auto;
	color: var(--wp--preset--color--surface, #ffffff) !important;
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
}

.telyrx-email-cta__heading {
	font-size: 2rem;
	font-weight: 700;
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.telyrx-email-cta__description {
	font-size: 1rem;
	margin-bottom: 1.5rem;
}


/* --- Custom form (submits to HubSpot Forms API) --- */
.telyrx-email-cta__form {
	max-width: 600px;
	margin: 0 auto;
}

/* Pill shape: input + button in a single row */
.telyrx-email-cta__pill {
	display: flex;
	align-items: center;
	background-color: var(--wp--preset--color--surface, #ffffff);
	border-radius: 100px;
	height: 56px;
	padding: 4px 4px 4px 24px;
}

.telyrx-email-cta__input {
	flex: 1;
	border: none;
	outline: none;
	box-shadow: none;
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 1rem;
	color: var(--wp--preset--color--text, #26252a);
	background: transparent;
	height: auto;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.telyrx-email-cta__input::placeholder {
	color: var(--wp--preset--color--text, #26252a);
	opacity: 0.5;
}

.telyrx-email-cta__button {
	background-color: var(--wp--preset--color--accent-amber, #ffc24c);
	color: var(--wp--preset--color--text, #26252a);
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 1rem;
	font-weight: 700;
	border: none;
	border-radius: 100px;
	padding: 3px 24px;
	height: 48px;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.15s ease;
	flex-shrink: 0;
}

.telyrx-email-cta__button:hover {
	opacity: 0.85;
}

.telyrx-email-cta__button:disabled {
	opacity: 0.6;
	cursor: wait;
}

/* Status messages (success / error) */
.telyrx-email-cta__status {
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 0.875rem;
	margin: 0.75rem 0 0;
	min-height: 1.25em;
}

.telyrx-email-cta__status:empty {
	display: none;
}

.telyrx-email-cta__status.is-success {
	color: var(--wp--preset--color--surface, #ffffff);
}

.telyrx-email-cta__status.is-error {
	color: #fca5a5;
}

/* Hide pill on success, show message */
.telyrx-email-cta__form.is-success .telyrx-email-cta__pill {
	display: none;
}

/* Noscript fallback */
.telyrx-email-cta__noscript {
	color: var(--wp--preset--color--surface, #ffffff);
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 0.875rem;
	opacity: 0.8;
}


/* --- Editor preview (static pill mockup) --- */
.telyrx-email-cta__form-preview {
	max-width: 600px;
	margin: 0 auto;
}

.telyrx-email-cta__form-pill {
	display: flex;
	align-items: center;
	background-color: var(--wp--preset--color--surface, #ffffff);
	border-radius: 100px;
	height: 56px;
	padding: 4px 4px 4px 24px;
}

.telyrx-email-cta__form-pill-input {
	flex: 1;
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 1rem;
	color: var(--wp--preset--color--text, #26252a);
	opacity: 0.5;
	text-align: left;
}

.telyrx-email-cta__form-pill-button {
	background-color: var(--wp--preset--color--accent-amber, #ffc24c);
	color: var(--wp--preset--color--text, #26252a);
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 1rem;
	font-weight: 700;
	border-radius: 100px;
	padding: 3px 24px;
	height: 48px;
	display: flex;
	align-items: center;
	white-space: nowrap;
}

.telyrx-email-cta__form-notice {
	color: var(--wp--preset--color--surface, #ffffff);
	font-family: var(--wp--preset--font-family--urbanist, "Urbanist", sans-serif);
	font-size: 0.75rem;
	opacity: 0.6;
	margin-top: 0.5rem;
}


/* --- Mobile (< 768px) --- */
@media (max-width: 767px) {
	.telyrx-email-cta__pill {
		flex-direction: column;
		border-radius: 12px;
		height: auto;
		padding: 4px;
	}

	.telyrx-email-cta__input {
		padding: 12px 16px;
		width: 100%;
		text-align: center;
	}

	.telyrx-email-cta__button {
		width: 100%;
		border-radius: 8px;
	}

	/* Editor preview mobile */
	.telyrx-email-cta__form-pill {
		flex-direction: column;
		border-radius: 12px;
		height: auto;
		padding: 4px;
	}

	.telyrx-email-cta__form-pill-input {
		padding: 12px 16px;
		width: 100%;
	}

	.telyrx-email-cta__form-pill-button {
		width: 100%;
		border-radius: 8px;
		justify-content: center;
	}
}
