/**
 * GolfWithDiscs client-side language suggestion.
 */

.gwd-language-suggestion {
	position: relative;
	z-index: 8;
	box-sizing: border-box;
	width: 100%;
	padding: 10px clamp(16px, 3vw, 32px);
	border-bottom: 1px solid var(--theme-palette-color-6);
	background: var(--theme-palette-color-4);
	color: var(--theme-palette-color-8);
	font-family: var(--gwd-font-primary, Inter, system-ui, -apple-system, sans-serif);
}

.gwd-language-suggestion__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	box-sizing: border-box;
	width: min(100%, var(--theme-normal-container-max-width, 1140px));
	margin-inline: auto;
	padding: 10px 12px 10px 16px;
	border: 1px solid var(--theme-palette-color-6);
	border-inline-start: 4px solid var(--theme-palette-color-1);
	border-radius: var(--gwd-radius-md, 12px);
	background: var(--theme-palette-color-5);
	box-shadow: var(--gwd-shadow);
}

.gwd-language-suggestion__message {
	margin: 0;
	color: var(--theme-palette-color-8);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.45;
}

.gwd-language-suggestion__actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 8px;
}

.gwd-language-suggestion__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 14px;
	border: 1px solid var(--theme-palette-color-1);
	border-radius: var(--gwd-radius-sm, 6px);
	background: var(--theme-palette-color-1);
	color: var(--theme-palette-color-4);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.gwd-language-suggestion__link:hover {
	border-color: var(--theme-palette-color-2);
	background: var(--theme-palette-color-2);
	color: var(--theme-palette-color-4);
}

.gwd-language-suggestion__close {
	display: inline-grid;
	flex: 0 0 40px;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--theme-palette-color-6);
	border-radius: 50%;
	background: var(--theme-palette-color-5);
	color: var(--theme-palette-color-8);
	font: inherit;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.gwd-language-suggestion__close:hover {
	border-color: var(--theme-palette-color-1);
	background: color-mix(
		in srgb,
		var(--theme-palette-color-1) 10%,
		var(--theme-palette-color-5)
	);
	color: var(--theme-palette-color-1);
}

.gwd-language-suggestion__link:focus-visible,
.gwd-language-suggestion__close:focus-visible {
	outline: 3px solid var(--theme-palette-color-2);
	outline-offset: 3px;
}

@media (max-width: 640px) {
	.gwd-language-suggestion {
		padding: 8px 12px;
	}

	.gwd-language-suggestion__inner {
		align-items: flex-start;
		gap: 10px;
		flex-direction: column;
		padding: 12px;
	}

	.gwd-language-suggestion__actions {
		justify-content: space-between;
		width: 100%;
	}

	.gwd-language-suggestion__link {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gwd-language-suggestion *,
	.gwd-language-suggestion *::before,
	.gwd-language-suggestion *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
