/* WunderWild newsletter box — appended after post content via ruki_after_content.
   Colours come from Ruki's own custom properties so the box tracks the
   Customizer; the fallbacks are what the site is set to today. */

.ffn-news {
	--ffn-accent: var(--button-color, #7BC142);
	box-sizing: border-box;
	/* #primary is `.flex-grid`, a wrapping flex row. Without an explicit basis
	   this box collapses to its content width and sits left of the post card.
	   The 15px side margin is what `.flex-grid .flex-box` uses, so the edges
	   line up with the article above and the author bio below. */
	flex: 1 1 100%;
	width: 100%;
	margin: 25px 15px;
	padding: 34px 32px;
	border: 2px dashed rgba(123, 193, 66, 0.4);
	border-radius: var(--default-border-radius, 7px);
	background: linear-gradient(180deg, #f6fbf2 0%, #ffffff 70%);
	box-shadow: var(--default-box-shadow, 0 0 15px rgba(0, 0, 0, 0.05));
	font-family: var(--body-font, Mulish, Arial, Helvetica, sans-serif);
}

.ffn-news * {
	box-sizing: border-box;
}

/* Copy beside the cover, stacking to cover-on-top on narrow screens. */
.ffn-news-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 30px;
}

.ffn-news-copy {
	flex: 1 1 340px;
	min-width: 0;
}

.ffn-news-art {
	flex: 0 0 200px;
	display: flex;
	justify-content: center;
}

.ffn-news-book {
	position: relative;
	width: 200px;
	transform: rotate(-3deg);
}

.ffn-news-book img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	/* The cover is pale and sits on a pale panel, so it needs its own paper edge
	   to separate. A hairline border disappears at this size. */
	box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22), 0 0 0 3px #fff;
}

.ffn-news-book-flag {
	position: absolute;
	z-index: 2;
	top: 12px;
	right: -12px;
	transform: rotate(4deg);
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--ffn-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
	box-shadow: 0 6px 14px rgba(123, 193, 66, 0.4);
}

.ffn-news-flag {
	display: inline-block;
	margin: 0 0 12px;
	padding: 5px 12px;
	border-radius: 25px;
	background: var(--ffn-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ffn-news-title {
	margin: 0 0 10px;
	font-family: var(--title-font, Mulish, Arial, Helvetica, sans-serif);
	font-size: 26px;
	line-height: 1.25;
	font-weight: 800;
	color: var(--very-dark-grey, #2e2f33);
}

.ffn-news-sub {
	margin: 0 0 22px;
	max-width: 60ch;
	font-size: 16px;
	line-height: 1.6;
	color: var(--body-font-color, #45464b);
}

/* Form ------------------------------------------------------------------- */

.ffn-news-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ffn-news-input {
	flex: 1 1 240px;
	min-width: 0;
	padding: 14px 20px;
	border: 2px solid var(--medium-border-color, #e5e5e5);
	border-radius: var(--button-border-radius, 25px);
	background: #fff;
	color: var(--very-dark-grey, #2e2f33);
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s;
}

.ffn-news-input::placeholder {
	color: var(--medium-grey, #94979e);
	font-weight: 400;
}

.ffn-news-input:focus {
	outline: none;
	border-color: var(--ffn-accent);
	box-shadow: 0 0 0 3px rgba(123, 193, 66, 0.18);
}

.ffn-news-btn {
	flex: 0 0 auto;
	padding: 14px 30px;
	border: 2px solid var(--ffn-accent);
	border-radius: var(--button-border-radius, 25px);
	background: var(--ffn-accent);
	color: #fff;
	cursor: pointer;
	font-family: var(--title-font, Mulish, Arial, Helvetica, sans-serif);
	font-size: 16px;
	font-weight: 700;
	transition: filter 0.2s, transform 0.2s;
}

.ffn-news-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.ffn-news-btn:active {
	transform: none;
}

.ffn-news-btn[disabled] {
	opacity: 0.6;
	cursor: default;
	transform: none;
	filter: none;
}

.ffn-news-note {
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.55;
	color: var(--medium-grey, #94979e);
}

.ffn-news-note a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ffn-news-note a:hover {
	color: var(--ffn-accent);
}

/* One status line for both outcomes; the script sets the modifier and the text. */
.ffn-news-msg {
	margin: 14px 0 0;
	padding: 12px 18px;
	border: 2px solid var(--medium-border-color, #e5e5e5);
	border-radius: var(--default-border-radius, 7px);
	background: #fff;
	font-size: 15px;
	line-height: 1.55;
	font-weight: 600;
	color: var(--very-dark-grey, #2e2f33);
}

.ffn-news-msg--ok {
	border-color: var(--ffn-accent);
	background: #f6fbf2;
}

/* Visually hidden: the field label, and the honeypot bots fill in. */
.ffn-sr,
.ffn-hp {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 720px) {
	.ffn-news-inner {
		gap: 20px;
	}

	/* Cover above the copy rather than beside it, and small enough that the
	   email field still lands inside the box on a phone screen. */
	.ffn-news-art {
		flex: 1 1 100%;
		order: -1;
	}

	.ffn-news-book {
		width: 150px;
	}
}

@media (max-width: 600px) {
	.ffn-news {
		padding: 26px 20px;
	}

	.ffn-news-title {
		font-size: 22px;
	}

	.ffn-news-btn {
		flex: 1 1 100%;
	}
}
