/**
 * Blog byline toolbar: Preferred Sources, Summarize Article, Copy for LLM, View Markdown.
 *
 * Colours are Charitable canon, resolved marketing-site surface first then
 * brand tier:
 *   #e2e8f0  marketing-site border
 *   #1a1a1a  marketing-site ink-secondary, body copy on light
 *   #1e1515  brand ink
 *   #fc9a2a  brand orange
 *   #ffffff  brand surface-white
 * Type sits on the marketing-site scale (14px, weights 500 and 700).
 * Canon defines no radius, spacing or shadow tokens, so those are chosen here
 * rather than taken from a token, and no brand colour is invented.
 */

.wpchar-byline-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

/**
 * Google's Preferred Sources button.
 *
 * Its shape is NOT ours to change, and this was measured rather than assumed.
 * Google renders the button inside an open shadow root attached to this element
 * as a `publisher-md-outlined-button`, and inside that shadow root it sets
 * `--md-outlined-button-container-shape: 20px` and
 * `--md-outlined-button-container-height: 40px` directly on the element. A
 * declaration on the element beats an inherited one, so setting those custom
 * properties here does nothing at all. Verified in the browser 2026-09-15:
 * host-level values left the computed radius at 20px, while the same values set
 * on the element or injected into the shadow root moved it to 4px.
 *
 * Squaring it would therefore mean injecting a stylesheet into Google's shadow
 * root with JavaScript, which depends on their internal element name and
 * Material property names and overrides the presentation they intend. Not worth
 * the fragility, so our own buttons match Google's 20px pill and 40px height
 * instead. Google's button keeps its logo, wording, colours and typography.
 */
.wpchar-bt-google {
	display: inline-flex;
	align-items: center;
}

.wpchar-bt-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid #e2e8f0;
	border-radius: 20px;
	background-color: #ffffff;
	color: #1a1a1a;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.12s ease-in-out, color 0.12s ease-in-out;
}

.wpchar-bt-btn:hover,
.wpchar-bt-btn:focus-visible {
	border-color: #fc9a2a;
	color: #1e1515;
	text-decoration: none;
}

.wpchar-bt-btn:focus-visible {
	outline: 2px solid #fc9a2a;
	outline-offset: 2px;
}

/* The trigger is the primary action of the three, so it carries the brand
   border at rest while the two Markdown buttons stay neutral. */
.wpchar-bt-trigger {
	border-color: #fc9a2a;
	font-weight: 700;
}

.wpchar-bt-summarize {
	position: relative;
	display: inline-flex;
}

.wpchar-bt-menu {
	position: absolute;
	z-index: 20;
	top: calc(100% + 4px);
	left: 0;
	min-width: 100%;
	padding: 4px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background-color: #ffffff;
	box-shadow: 0 6px 20px -8px rgba(30, 21, 21, 0.25);
}

.wpchar-bt-menu[hidden] {
	display: none;
}

.wpchar-bt-menu-item {
	display: block;
	padding: 7px 10px;
	border-radius: 3px;
	color: #1a1a1a;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	text-decoration: none;
}

.wpchar-bt-menu-item:hover,
.wpchar-bt-menu-item:focus-visible {
	background-color: #e2e8f0;
	color: #1e1515;
	text-decoration: none;
}

.wpchar-bt-menu-item:focus-visible {
	outline: 2px solid #fc9a2a;
	outline-offset: -2px;
}

.wpchar-bt-copy[aria-busy="true"] {
	cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
	.wpchar-bt-btn {
		transition: none;
	}
}
