/*
 * trbc buttons — one system, used by every component.
 *
 * Wayfinder's rule: NO TEXT-ONLY LINKS ON PRIMARY CONTENT. Before this the
 * page had exactly one filled button and five chevron links, so nothing read
 * as the next step — "About iKids" was doing a button's job dressed as body
 * copy. A link is for a word inside a sentence; anything a reader is meant to
 * act on gets a button.
 *
 * Three levels and no more:
 *
 *   .trbc-btn              filled brand   — the one thing you most want done
 *   .trbc-btn--ghost       outlined       — the real alternative to it
 *   .trbc-btn--quiet       text + chevron — genuinely minor, in-flow links
 *
 * A section should carry at most one filled button. Two filled buttons side by
 * side is not emphasis, it is a fork with no recommendation.
 */

.trbc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--trbc-space-2);
	/* Height rather than vertical padding, so a filled and an outlined button
	   set in different type sizes still line up on one optical baseline. */
	min-height: 44px;
	padding: 0 var(--trbc-space-5);
	border: 1px solid transparent;
	border-radius: var(--trbc-radius-md);
	background: var(--trbc-brand);
	color: var(--trbc-ink-invert);
	font-family: var(--trbc-face);
	font-size: var(--trbc-text-base);
	font-weight: var(--trbc-weight-semibold);
	line-height: 1;
	letter-spacing: var(--trbc-tracking-normal);
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: var(--trbc-shadow-brand);
	transition: background var(--trbc-ease-quick), border-color var(--trbc-ease-quick),
		color var(--trbc-ease-quick), transform var(--trbc-ease-quick),
		box-shadow var(--trbc-ease-slow);
}

.trbc-btn:hover {
	background: var(--trbc-brand-hover);
	color: var(--trbc-ink-invert);
	transform: translateY(-1px);
	box-shadow: var(--trbc-shadow-brand-hover);
}

.trbc-btn:active {
	transform: none;
	box-shadow: none;
}

.trbc-btn:focus-visible {
	outline: 2px solid var(--trbc-focus);
	outline-offset: 3px;
}

/* ---------- ghost ----------
   A real alternative, not a demoted one: same height, same weight, same
   target. Only the fill differs, which is what makes the pair read as a
   choice rather than a hierarchy. */
.trbc-btn--ghost {
	background: transparent;
	border-color: var(--trbc-brand-border);
	color: var(--trbc-brand-deep);
	box-shadow: none;
}

.trbc-btn--ghost:hover {
	background: var(--trbc-brand-tint);
	border-color: var(--trbc-brand);
	color: var(--trbc-brand-deep);
	transform: translateY(-1px);
	box-shadow: none;
}

/* ---------- quiet ----------
   Kept for genuinely minor links. Still 44px tall so it remains a real target
   on a phone, but carries no fill and no border. */
.trbc-btn--quiet {
	padding: 0 2px;
	background: transparent;
	border-color: transparent;
	color: var(--trbc-brand-deep);
	font-weight: var(--trbc-weight-medium);
	box-shadow: none;
}

.trbc-btn--quiet::after {
	content: "\203A";
	font-size: 19px;
	line-height: 0;
	transform: translateY(-1px);
	transition: transform var(--trbc-ease-quick);
}

.trbc-btn--quiet:hover {
	background: transparent;
	color: var(--trbc-brand-deep);
	transform: none;
	box-shadow: none;
}

.trbc-btn--quiet:hover::after {
	transform: translate(3px, -1px);
}

/* ---------- sizes ---------- */
.trbc-btn--sm {
	min-height: 36px;
	padding: 0 var(--trbc-space-4);
	font-size: var(--trbc-text-sm);
}

.trbc-btn--lg {
	min-height: 50px;
	padding: 0 var(--trbc-space-6);
	font-size: var(--trbc-text-md);
}

/* Full width, for phones where two side-by-side buttons each end up too narrow
   to read and too small to hit. */
.trbc-btn--block {
	display: flex;
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	.trbc-btn,
	.trbc-btn--quiet::after {
		transition: none;
	}

	.trbc-btn:hover {
		transform: none;
	}
}
