/* Affiliate Autopilot — front end. Inherits the theme's fonts; accent colour comes from Settings. */
:root {
	--afap-accent: #ff9900;
	--afap-border: rgba(0, 0, 0, .1);
	--afap-soft: rgba(0, 0, 0, .03);
	--afap-text-soft: rgba(0, 0, 0, .62);
	--afap-good: #1a7f37;
	--afap-bad: #b42318;
	--afap-radius: 10px;
}

/* Disclosure & freshness */
.afap-disclosure {
	font-size: .85em;
	color: var(--afap-text-soft);
	border-left: 3px solid var(--afap-accent);
	padding: .5em .9em;
	margin: 0 0 1.5em;
	background: var(--afap-soft);
}
.afap-updated {
	font-size: .85em;
	color: var(--afap-text-soft);
	margin: 0 0 1em;
}

/* Featured snippet answer, takeaways, TOC */
.afap-snippet {
	font-size: 1.05em;
	padding: 1em 1.2em;
	border-radius: var(--afap-radius);
	background: var(--afap-soft);
	border: 1px solid var(--afap-border);
}
.afap-takeaways,
.afap-toc {
	border: 1px solid var(--afap-border);
	border-radius: var(--afap-radius);
	padding: 1em 1.4em;
	margin: 1.5em 0;
}
.afap-takeaways-title,
.afap-toc-title,
.afap-proscons-title {
	font-weight: 700;
	margin: 0 0 .5em !important;
}
.afap-takeaways ul,
.afap-toc ol {
	margin: 0;
	padding-left: 1.2em;
}
.afap-toc li {
	margin: .25em 0;
}
.afap-toc a {
	text-decoration: none;
}
.afap-toc a:hover {
	text-decoration: underline;
}
h2[id] {
	scroll-margin-top: 90px;
}

