/* Article newsletter dock. Delete this file and its enqueue to drop the experiment. */

.article-newsletter--dock {
	position: fixed;
	z-index: 90;
	left: 16px;
	right: 16px;
	bottom: 20px;
	width: auto;
	max-width: 760px;
	margin: 0 auto;
	padding: 12px 16px 14px;
	border-top: 0;
	background: #fff;
	box-shadow: 0 12px 40px rgba(7, 7, 5, 0.14);
	display: flex;
	align-items: flex-end;
	gap: 22px;
	opacity: 0;
	transform: translateY(16px);
	pointer-events: none;
	transition: opacity 0.55s ease, transform 0.55s ease;
}

.article-newsletter--dock.is-in {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Mailchimp's own popup. Inline display loses to this while our dock is showing. */
html.article-newsletter-dock-in .mcforms-wrapper {
	display: none !important;
}

.article-newsletter--dock .article-newsletter__title {
	flex: 0 1 200px;
	margin: 0 0 2px;
}

.article-newsletter--dock .article-newsletter__lead {
	font-size: 34px;
}

.article-newsletter--dock .mc4wp-form {
	flex: 1 1 auto;
	min-width: 0;
}

/* The form's own container query sets the button to width 100% once the
   fields sit beside the title. That eats the row and collapses the inputs. */
.article-newsletter.article-newsletter--dock .input-container {
	flex-direction: row !important;
	align-items: flex-end !important;
}

.article-newsletter.article-newsletter--dock .input-container input,
.article-newsletter.article-newsletter--dock .input-container button {
	width: auto !important;
}

.article-newsletter.article-newsletter--dock .input-container input {
	flex: 1 1 0 !important;
	min-width: 0;
}

.article-newsletter.article-newsletter--dock .input-container button {
	flex: 0 0 auto !important;
}

@media (max-width: 720px) {
	.article-newsletter--dock {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		bottom: 12px;
		padding: 10px 14px 12px;
	}

	.article-newsletter--dock .article-newsletter__title {
		flex: none;
		width: 100%;
		height: auto;
		margin: 0;
		font-size: 13px;
		line-height: 1.3;
	}

	.article-newsletter--dock .article-newsletter__lead {
		margin-bottom: 2px;
		font-size: 28px;
	}

	.article-newsletter.article-newsletter--dock .input-container {
		flex-direction: row !important;
		align-items: flex-end !important;
		gap: 8px !important;
	}

	.article-newsletter.article-newsletter--dock .input-container input,
	.article-newsletter.article-newsletter--dock .input-container button {
		width: auto !important;
		height: 42px;
		min-width: 0;
	}

	.article-newsletter.article-newsletter--dock .input-container input {
		flex: 1 1 0 !important;
	}

	.article-newsletter.article-newsletter--dock .input-container button {
		flex: 0 0 auto !important;
		padding: 0 12px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.article-newsletter--dock {
		transform: none;
		transition: opacity 0.2s ease;
	}
}
