/* ==========================================================================
   Spanish site (spec 2026-11-08 §7): the EN | ES switch, the "¿Prefiere español?"
   banner, and the plugin's "still translating" notice on Spanish pages.
   Markup: inc/language.php; the notice (p.kvlang-notice) comes from the KVLTX Spanish plugin.
   ========================================================================== */

/* EN | ES switch
   ========================================================================== */

.kvlang-switch {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-family: var(--kv-font-nav);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
}

.kvlang-switch__link {
	text-decoration: none;
	transition: color var(--kv-transition), background-color var(--kv-transition), border-color var(--kv-transition);
}

/* Header utility bar (tablets and desktops; the bar is hidden on phones). Sized like the
   bar's social icons, so the bar keeps its height. */

.kvlang-switch--bar {
	font-size: 0.75rem;
	letter-spacing: 0.08em;
}

/* The bar's own divider, between the switch and the social icons. */
.kvlang-switch--bar::after {
	content: "";
	width: 1px;
	height: 16px;
	margin-left: 10px;
	background-color: rgba(255, 255, 255, 0.25);
}

.kvlang-switch--bar .kvlang-switch__link {
	display: inline-block;
	min-width: 30px;
	padding: 0 6px;
	line-height: 30px;
	text-align: center;
	border-radius: var(--kv-radius-sm);
	color: rgba(255, 255, 255, 0.7);
}

.kvlang-switch--bar .kvlang-switch__link:hover,
.kvlang-switch--bar .kvlang-switch__link:focus {
	color: var(--kv-secondary);
}

.kvlang-switch--bar .kvlang-switch__link.is-current {
	color: var(--kv-text-inverse);
	text-decoration: underline;
	text-decoration-color: var(--kv-secondary);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.kvlang-switch--bar .kvlang-switch__link:focus-visible {
	outline: 2px solid var(--kv-secondary);
	outline-offset: 1px;
}

.kvlang-switch__sep {
	color: rgba(255, 255, 255, 0.35);
}

/* Phone menu: two full-width choices above the menu list. */

.kvlang-switch--mobile {
	display: flex;
	gap: 8px;
	margin-bottom: 20px;
	font-size: 0.875rem;
	letter-spacing: 0.03em;
}

.kvlang-switch--mobile .kvlang-switch__link {
	display: flex;
	flex: 1 1 0;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--kv-border);
	border-radius: var(--kv-radius);
	background-color: var(--kv-surface);
	color: var(--kv-primary);
}

.kvlang-switch--mobile .kvlang-switch__link:hover,
.kvlang-switch--mobile .kvlang-switch__link:focus {
	border-color: var(--kv-primary);
	color: var(--kv-primary);
}

.kvlang-switch--mobile .kvlang-switch__link.is-current {
	border-color: var(--kv-primary);
	background-color: var(--kv-primary);
	color: var(--kv-text-inverse);
}

.kvlang-switch--mobile .kvlang-switch__link:focus-visible {
	outline: 2px solid var(--kv-primary);
	outline-offset: 2px;
}

/* "¿Prefiere español?" banner
   Printed hidden; shown before the page is drawn, so nothing below it moves.
   ========================================================================== */

.kvlang-banner {
	background-color: var(--kv-secondary);
	color: var(--kv-primary-dark);
	font-family: var(--kv-font-body);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.kvlang-banner[hidden] {
	display: none !important;
}

.kvlang-banner__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding-top: 6px;
	padding-bottom: 6px;
}

.kvlang-banner__text {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
	text-align: center;
}

.kvlang-banner__link,
.kvlang-banner__link:hover,
.kvlang-banner__link:focus {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.kvlang-banner__link:hover {
	text-decoration-thickness: 2px;
}

.kvlang-banner__close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
	transition: background-color var(--kv-transition);
}

.kvlang-banner__close:hover {
	background-color: rgba(15, 35, 64, 0.12);
}

.kvlang-banner__link:focus-visible,
.kvlang-banner__close:focus-visible {
	outline: 2px solid var(--kv-primary-dark);
	outline-offset: 2px;
}

@media (pointer: coarse) {
	.kvlang-banner__close {
		width: 44px;
		height: 44px;
	}
}

/* "Some parts of this page are still being translated" (added by the plugin to Spanish pages)
   ========================================================================== */

.kvlang-notice {
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 72rem;
	margin: 16px auto;
	padding: 10px 16px;
	border-left: 4px solid var(--kv-secondary);
	border-radius: var(--kv-radius-sm);
	background-color: var(--kv-bg-alt);
	color: var(--kv-text);
	font-family: var(--kv-font-body);
	font-size: 0.9375rem;
	line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
	.kvlang-switch__link,
	.kvlang-banner__close {
		transition: none;
	}
}

@media print {
	.kvlang-banner,
	.kvlang-switch {
		display: none !important;
	}
}
