/* Buttons: the one CTA system for the site. Every CTA uses .tv-base-btn plus a variant.
 * Secondary buttons switch to the dark-surface colours automatically inside .surface--dark.
 * The header CTA is its own exception and is styled in main.css. */

.button-group {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.tv-base-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	height: 54px;
	padding: 0 28px;
	border: 1.5px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--color-primary);
	font-family: var(--font-family);
	font-size: var(--font-size-body-sm);
	font-style: normal;
	font-weight: var(--font-weight-bold);
	line-height: 120%;
	letter-spacing: 0.005em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, opacity 200ms ease, translate 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}

/* Chevron only: a square button */
.tv-base-btn--icon {
	width: 54px;
	padding: 0;
}

.tv-base-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Primary: solid forest green on light surfaces, white on dark ones. A drawn arrow leads the eye and nudges on hover. */
.tv-base-btn--primary {
	background: var(--color-primary);
	color: var(--color-on-primary);
	box-shadow: 0 12px 24px -14px rgba(0, 60, 38, 0.7);
}

.tv-base-btn--primary:not(.tv-base-btn--icon)::after {
	content: '';
	width: 18px;
	height: 18px;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h12M10 4l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h12M10 4l5 5-5 5'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: translate 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.tv-base-btn--primary:hover {
	background: var(--color-dark);
	translate: 0 -2px;
	box-shadow: 0 18px 28px -14px rgba(0, 60, 38, 0.75);
}

.tv-base-btn--primary:hover::after {
	translate: 4px 0;
}

.surface--dark .tv-base-btn--primary {
	background: var(--color-on-primary);
	color: var(--color-dark);
	box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.55);
}

.surface--dark .tv-base-btn--primary:hover {
	background: var(--color-tint);
	color: var(--color-dark);
	box-shadow: 0 20px 32px -14px rgba(0, 0, 0, 0.6);
}

/* Secondary: outline */
.tv-base-btn--secondary {
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.tv-base-btn--secondary:hover {
	background: var(--color-primary);
	color: var(--color-on-primary);
}

.surface--dark .tv-base-btn--secondary {
	border-color: color-mix(in srgb, var(--color-on-primary) 55%, transparent);
	color: var(--color-on-primary);
}

.surface--dark .tv-base-btn--secondary:hover {
	background: color-mix(in srgb, var(--color-on-primary) 14%, transparent);
	border-color: var(--color-on-primary);
	color: var(--color-on-primary);
}

/* Disabled: faded and not clickable, on any variant */
.tv-base-btn:disabled,
.tv-base-btn[aria-disabled="true"] {
	opacity: 0.5;
	pointer-events: none;
	cursor: default;
}
