/*
 * Antlers Draft — styles for the components the plugin puts in drafts.
 *
 * Fonts and text colour are inherited from the theme. Backgrounds are tints of
 * the accent laid over transparent, so every component works in both the
 * site's light mode and its dark mode without separate rules.
 *
 * The accent colour is set on the plugin's settings page. To restyle a
 * component, edit it here; every post, old and new, follows.
 */

:root {
	--aa-accent: #b5651d;
}

/* ---- Lede: the first paragraph, slightly larger ----------------------- */

.aa-lede {
	font-size: 1.15em;
	line-height: 1.55;
}

/* ---- Boxes: summary, callout, bottom line, sources -------------------- */

.aa-box {
	margin: 1.75em 0;
	padding: 1.1em 1.3em;
	border-left: 4px solid var(--aa-accent);
	border-radius: 0 6px 6px 0;
	background: rgba(127, 127, 127, 0.1);
	background: color-mix(in srgb, var(--aa-accent) 10%, transparent);
}

.aa-box .aa-box-label {
	margin: 0 0 0.55em;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1.3;
	text-transform: uppercase;
	color: var(--aa-accent);
	color: color-mix(in srgb, var(--aa-accent) 72%, currentColor);
}

.aa-box .aa-box-title {
	margin: 0 0 0.5em;
	font-size: 1.25em;
	line-height: 1.25;
}

.aa-box p,
.aa-box ul,
.aa-box ol {
	margin-top: 0;
	margin-bottom: 0.7em;
}

.aa-box p:last-child,
.aa-box ul:last-child,
.aa-box ol:last-child {
	margin-bottom: 0;
}

.aa-box ul,
.aa-box ol {
	padding-left: 1.2em;
}

.aa-box li {
	margin-bottom: 0.35em;
}

/* Callout: outlined rather than filled, so it reads as an aside. */
.aa-box.aa-callout {
	border: 1px solid var(--aa-accent);
	border-left-width: 4px;
	background: transparent;
}

/* Bottom line: a bar across the top, closing the piece. */
.aa-box.aa-bottomline {
	border-left: 0;
	border-top: 4px solid var(--aa-accent);
	border-radius: 0 0 6px 6px;
	padding-top: 1.2em;
}

/* Sources: quiet, small, at the foot. */
.aa-box.aa-sources {
	padding: 0.9em 0 0;
	border: 0;
	border-top: 1px dashed rgba(127, 127, 127, 0.55);
	border-radius: 0;
	background: transparent;
	font-size: 0.88em;
}

/* ---- Pull quote ------------------------------------------------------- */

.wp-block-pullquote.aa-pullquote {
	margin: 2em 0;
	padding: 0.35em 0 0.35em 1.2em;
	border: 0;
	border-left: 4px solid var(--aa-accent);
	text-align: left;
}

.wp-block-pullquote.aa-pullquote blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.wp-block-pullquote.aa-pullquote blockquote::before,
.wp-block-pullquote.aa-pullquote blockquote::after {
	content: none;
}

.wp-block-pullquote.aa-pullquote p {
	margin: 0;
	font-size: 1.45em;
	font-style: normal;
	font-weight: 600;
	line-height: 1.35;
}

.wp-block-pullquote.aa-pullquote cite {
	display: block;
	margin-top: 0.6em;
	font-size: 0.85em;
	font-style: normal;
	font-weight: 400;
	text-transform: none;
	opacity: 0.75;
}

/* ---- Stats row -------------------------------------------------------- */

.wp-block-columns.aa-stats {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 0.75em;
	margin: 1.75em 0;
}

.wp-block-columns.aa-stats > .wp-block-column {
	min-width: 0;
	margin: 0 !important;
	padding: 0.95em 0.6em;
	border-radius: 6px;
	text-align: center;
	background: rgba(127, 127, 127, 0.1);
	background: color-mix(in srgb, var(--aa-accent) 10%, transparent);
}

.aa-stats .aa-stat-value {
	margin: 0;
	font-size: 1.7em;
	font-weight: 800;
	line-height: 1.1;
	color: var(--aa-accent);
	color: color-mix(in srgb, var(--aa-accent) 78%, currentColor);
}

.aa-stats .aa-stat-label {
	margin: 0.4em 0 0;
	font-size: 0.8em;
	line-height: 1.3;
	opacity: 0.8;
}

/* ---- Checklist -------------------------------------------------------- */

ul.aa-checklist {
	margin: 1.5em 0;
	padding-left: 0;
	list-style: none;
}

ul.aa-checklist li {
	position: relative;
	margin: 0 0 0.55em;
	padding-left: 1.9em;
}

ul.aa-checklist li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 1.05em;
	height: 1.05em;
	box-sizing: border-box;
	border: 2px solid var(--aa-accent);
	border-radius: 3px;
}

/* ---- Tables ----------------------------------------------------------- */

.wp-block-table.is-style-stripes th {
	border-bottom: 2px solid var(--aa-accent);
	text-align: left;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: rgba(127, 127, 127, 0.1);
}
