/* The theme specimen - the parts every app has: prose, tabs, a table, a
   form, a surface, feedback, a dialog. A copy of mise-en-place's
   app/assets/styles/components/theme-specimen.css (the source of truth -
   keep this in step by hand; pssst parts are made to be copied), for the
   markup the kit's ThemeSpecimen.vue renders. On this site the style-axes
   board wears .theme-specimen (templates/pages/style-axes.php), and this
   file loads on that page only (includes/header.php). */

/* The theme specimen (components/ThemeSpecimen.vue): the parts every app
   has, stacked. Geometry only - the parts paint themselves from the theme.
   The few paints here (selected row, surfaces, the dialog) read semantic
   slots, so every mood and scheme repaints them. */

.theme-specimen {
	inner-column > * + * {
		margin-top: 2.5em;
	}

	.prose > * + * {
		margin-top: 0.75em;
	}

	[role='tablist'] {
		display: flex;
		gap: 1.5em;
		border-bottom: 1px solid var(--stroke-secondary);

		[role='tab'] {
			padding-bottom: 0.4em;
			border-bottom: 2px solid transparent;
			margin-bottom: -1px;
		}

		[aria-selected='true'] {
			border-bottom-color: var(--accent);
		}
	}

	[role='tabpanel'] {
		margin-top: 1em;
	}

	.specimen-table {
		width: 100%;
		border-collapse: collapse;

		caption {
			margin-bottom: 0.75em;
			text-align: left;
		}

		:is(th, td) {
			padding: 0.6em 0.5em;
			border-bottom: 1px solid var(--stroke-secondary);
			text-align: left;
		}

		.amount {
			text-align: right;
		}

		[data-selected='true'] {
			background: var(--selection-fill);
			color: var(--selection-ink);
		}
	}

	.specimen-form {
		display: grid;
		gap: 1.25em;
		max-width: 32em;

		> label,
		fieldset {
			display: grid;
			gap: 0.4em;
		}

		label:has(> [type='checkbox'], > [type='radio']) {
			display: flex;
			gap: 0.5em;
			align-items: center;
		}

		fieldset {
			margin: 0;
			padding: 0;
			border: 0;
		}
	}

	.surface {
		padding: 1.5em;
		border: 1px solid var(--stroke-primary);
		border-radius: var(--corners);
		background: var(--fill-secondary);

		> * + * {
			margin-top: 0.75em;
		}

		.inset {
			padding: 1em;
			border-radius: var(--corners);
			background: var(--fill-auxiliary);
		}
	}

	.feedback {
		padding: 1em;
		border-left: 3px solid var(--tone-ink);
	}

	details > * + * {
		margin-top: 0.75em;
	}

	.specimen-dialog {
		max-width: 28em;
		padding: 1.5em;
		border: 1px solid var(--stroke-primary);
		border-radius: var(--corners);
		background: var(--fill-primary);
		color: var(--ink-primary);

		&::backdrop {
			background: var(--scrim);
		}

		> * + * {
			margin-top: 0.75em;
		}
	}

	.rare > * + * {
		margin-top: 0.5em;
	}
}
