/*
 * Inline note signup (VOY-1546, shared with VOY-1547).
 * Markup: inc/note-signup-block.php. Behaviour: assets/js/note-signup.js.
 */

.vy-note-signup {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Hidden until the script can submit; the mail link stands in until then. */
.vy-note-signup__form {
	display: none;
	gap: 10px;
	align-items: stretch;
}

.vy-note-signup--ready .vy-note-signup__form { display: flex; }
.vy-note-signup--ready .vy-note-signup__form[hidden] { display: none; }
.vy-note-signup--ready .vy-note-signup__fallback { display: none; }

/* A real label, read by assistive tech and kept off screen. */
.vy-note-signup__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.vy-note-signup__input {
	flex: 1;
	min-width: 0;
	min-height: 48px;
	box-sizing: border-box;
	padding: 0 16px;
	border: 1px solid var(--border-1);
	border-radius: 6px;
	background: var(--bg-canvas);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	color: var(--fg-1);
}

.vy-note-signup__input::placeholder { color: var(--fg-4); }

.vy-note-signup__input:focus-visible {
	outline: 2px solid var(--accent-bright);
	outline-offset: 2px;
}

.vy-note-signup__submit {
	flex: none;
	min-height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: var(--accent);
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	font-weight: 500;
	color: var(--accent-fg-on);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 200ms cubic-bezier(0.2, 0, 0, 1);
}

.vy-note-signup__submit:hover { background: var(--accent-strong); }

.vy-note-signup__submit:focus-visible {
	outline: 2px solid var(--accent-bright);
	outline-offset: 3px;
}

.vy-note-signup__submit:disabled { opacity: 0.7; cursor: progress; }

.vy-note-signup__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.vy-note-signup__status {
	margin: 0;
	font-family: var(--wp--preset--font-family--body);
	font-size: 15px;
	color: var(--fg-2);
}

.vy-note-signup__status--error { color: var(--color-red-300); }

.vy-note-signup__fallback {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 12px;
	color: var(--fg-4);
}

@media (max-width: 599px) {
	.vy-note-signup--ready .vy-note-signup__form { flex-direction: column; }
	.vy-note-signup__submit { width: 100%; }
}