/* Buttons */
.afap-btn,
.afap-btn:visited {
	display: inline-block;
	background: var(--afap-accent);
	color: #111 !important;
	font-weight: 700;
	text-decoration: none !important;
	padding: .7em 1.4em;
	border-radius: 999px;
	line-height: 1.2;
	text-align: center;
	transition: filter .15s ease, transform .15s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.afap-btn:hover,
.afap-btn:focus {
	filter: brightness(1.06);
	transform: translateY(-1px);
}
.afap-btn--large {
	font-size: 1.1em;
	padding: .9em 2em;
}
.afap-btn--small {
	font-size: .85em;
	padding: .5em 1em;
	white-space: nowrap;
}
.afap-btn-wrap {
	text-align: center;
	margin: 1.2em 0 2em;
}

/* Product box */
.afap-box {
	position: relative;
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	gap: 1.4em;
	align-items: center;
	border: 1px solid var(--afap-border);
	border-radius: var(--afap-radius);
	padding: 1.4em;
	margin: 1.2em 0 1.6em;
	background: #fff;
	color: #1d1d1f;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.afap-box--unavailable {
	opacity: .75;
}
.afap-box--noimg {
	grid-template-columns: 1fr;
}
.afap-box-media {
	text-align: center;
}
.afap-box-media img,
.afap-img {
	max-width: 100%;
	max-height: 240px;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: 0 auto;
	box-shadow: none !important;
	border: 0 !important;
}
.afap-box-title {
	font-weight: 700;
	font-size: 1.05em;
	line-height: 1.35;
	margin: 0 0 .25em !important;
}
.afap-box-title a {
	color: inherit !important;
	text-decoration: none !important;
}
.afap-box-brand {
	font-size: .85em;
	color: var(--afap-text-soft);
	margin: 0 0 .6em !important;
}
.afap-box-features {
	margin: 0 0 .9em !important;
	padding-left: 1.1em !important;
	font-size: .92em;
}
.afap-box-features li {
	margin: .2em 0;
}
.afap-box-buy {
	display: flex;
	flex-wrap: wrap;
	gap: .8em;
	align-items: center;
	justify-content: space-between;
}
.afap-badge {
	position: absolute;
	top: -.75em;
	left: 1em;
	background: #1d1d1f;
	color: #fff;
	font-size: .75em;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	padding: .3em .8em;
	border-radius: 999px;
}
.afap-badge--inline {
	position: static;
	display: inline-block;
	margin-bottom: .3em;
}
.afap-deal {
	display: inline-block;
	background: var(--afap-bad);
	color: #fff;
	font-size: .75em;
	font-weight: 700;
	padding: .2em .6em;
	border-radius: 4px;
	margin-bottom: .6em;
}

/* Prices */
.afap-price {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .4em;
}
.afap-price-now {
	font-size: 1.25em;
	font-weight: 800;
}
.afap-price-was {
	color: var(--afap-text-soft);
	font-size: .9em;
}
.afap-save {
	color: var(--afap-good);
	font-weight: 700;
	font-size: .9em;
}
.afap-price--na {
	color: var(--afap-text-soft);
	font-size: .9em;
}
.afap-price-date {
	display: block;
	width: 100%;
	font-size: .72em;
	color: var(--afap-text-soft);
	cursor: help;
}
.afap-price-date abbr {
	text-decoration: none;
}

/* Comparison table */
.afap-table {
	border: 1px solid var(--afap-border);
	border-radius: var(--afap-radius);
	overflow: hidden;
	margin: 1em 0 2em;
	background: #fff;
	color: #1d1d1f;
}
.afap-row {
	display: grid;
	grid-template-columns: 90px 1fr auto;
	gap: 1em;
	align-items: center;
	padding: .9em 1.1em;
	border-top: 1px solid var(--afap-border);
}
.afap-row:first-child {
	border-top: 0;
}
.afap-row:nth-child(even) {
	background: var(--afap-soft);
}
.afap-thumb {
	max-width: 80px !important;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}
.afap-row-title {
	display: block;
	font-weight: 600;
	color: inherit !important;
	line-height: 1.35;
}
.afap-cell-buy {
	text-align: right;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: .4em;
}
.afap-cell-buy .afap-price-date {
	display: none;
}

/* Pros & cons */
.afap-proscons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;
	margin: 1em 0 1.4em;
}
.afap-pros,
.afap-cons {
	border-radius: var(--afap-radius);
	padding: 1em 1.2em;
	border: 1px solid var(--afap-border);
}
.afap-pros {
	border-top: 4px solid var(--afap-good);
}
.afap-cons {
	border-top: 4px solid var(--afap-bad);
}
.afap-pros ul,
.afap-cons ul {
	margin: 0 !important;
	padding-left: 0 !important;
	list-style: none !important;
}
.afap-pros li,
.afap-cons li {
	position: relative;
	padding-left: 1.5em;
	margin: .35em 0;
}
.afap-pros li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--afap-good);
	font-weight: 700;
}
.afap-cons li::before {
	content: "✕";
	position: absolute;
	left: 0;
	color: var(--afap-bad);
	font-weight: 700;
}
.afap-bestfor {
	background: var(--afap-soft);
	border-radius: var(--afap-radius);
	padding: .7em 1em;
}

/* Related articles */
.afap-related {
	border-top: 1px solid var(--afap-border);
	margin: 2.5em 0 1em;
	padding-top: 1em;
}
.afap-related-title {
	font-weight: 700;
	margin: 0 0 .5em !important;
}
.afap-related ul {
	margin: 0;
	padding-left: 1.2em;
}
.afap-related li {
	margin: .35em 0;
}

/* FAQ */
.afap-faq h3 {
	margin-top: 1.2em;
}

@media (max-width: 640px) {
	.afap-box {
		grid-template-columns: 1fr;
		text-align: left;
		padding: 1.4em 1em 1em;
	}
	.afap-box-buy .afap-btn {
		width: 100%;
	}
	.afap-row {
		grid-template-columns: 64px 1fr;
	}
	.afap-cell-buy {
		grid-column: 1 / -1;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
	.afap-proscons {
		grid-template-columns: 1fr;
	}
}
