/**
 * "Newsletter cards (Frisbii)" field — scoped styles, ported from the reference
 * wizard (example.html). Colours are CSS custom properties so a per-portal
 * preset (Stage 4) can re-theme the look without touching this file.
 *
 * @package WFZ_NF_Extended_Editor
 */

.wfz-nfee-nl {
	--wfz-nl-blue: #00356f;
	--wfz-nl-blue-strong: #001f4a;
	--wfz-nl-yellow: #ffd400;
	--wfz-nl-green: #2a7a3b;
	--wfz-nl-rule: #e2e6ec;
	--wfz-nl-rule-strong: #c7cfda;
	--wfz-nl-card-bg: #fff;
	--wfz-nl-card-on-bg: #f4f6fa;
	--wfz-nl-radius: 4px;
	--wfz-nl-dur: .18s;
}

/* Select-all row. */
.wfz-nfee-nl-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin: 0 0 14px;
}

.wfz-nfee-nl-subhead {
	font-size: 14px;
	font-weight: 600;
	color: var(--wfz-nl-blue-strong);
}

.wfz-nfee-nl-all {
	appearance: none;
	background: none;
	border: 1px solid var(--wfz-nl-rule-strong);
	border-radius: 999px;
	padding: 5px 14px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wfz-nl-blue);
	cursor: pointer;
	transition: border-color var(--wfz-nl-dur), background var(--wfz-nl-dur);
}

.wfz-nfee-nl-all:hover,
.wfz-nfee-nl-all:focus {
	border-color: var(--wfz-nl-blue);
	background: var(--wfz-nl-card-on-bg);
}

/* Grid. */
.wfz-nfee-nl-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.wfz-nfee-nl-spec-label {
	grid-column: 1 / -1;
	margin: 8px 0 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wfz-nl-blue);
}

/* Card. */
.wfz-nfee-nl-card {
	position: relative;
	display: flex;
	flex-direction: row;
	gap: 12px;
	min-height: 100px;
	padding: 0;
	background: var(--wfz-nl-card-bg);
	border: 1.5px solid var(--wfz-nl-rule-strong);
	border-radius: var(--wfz-nl-radius);
	box-shadow: 0 1px 3px rgba( 0, 31, 74, .06 );
	cursor: pointer;
	user-select: none;
	overflow: hidden;
	transition: border-color var(--wfz-nl-dur), box-shadow var(--wfz-nl-dur), background var(--wfz-nl-dur);
}

.wfz-nfee-nl-card:hover {
	border-color: var(--wfz-nl-blue);
	box-shadow: 0 2px 8px rgba( 0, 31, 74, .1 );
}

.wfz-nfee-nl-card:focus {
	outline: 2px solid rgba( 0, 53, 111, .4 );
	outline-offset: 2px;
}

.wfz-nfee-nl-card.is-on {
	border-color: var(--wfz-nl-blue);
	background: var(--wfz-nl-card-on-bg);
	box-shadow: 0 2px 8px rgba( 0, 53, 111, .1 );
}

.wfz-nfee-nl-card.is-flagship {
	grid-column: 1 / -1;
}

/* Visual. */
.wfz-nfee-nl-visual {
	flex: 0 0 auto;
	width: 84px;
	height: 84px;
	margin: 12px 0 12px 12px;
	border-radius: 8px;
	overflow: hidden;
}

.wfz-nfee-nl-card.is-flagship .wfz-nfee-nl-visual {
	width: 108px;
	height: 108px;
	border-radius: 10px;
}

.wfz-nfee-nl-visual img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Plus / check toggle. */
.wfz-nfee-nl-toggle {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 26px;
	height: 26px;
	border: 1.5px solid var(--wfz-nl-rule-strong);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	transition: background var(--wfz-nl-dur), border-color var(--wfz-nl-dur), box-shadow var(--wfz-nl-dur);
}

.wfz-nfee-nl-card:hover .wfz-nfee-nl-toggle {
	box-shadow: 0 0 0 3px rgba( 0, 53, 111, .12 );
}

.wfz-nfee-nl-toggle svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: var(--wfz-nl-blue);
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.wfz-nfee-nl-chk {
	display: none;
	stroke: #fff;
}

.wfz-nfee-nl-card.is-on .wfz-nfee-nl-toggle {
	background: var(--wfz-nl-green);
	border-color: var(--wfz-nl-green);
	box-shadow: none;
}

.wfz-nfee-nl-card.is-on .wfz-nfee-nl-plus {
	display: none;
}

.wfz-nfee-nl-card.is-on .wfz-nfee-nl-chk {
	display: block;
}

/* Body. */
.wfz-nfee-nl-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 12px 44px 12px 0;
}

.wfz-nfee-nl-card:not(.is-flagship) .wfz-nfee-nl-body {
	padding-left: 12px;
}

.wfz-nfee-nl-badge {
	display: inline-block;
	align-self: flex-start;
	margin: 0 0 6px;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--wfz-nl-blue-strong);
	background: var(--wfz-nl-yellow);
	border-radius: 3px;
}

.wfz-nfee-nl-cad {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--wfz-nl-blue);
	opacity: .85;
	margin: 0 0 2px;
}

.wfz-nfee-nl-name {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--wfz-nl-blue-strong);
}

.wfz-nfee-nl-card.is-flagship .wfz-nfee-nl-name {
	font-size: 22px;
}

.wfz-nfee-nl-desc {
	margin: 4px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: #3c434a;
}

.wfz-nfee-nl-card.is-flagship .wfz-nfee-nl-desc {
	font-size: 13.5px;
}

/* Single column on narrow screens. */
@media ( max-width: 600px ) {
	.wfz-nfee-nl-grid {
		grid-template-columns: 1fr;
	}

	.wfz-nfee-nl-card.is-flagship {
		grid-column: 1;
	}

	.wfz-nfee-nl-card.is-flagship .wfz-nfee-nl-visual {
		width: 84px;
		height: 84px;
	}

	.wfz-nfee-nl-card.is-flagship .wfz-nfee-nl-name {
		font-size: 17px;
	}
}
