/**
 * Restriction notice.
 *
 * Deliberately theme-neutral: system font stack, currentColor where possible,
 * no fixed background beyond a light tint, so it sits inside any theme without
 * looking bolted on. Override with the `ffwa_restriction_notice` filter or by
 * dequeuing the `ffwa-frontend` stylesheet.
 */

.ffwa-notice {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	max-width: 640px;
	margin: 24px 0;
	padding: 22px 24px;
	border: 1px solid rgba(var(--ffwa-accent-rgb, 15,118,110), .22);
	border-left: 3px solid var(--ffwa-accent, #0F766E);
	border-radius: 6px;
	/* explicit surface + text, never inherited: the panel has to stay legible
	   inside a dark hero section as readily as on a white page */
	background: var(--ffwa-bg, #fff);
	color: var(--ffwa-text, #3C4858);
	font-size: 15px;
	line-height: 1.7;
}

.ffwa-notice__icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(var(--ffwa-accent-rgb, 15,118,110), .12);
	color: var(--ffwa-accent, #0F766E);
}

.ffwa-notice__icon svg {
	width: 19px;
	height: 19px;
	display: block;
}

.ffwa-notice__body {
	flex: 1 1 auto;
	min-width: 0;
}

.ffwa-notice__text,
.ffwa-notice__text p {
	margin: 0;
	color: var(--ffwa-text, #3C4858);
}

.ffwa-notice__text p {
	margin: 0 0 .6em;
}

.ffwa-notice__text p:last-child {
	margin-bottom: 0;
}

.ffwa-notice__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	margin: 16px 0 0;
}

.ffwa-notice__cta {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: opacity .2s ease, transform .2s ease;
}

/* Explicit colours, and specific enough to beat a theme's generic `a` rules.
   The earlier version used `background: currentColor` alongside `color:#fff`,
   which resolves currentColor to white and renders a white button with a white
   label — invisible. Never paint a background with currentColor on an element
   whose colour you also set. */
.ffwa-notice .ffwa-notice__cta,
.ffwa-gate .ffwa-notice__cta {
	background-color: var(--ffwa-accent, #0F766E);
	color: #fff;
	border: 1px solid var(--ffwa-accent, #0F766E);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}

.ffwa-notice .ffwa-notice__cta:hover,
.ffwa-notice .ffwa-notice__cta:focus,
.ffwa-gate .ffwa-notice__cta:hover,
.ffwa-gate .ffwa-notice__cta:focus {
	background-color: var(--ffwa-accent, #0F766E);
	color: #fff;
	opacity: .9;
}

.ffwa-notice__cta::after {
	content: none;
}

.ffwa-notice__cta:hover,
.ffwa-notice__cta:focus {
	opacity: .88;
	transform: translateY(-1px);
	color: #fff;
}

.ffwa-notice__login {
	font-size: 13.5px;
	text-decoration: underline;
	color: var(--ffwa-text, #3C4858);
	opacity: .8;
}

.ffwa-notice__login:hover {
	opacity: 1;
}

@media (max-width: 480px) {
	.ffwa-notice {
		gap: 12px;
		padding: 18px;
	}

	.ffwa-notice__icon {
		width: 28px;
		height: 28px;
	}

	.ffwa-notice__icon svg {
		width: 16px;
		height: 16px;
	}

	.ffwa-notice__cta {
		display: block;
		width: 100%;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffwa-notice__cta {
		transition: none;
	}

	.ffwa-notice__cta:hover {
		transform: none;
	}
}

/* ==========================================================================
   The email unlock gate
   ========================================================================== */

.ffwa-gate {
	max-width: 640px;
	margin: 24px 0;
	padding: 26px 28px;
	border: 1px solid rgba(var(--ffwa-accent-rgb, 15,118,110), .22);
	border-left: 3px solid var(--ffwa-accent, #0F766E);
	border-radius: 6px;
	background: var(--ffwa-bg, #fff);
	color: var(--ffwa-text, #3C4858);
	font-size: 15px;
	line-height: 1.7;
}

.ffwa-gate__head,
.ffwa-gate__sent {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.ffwa-gate__icon {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, .06);
	color: var(--ffwa-accent, #0F766E);
}

.ffwa-gate__actions {
	margin: 14px 0 0;
}

.ffwa-gate__icon svg {
	width: 19px;
	height: 19px;
	display: block;
}

.ffwa-gate__title {
	margin: 0 0 6px;
	font-size: 18px;
	line-height: 1.3;
	color: var(--ffwa-heading, var(--ffwa-accent, #0F766E));
}

.ffwa-gate__text,
.ffwa-gate__text p {
	margin: 0;
	color: var(--ffwa-text, #3C4858);
}

.ffwa-gate__error {
	margin: 16px 0 0;
	padding: 11px 14px;
	border-radius: 4px;
	border-left: 3px solid #b33a3a;
	background: rgba(179, 58, 58, .08);
	color: #7e2020;
	font-size: 14px;
}

.ffwa-gate__form {
	margin: 20px 0 0;
}

.ffwa-gate__row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ffwa-gate__row input[type="email"] {
	flex: 1 1 240px;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid rgba(var(--ffwa-text-rgb, 60,72,88), .28);
	border-radius: 4px;
	font-size: 15px;
	line-height: 1.4;
	/* pinned light regardless of the panel, so typed text is always legible */
	background: #fff;
	color: #1f2933;
}

.ffwa-gate__row input[type="email"]::placeholder {
	color: rgba(31, 41, 51, .5);
}

.ffwa-gate__row input[type="email"]:focus {
	outline: 2px solid var(--ffwa-accent, #0F766E);
	outline-offset: 1px;
	border-color: var(--ffwa-accent, #0F766E);
}

.ffwa-gate .ffwa-gate__row button,
.ffwa-gate .ffwa-gate__row button[type="submit"] {
	flex: 0 0 auto;
	padding: 12px 26px;
	border: 1px solid var(--ffwa-accent, #0F766E);
	border-radius: 4px;
	background-color: var(--ffwa-accent, #0F766E);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	cursor: pointer;
	transition: opacity .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ffwa-gate .ffwa-gate__row button:hover,
.ffwa-gate .ffwa-gate__row button:focus {
	background-color: var(--ffwa-accent, #0F766E);
	color: #fff;
	opacity: .9;
}

/* The honeypot. Must be reachable by bots parsing the DOM but invisible and
   unfocusable for people — so no display:none, which some bots skip. */
.ffwa-gate__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.ffwa-gate {
		padding: 20px;
	}

	.ffwa-gate__row button {
		width: 100%;
	}
}

/* ==========================================================================
   Fluent Forms error state
   ==========================================================================
   When a submission is rejected the error arrives over AJAX and Fluent Forms
   marks the field with its own classes. Many themes restyle those to their own
   palette — the message appears, but the input keeps its normal or even its
   "valid" colour, so a failed field looks the same as a good one.

   These rules force a genuine error state. They are scoped to .ffwa-form-wrap
   where we own the markup, and to Fluent Forms' own error classes otherwise,
   so ordinary field styling elsewhere on the site is untouched.
   ========================================================================== */

.ffwa-form-wrap .ff-el-group.ff-el-is-error .ff-el-form-control,
.ffwa-form-wrap .ff-el-group.ff-el-is-error input[type="text"],
.ffwa-form-wrap .ff-el-group.ff-el-is-error input[type="email"],
.ffwa-form-wrap .ff-el-group.ff-el-is-error input[type="tel"],
.ffwa-form-wrap .ff-el-group.ff-el-is-error input[type="url"],
.ffwa-form-wrap .ff-el-group.ff-el-is-error input[type="number"],
.ffwa-form-wrap .ff-el-group.ff-el-is-error textarea,
.ffwa-form-wrap .ff-el-group.ff-el-is-error select,
.fluentform .ff-el-group.ff-el-is-error .ff-el-form-control {
	border-color: #b3261e !important;
	/* themes commonly style only the bottom edge, so name it explicitly */
	border-bottom-color: #b3261e !important;
	background-color: #fff6f5 !important;
	box-shadow: 0 0 0 1px rgba(179, 38, 30, .18) !important;
}

.ffwa-form-wrap .ff-el-group.ff-el-is-error .ff-el-form-control:focus,
.fluentform .ff-el-group.ff-el-is-error .ff-el-form-control:focus {
	border-color: #b3261e !important;
	box-shadow: 0 0 0 3px rgba(179, 38, 30, .18) !important;
	outline: none !important;
}

/* the message itself */
.ffwa-form-wrap .ff-el-group .error,
.ffwa-form-wrap .ff-el-group .text-danger,
.ffwa-form-wrap .error.text-danger,
.ffwa-form-wrap .ff-el-is-error .error,
.fluentform .ff-el-group .error.text-danger {
	color: #b3261e !important;
	font-weight: 500 !important;
	display: block;
	margin-top: 6px;
	padding-left: 22px;
	position: relative;
	line-height: 1.5;
}

/* a warning mark, so the error reads as one even to someone who cannot
   distinguish the colour from the surrounding text */
.ffwa-form-wrap .ff-el-group .error::before,
.ffwa-form-wrap .error.text-danger::before,
.fluentform .ff-el-group .error.text-danger::before {
	content: "!";
	position: absolute;
	left: 0;
	top: .15em;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #b3261e;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 15px;
	text-align: center;
}

/* the label above a failed field */
.ffwa-form-wrap .ff-el-group.ff-el-is-error .ff-el-input--label label {
	color: #b3261e !important;
}
