/* Technical write-up and protected slide viewer. Loads after curation.css on inner pages. */

/* Code blocks: scroll sideways on a phone instead of breaking the page. */
.wp-block-code {
	background: var(--wp--preset--color--surface);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 35%, transparent);
	border-radius: .6rem;
	padding: 1rem 1.1rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	color: var(--wp--preset--color--blush);
	font: .82rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	max-width: 100%;
}
.wp-block-code code {
	background: none;
	padding: 0;
	color: inherit;
	font: inherit;
	white-space: pre;
	tab-size: 2;
}
.tech-body :where(p, li, td, th) > code {
	background: var(--wp--preset--color--surface);
	border-radius: .3rem;
	padding: .1em .35em;
	font-size: .88em;
	color: var(--wp--preset--color--blush);
	overflow-wrap: anywhere;
}

/* Architecture diagrams: the picture keeps a readable minimum width and scrolls sideways when the screen is narrower. */
.diagram {
	margin: 0;
}
.diagram__scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--wp--preset--color--surface);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 35%, transparent);
	border-radius: .6rem;
	padding: .75rem;
}
.diagram__svg {
	display: block;
	width: 100%;
	min-width: 40rem;
	height: auto;
}
.diagram figcaption {
	margin-top: .6rem;
	color: var(--wp--preset--color--muted);
	font-size: .85rem;
	text-align: center;
}

/* Tool tags and chapter grid. */
.tech-tags {
	gap: .5rem;
	margin-top: 1.25rem;
}
.tech-tag {
	display: inline-block;
	margin: 0;
	padding: .1rem .6rem;
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 999px;
	color: var(--wp--preset--color--sage);
	font-size: .75rem;
	letter-spacing: .04em;
	line-height: 1.6;
	white-space: nowrap;
}
.tech-tag--paid {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}
.tech-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 1rem;
}
.callout-lite {
	color: var(--wp--preset--color--sage);
	font-size: var(--wp--preset--font-size--large);
}
.tech-body .wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.tech-body .wp-block-buttons {
	margin-top: 2rem;
}

/* Protected slide viewer: slides are drawn to a canvas from a members-only endpoint. */
.slides-viewer {
	position: relative;
	max-width: var(--wp--style--global--wide-size, 75rem);
	margin-inline: auto;
	-webkit-user-select: none;
	user-select: none;
}
.slides-viewer__stage {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: .6rem;
	background: #000;
}
.slides-viewer__canvas {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	touch-action: pan-y;
	-webkit-touch-callout: none;
}
.slides-viewer__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	margin-top: .75rem;
}
.slides-viewer__btn {
	min-width: 44px;
	min-height: 44px;
	padding: 0 1rem;
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--sage);
	font: inherit;
	cursor: pointer;
}
.slides-viewer__btn:hover:not([disabled]),
.slides-viewer__btn:focus-visible {
	background: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--base);
}
.slides-viewer__btn[disabled] {
	opacity: .4;
	cursor: default;
}
.slides-viewer__count {
	color: var(--wp--preset--color--muted);
	font-variant-numeric: tabular-nums;
}
.slides-viewer:fullscreen {
	display: flex;
	flex-direction: column;
	justify-content: center;
	max-width: none;
	padding: .75rem;
	background: #000;
}
.slides-viewer:fullscreen .slides-viewer__stage {
	flex: 1;
	aspect-ratio: auto;
	border-radius: 0;
}
.slides-pending {
	padding: 1.25rem;
	border: 1px dashed var(--wp--preset--color--muted);
	border-radius: .6rem;
	color: var(--wp--preset--color--muted);
}
@media print {
	.slides-viewer {
		display: none !important;
	}
}
