/**
 * Shared button component (.nn-btn). Used by any block or template.
 */

.nn-btn-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 32px;
	margin: 0;
	padding: 0;
}

.nn-btn {
	display: inline-block;
	font-family: "all-round-gothic", sans-serif;
	font-weight: 500;
	text-decoration: none;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nn-btn:hover,
.nn-btn:focus {
	opacity: 0.92;
}

/* Filled: shared shape */
.nn-btn--filled {
	border-radius: 6px;
	border-style: solid;
	border-width: 2px;
}

.nn-btn--filled.nn-btn--blue {
	background: #00225f;
	color: #fff;
	border-color: #00225f;
}

.nn-btn--filled.nn-btn--green {
	background: #21beb2;
	color: #00225f;
	border-color: #21beb2;
}

.nn-btn--filled.nn-btn--white {
	background: #fff;
	color: #00225f;
	border: 0;
}

/* Filled sizes */
.nn-btn--filled.nn-btn--sm {
	padding: 12px 14px;
    font-size: 14px;
	line-height: 100%;
	text-transform: uppercase;
}

.nn-btn--filled.nn-btn--md {
	padding: 16px 20px;
	font-size: 18px;
	line-height: 100%;
	text-transform: uppercase;
}

.nn-btn--filled.nn-btn--lg {
	padding: 18px 22px;
	font-size: 18px;
	line-height: 100%;
	text-transform: uppercase;
}

@media (max-width: 768px) {
	.nn-btn-list {
		gap: 20px;
	}

	.nn-btn--filled.nn-btn--sm {
		padding: 10px 12px;
		font-size: 13px;
	}

	.nn-btn--filled.nn-btn--md {
		padding: 12px 14px;
		font-size: 14px;
	}

	.nn-btn--filled.nn-btn--lg {
		padding: 14px 18px;
		font-size: 16px;
	}
}

/* Text: line is ::after (ready for width/transform animation) */
.nn-btn--text {
	position: relative;
	background: transparent;
	border: 0;
	border-radius: 0;
	line-height: 100%;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0;
}

@keyframes nn-btn-text-underline-refill {
	0% {
		transform: scaleX(1);
		transform-origin: right center;
	}
	49.9% {
		transform: scaleX(0);
		transform-origin: right center;
	}
	50% {
		transform: scaleX(0);
		transform-origin: left center;
	}
	100% {
		transform: scaleX(1);
		transform-origin: left center;
	}
}

.nn-btn--text::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	transform: scaleX(1);
	transform-origin: left center;
	transition: opacity 0.25s ease;
}

.nn-btn--text.nn-btn--blue {
	color: #00225f;
}

.nn-btn--text.nn-btn--blue::after {
	background: #00225f;
}

.nn-btn--text.nn-btn--green {
	color: #21beb2;
}

.nn-btn--text.nn-btn--green::after {
	background: #21beb2;
}

.nn-btn--text.nn-btn--white {
	color: #fff;
}

.nn-btn--text.nn-btn--white::after {
	background: #fff;
}

/* Text sizes (space below copy for the rule) */
.nn-btn--text.nn-btn--sm {
	font-size: 0.8125rem;
	padding-bottom: 0.3rem;
}

.nn-btn--text.nn-btn--md {
	font-size: 18px;
	padding-bottom: 0.4rem;
}

.nn-btn--text.nn-btn--lg {
	font-size: 1rem;
	padding-bottom: 0.5rem;
}

@media (max-width: 768px) {
	.nn-btn--text.nn-btn--sm {
		font-size: 0.75rem;
		padding-bottom: 0.25rem;
	}

	.nn-btn--text.nn-btn--md {
		font-size: 0.8125rem;
		padding-bottom: 0.3rem;
	}

	.nn-btn--text.nn-btn--lg {
		font-size: 1rem;
		padding-bottom: 0.4rem;
	}
}

.nn-btn--text:hover::after,
.nn-btn--text:focus-visible::after {
	opacity: 0.85;
	animation: nn-btn-text-underline-refill 0.65s ease-out;
}

.nn-btn--text:hover,
.nn-btn--text:focus-visible {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	.nn-btn--text:hover::after,
	.nn-btn--text:focus-visible::after {
		animation: none;
	}
}
