/* Table-scoped button appearance for inline "button link" format */
table td a.wp-block-custom-button__link,
table th a.wp-block-custom-button__link {
	--_cb-bg: var(--cb-bg, #2271b1);
	--_cb-fg: var(--cb-fg, #ffffff);
	--_cb-radius: var(--cb-radius, 4px);
	--_cb-py: var(--cb-py, 8px);
	--_cb-px: var(--cb-px, 12px);

	display: block;
	width: fit-content;
	max-width: 100%;
	padding: var(--_cb-py) var(--_cb-px);

	background: var(--_cb-bg) !important;
	color: var(--_cb-fg) !important;

	border-radius: var(--_cb-radius);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);

	text-decoration: none !important;
	line-height: 1.2;
	font-weight: 600;
	text-align: center;

	overflow-wrap: anywhere;
	word-break: break-word;
	white-space: normal;

	transition: filter 120ms ease, transform 80ms ease, box-shadow 120ms ease;
}

table td a.wp-block-custom-button__link:hover,
table th a.wp-block-custom-button__link:hover {
	filter: brightness(0.96);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

table td a.wp-block-custom-button__link:active,
table th a.wp-block-custom-button__link:active {
	transform: translateY(1px);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.14);
	filter: brightness(0.94);
}

table td a.wp-block-custom-button__link:focus-visible,
table th a.wp-block-custom-button__link:focus-visible {
	outline: 2px solid rgba(34, 113, 177, 0.55);
	outline-offset: 2px;
}

/* Alignment by data-align */
table td a.wp-block-custom-button__link[data-align="left"],
table th a.wp-block-custom-button__link[data-align="left"] {
	margin-left: 0;
	margin-right: auto;
}

table td a.wp-block-custom-button__link[data-align="center"],
table th a.wp-block-custom-button__link[data-align="center"] {
	margin-left: auto;
	margin-right: auto;
}

table td a.wp-block-custom-button__link[data-align="right"],
table th a.wp-block-custom-button__link[data-align="right"] {
	margin-left: auto;
	margin-right: 0;
}

