/**
 * Valhalla for Vikinger — front-end core styles (UI kit used by every module).
 *
 * Every color comes from the Vikinger CSS custom properties (printed by the theme on :root for
 * the current color preset — light, dark, darkblue, …), with a fallback for other themes, so the
 * kit follows presets and the dark mode toggle without any extra code. The few colors Vikinger
 * hard-codes itself (tooltip pill, dark buttons) use a `--color-*` hook with the theme's value as
 * the fallback. Sizes use the theme's font-size formula:
 * calc((N / var(--vikinger-font-size-base)) * 1rem). Breakpoints follow the theme (1365/960/680/480).
 *
 * Sections: 1 utilities · 2 spinner/busy · 3 toasts · 4 modal (+ bottom sheet) · 5 confirm ·
 * 6 forms · 7 dropdowns · 8 activity menu · 9 comment actions · 10 profile/group actions ·
 * 11 tooltip · 12 skeletons · 13 empty states · 14 components (badge, chip, table, empty, nav
 * count, notices, avatars, X brand colour) · 15 non-Vikinger fallbacks · 16 reduced motion.
 */

:root {
	--vhl-ease-out: cubic-bezier(.22, 1, .36, 1);
	--vhl-ease-in: cubic-bezier(.4, 0, 1, 1);
	--vhl-font-12: calc((12 / var(--vikinger-font-size-base, 16)) * 1rem);
	--vhl-font-13: calc((13 / var(--vikinger-font-size-base, 16)) * 1rem);
	--vhl-font-14: calc((14 / var(--vikinger-font-size-base, 16)) * 1rem);
	--vhl-font-16: calc((16 / var(--vikinger-font-size-base, 16)) * 1rem);
	--vhl-font-18: calc((18 / var(--vikinger-font-size-base, 16)) * 1rem);
}

/* 1. Utilities ------------------------------------------------------------------------------ */

/* Our own floating layers (modal, toasts, tooltip, skeletons) never depend on the theme reset. */
.vhl-own,
.vhl-own *,
.vhl-own *::before,
.vhl-own *::after {
	box-sizing: border-box;
}

.vhl-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.vhl-hidden,
[hidden].vhl-meta,
.vhl-tip-descriptions {
	display: none !important;
}

.vhl-flex { display: flex; align-items: center; }
.vhl-flex-wrap { flex-wrap: wrap; }
.vhl-flex-between { justify-content: space-between; }
.vhl-gap-8 { gap: 8px; }
.vhl-gap-16 { gap: 16px; }
.vhl-mt-0 { margin-top: 0 !important; }
.vhl-mt-8 { margin-top: 8px !important; }
.vhl-mt-16 { margin-top: 16px !important; }
.vhl-mt-24 { margin-top: 24px !important; }
.vhl-mt-32 { margin-top: 32px !important; }
.vhl-mb-0 { margin-bottom: 0 !important; }
.vhl-mb-8 { margin-bottom: 8px !important; }
.vhl-mb-16 { margin-bottom: 16px !important; }
.vhl-mb-24 { margin-bottom: 24px !important; }
.vhl-mb-32 { margin-bottom: 32px !important; }
.vhl-text-center { text-align: center; }
.vhl-text-right { text-align: right; }
.vhl-text-muted { color: var(--color-text-alt, #8f91ac); }
.vhl-text-small { font-size: var(--vhl-font-12); }
.vhl-bold { font-weight: 700; }
.vhl-highlight { color: var(--color-primary-dark, #00c7d9); font-weight: 700; }
.vhl-paragraph {
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-14);
	font-weight: 500;
	line-height: 1.7142857143em;
}

/* Sprite fallbacks: Vikinger injects the SVG sprite; other themes get text glyphs. */
.vhl-modal-close-fallback,
.vhl-close-fallback,
.vhl-dots-fallback {
	display: none;
}

.vhl-no-vikinger .vhl-modal-close-fallback,
.vhl-no-vikinger .vhl-close-fallback,
.vhl-no-vikinger .vhl-dots-fallback {
	display: inline;
}

.vhl-no-vikinger .vhl-modal-close-icon,
.vhl-no-vikinger .vhl-toast-close-icon,
.vhl-no-vikinger .vhl-post-settings svg,
.vhl-no-vikinger .vhl-profile-more-trigger svg,
.vhl-no-vikinger .vhl-toast-icon svg,
.vhl-no-vikinger .vhl-confirm-icon svg {
	display: none;
}

/* Status badges without the sprite: a text glyph instead of an empty square. */
.vhl-no-vikinger .vhl-toast-icon::before,
.vhl-no-vikinger .vhl-confirm-icon::before {
	content: 'i';
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.vhl-no-vikinger .vhl-toast-success .vhl-toast-icon::before { content: '\2713'; }
.vhl-no-vikinger .vhl-toast-error .vhl-toast-icon::before,
.vhl-no-vikinger .vhl-toast-warning .vhl-toast-icon::before,
.vhl-no-vikinger .vhl-confirm-icon.is-danger::before { content: '!'; }
.vhl-no-vikinger .vhl-confirm-icon::before { font-size: 26px; }

/* 2. Spinner / busy -------------------------------------------------------------------------- */
.vhl-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	vertical-align: middle;
	animation: vhl-spin .7s linear infinite;
	flex-shrink: 0;
}

.vhl-spinner.is-leading {
	margin-left: 0;
	margin-right: 10px;
}

.vhl-busy {
	cursor: progress !important;
	pointer-events: none;
}

.button.vhl-busy[disabled] {
	opacity: .75;
}

/* The spinner takes the place of a leading icon while busy. */
.vhl-busy > .button-icon,
.vhl-busy > .vhl-menu-item-icon,
.vhl-busy > .vhl-group-action-icon {
	display: none !important;
}

.button.white .vhl-spinner,
.button.void .vhl-spinner {
	color: var(--color-primary, #23d2e2);
}

.simple-dropdown-link .vhl-spinner,
.meta-line-link .vhl-spinner {
	width: 12px;
	height: 12px;
	border-width: 2px;
}

.simple-dropdown-link .vhl-spinner:not(.is-leading) {
	margin-left: auto;
	padding-left: 0;
}

.simple-dropdown-link.vhl-busy,
.meta-line-link.vhl-busy {
	color: var(--color-primary-dark, #00c7d9);
}

@keyframes vhl-spin {
	to { transform: rotate(360deg); }
}

/* 3. Toasts ---------------------------------------------------------------------------------- */
.vhl-toasts {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	width: 380px;
	max-width: calc(100vw - 32px);
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 100100;
	pointer-events: none;
}

.vhl-toast {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	min-height: 64px;
	padding: 14px 12px 14px 14px;
	border-radius: 12px;
	position: relative;
	overflow: hidden;
	background-color: var(--color-box-over-box-light-background, var(--color-box-background, #fff));
	box-shadow: var(--color-overbox-big-shadow, 3px 5px 40px 0 rgba(94, 92, 154, .1)), var(--color-overbox-shadow, 3px 5px 20px 0 rgba(94, 92, 154, .12));
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
	opacity: 0;
	transform: translate3d(24px, 0, 0);
	transition: opacity .3s var(--vhl-ease-out), transform .35s var(--vhl-ease-out);
	pointer-events: auto;
}

.vhl-toast.is-visible {
	opacity: 1;
	transform: translate3d(0, 0, 0);
}

.vhl-toast.is-leaving {
	opacity: 0;
	transform: translate3d(32px, 0, 0);
	transition-duration: .22s;
	transition-timing-function: var(--vhl-ease-in);
}

.vhl-toast.is-bumped {
	animation: vhl-toast-bump .32s var(--vhl-ease-out);
}

@keyframes vhl-toast-bump {
	40% { transform: scale(1.025); }
	100% { transform: scale(1); }
}

.vhl-toast-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background-color: var(--color-primary, #23d2e2);
	box-shadow: var(--color-primary-shadow, 4px 7px 12px 0 rgba(35, 210, 226, .2));
	flex-shrink: 0;
}

.vhl-toast-error .vhl-toast-icon {
	background-color: var(--color-tertiary, #fd4350);
	box-shadow: var(--color-tertiary-shadow, 4px 7px 12px 0 rgba(253, 67, 80, .2));
}

.vhl-toast-info .vhl-toast-icon {
	background-color: var(--color-secondary, #615dfa);
	box-shadow: var(--color-secondary-shadow, 4px 7px 12px 0 rgba(97, 93, 250, .2));
}

.vhl-toast-warning .vhl-toast-icon {
	background-color: var(--color-warning, #ffb547);
	box-shadow: none;
}

.vhl-toast-icon svg {
	width: 16px;
	height: 16px;
	fill: #fff;
}

.vhl-toast-content {
	flex: 1 1 auto;
	min-width: 0;
	align-self: center;
	padding: 2px 0;
}

.vhl-toast-title {
	margin: 0 0 4px;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-14);
	font-weight: 700;
	line-height: 1.3em;
}

.vhl-toast-text {
	margin: 0;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-14);
	font-weight: 600;
	line-height: 1.4285714286em;
	overflow-wrap: anywhere;
}

.vhl-toast-title + .vhl-toast-text {
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-13);
	font-weight: 500;
}

.vhl-toast-count {
	display: inline-flex;
	align-items: center;
	height: 18px;
	margin-left: 8px;
	padding: 0 6px;
	border-radius: 200px;
	background-color: var(--color-box-highlight-background, #f7f7fb);
	color: var(--color-text-alt, #8f91ac);
	font-size: calc((11 / var(--vikinger-font-size-base, 16)) * 1rem);
	font-weight: 700;
	vertical-align: middle;
}

.vhl-toast-action {
	width: auto;
	height: 32px;
	margin: 2px 0 0;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	align-self: center;
	background-color: var(--color-box-highlight-background, #f7f7fb);
	color: var(--color-primary-dark, #00c7d9);
	font-family: inherit;
	font-size: var(--vhl-font-12);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color .2s ease-in-out, color .2s ease-in-out;
}

.vhl-toast-action:hover,
.vhl-toast-action:focus-visible {
	background-color: var(--color-primary, #23d2e2);
	color: #fff;
}

.vhl-toast-close {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 28px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--color-icon, #adafca);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	transition: color .2s ease-in-out, background-color .2s ease-in-out;
}

.vhl-toast-close svg {
	width: 10px;
	height: 10px;
	fill: currentColor;
}

.vhl-toast-close:hover,
.vhl-toast-close:focus-visible {
	background-color: var(--color-box-hover-background, #f2f2f9);
	color: var(--color-icon-highlighted, #3e3f5e);
}

.vhl-toast-progress {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background-color: var(--color-primary, #23d2e2);
	opacity: .55;
	transform-origin: left center;
	animation: vhl-toast-timer linear forwards;
	pointer-events: none;
}

.vhl-toast-error .vhl-toast-progress { background-color: var(--color-tertiary, #fd4350); }
.vhl-toast-info .vhl-toast-progress { background-color: var(--color-secondary, #615dfa); }
.vhl-toast-warning .vhl-toast-progress { background-color: var(--color-warning, #ffb547); }

.vhl-toast.is-paused .vhl-toast-progress {
	animation-play-state: paused;
}

@keyframes vhl-toast-timer {
	from { transform: scaleX(1); }
	to { transform: scaleX(0); }
}

[dir="rtl"] .vhl-toasts {
	right: auto;
	left: 24px;
}

[dir="rtl"] .vhl-toast-progress {
	transform-origin: right center;
}

@media screen and (max-width: 680px) {
	/* A bottom-sheet modal owns the bottom edge: toasts move to the top meanwhile. */
	html.vhl-modal-open .vhl-toasts {
		top: 16px;
		bottom: auto;
	}
}

@media screen and (max-width: 480px) {
	.vhl-toasts,
	[dir="rtl"] .vhl-toasts {
		right: 12px;
		left: 12px;
		bottom: 12px;
		width: auto;
		max-width: none;
	}

	.vhl-toast {
		transform: translate3d(0, 16px, 0);
	}

	.vhl-toast.is-leaving {
		transform: translate3d(0, 16px, 0);
	}
}

/* 4. Modal ----------------------------------------------------------------------------------- */
html.vhl-modal-open,
html.vhl-modal-open body {
	overflow: hidden;
}

.vhl-modal-overlay {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	width: 100%;
	height: 100%;
	padding: 80px 16px 40px;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100005;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: var(--color-overlay, rgba(21, 21, 31, .96));
	opacity: 0;
	visibility: hidden;
	transition: opacity .28s ease-out, visibility 0s linear .28s;
	-webkit-overflow-scrolling: touch;
}

/* Visible at once when opening (so focus can move in immediately), hidden after the fade. */
.vhl-modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity .28s ease-out, visibility 0s linear 0s;
}

.vhl-modal-overlay.is-closing {
	opacity: 0;
	transition: opacity .2s ease-in, visibility 0s linear .2s;
}

/* A modal opened from another modal dims less: the first overlay already covers the page. */
.vhl-modal-overlay.is-nested {
	background-color: rgba(21, 21, 31, .55);
	background-color: color-mix(in srgb, var(--color-overlay, rgba(21, 21, 31, .96)) 60%, transparent);
}

.vhl-modal {
	width: 100%;
	max-width: 584px;
	margin: auto 0;
	position: relative;
	outline: none;
	font-family: var(--vikinger-font-family-primary, inherit);
	transform: translate3d(0, 28px, 0) scale(.97);
	transition: transform .4s var(--vhl-ease-out);
}

.vhl-modal-overlay.is-open .vhl-modal {
	transform: translate3d(0, 0, 0) scale(1);
}

.vhl-modal-overlay.is-closing .vhl-modal {
	transform: translate3d(0, 16px, 0) scale(.98);
	transition-duration: .2s;
	transition-timing-function: var(--vhl-ease-in);
}

.vhl-modal-overlay.is-stacked .vhl-modal {
	transform: scale(.96);
}

.vhl-modal.is-nudging {
	animation: vhl-nudge .42s var(--vhl-ease-out);
}

@keyframes vhl-nudge {
	0%, 100% { translate: 0 0; }
	20% { translate: -8px 0; }
	40% { translate: 7px 0; }
	60% { translate: -5px 0; }
	80% { translate: 3px 0; }
}

.vhl-modal-small { max-width: 416px; }
.vhl-modal-medium { max-width: 584px; }
.vhl-modal-large { max-width: 900px; }
.vhl-modal-xlarge { max-width: 984px; }
.vhl-modal-full { max-width: 1184px; }

.vhl-modal .vhl-modal-box {
	position: relative;
	padding: 32px 28px;
	border-radius: 12px;
	background-color: var(--color-box-background, #fff);
	box-shadow: var(--color-box-shadow, 0 0 40px 0 rgba(94, 92, 154, .06));
}

.vhl-modal .vhl-modal-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding-right: 24px;
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
	font-size: var(--vhl-font-16);
	font-weight: 700;
	line-height: 1.3em;
}

.vhl-modal .vhl-modal-title-icon {
	width: 20px;
	height: 20px;
	fill: var(--color-primary, #23d2e2);
	flex-shrink: 0;
}

.vhl-modal .vhl-modal-subtitle {
	margin: 10px 0 0;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-14);
	font-weight: 500;
	line-height: 1.5em;
}

.vhl-modal .vhl-modal-title + .vhl-modal-body {
	margin-top: 28px;
}

.vhl-modal .vhl-modal-subtitle + .vhl-modal-body {
	margin-top: 24px;
}

.vhl-modal .vhl-modal-untitled > .vhl-modal-body {
	margin-top: 0;
}

.vhl-modal .vhl-modal-body {
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-14);
	line-height: 1.7142857143em;
}

.vhl-modal .vhl-modal-body p {
	line-height: 1.7142857143em;
}

.vhl-modal .vhl-modal-body > * + * {
	margin-top: 16px;
}

.vhl-modal-handle {
	display: none;
}

.vhl-modal-close {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	position: absolute;
	top: -20px;
	right: -20px;
	z-index: 2;
	background-color: var(--color-secondary-dark, #45437f);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s ease-in-out, transform .2s ease-in-out;
}

.vhl-modal-close:hover,
.vhl-modal-close:focus-visible {
	background-color: var(--color-primary, #23d2e2);
}

.vhl-modal-close:active {
	transform: scale(.94);
}

.vhl-modal-close svg {
	width: 12px;
	height: 12px;
	fill: #fff;
}

.vhl-modal-actions {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 32px;
}

.vhl-modal-actions .button {
	width: auto;
	min-width: 120px;
	padding: 0 24px;
	cursor: pointer;
}

.vhl-modal.is-busy .vhl-modal-body {
	opacity: .7;
	pointer-events: none;
}

.vhl-modal :focus-visible,
.vhl-toast :focus-visible,
.vhl-profile-actions :focus-visible,
.vhl-empty-state :focus-visible,
.vhl-menu-item:focus-visible,
.vhl-profile-menu-item:focus-visible,
.vhl-comment-action .meta-line-link:focus-visible,
.vhl-post-settings:focus-visible {
	outline: 2px solid var(--color-secondary, #615dfa);
	outline-offset: 2px;
}

.vhl-modal .form-input :focus-visible,
.vhl-modal .form-select :focus-visible {
	outline: none;
}

@media screen and (max-width: 680px) {
	.vhl-modal-overlay {
		padding: 56px 12px 24px;
	}

	.vhl-modal .vhl-modal-box {
		padding: 28px 20px;
	}

	.vhl-modal-overlay:not(.is-sheet-capable) .vhl-modal-close {
		top: -48px;
		right: 0;
	}

	.vhl-modal-actions .button {
		flex: 1 1 auto;
	}

	/* Bottom sheet ------------------------------------------------------------------------- */
	.vhl-modal-overlay.is-sheet-capable {
		align-items: flex-end;
		padding: 24px 0 0;
		overflow: hidden;
	}

	.is-sheet-capable .vhl-modal,
	.is-sheet-capable .vhl-modal-small,
	.is-sheet-capable .vhl-modal-medium,
	.is-sheet-capable .vhl-modal-large,
	.is-sheet-capable .vhl-modal-xlarge,
	.is-sheet-capable .vhl-modal-full {
		max-width: none;
		margin: 0;
		transform: translate3d(0, 100%, 0);
		transition: transform .42s var(--vhl-ease-out);
	}

	.vhl-modal-overlay.is-sheet-capable.is-open .vhl-modal {
		transform: translate3d(0, 0, 0);
	}

	.vhl-modal-overlay.is-sheet-capable.is-closing .vhl-modal {
		transform: translate3d(0, 100%, 0);
		transition-duration: .26s;
		transition-timing-function: var(--vhl-ease-in);
	}

	.vhl-modal-overlay.is-sheet-capable.is-stacked .vhl-modal {
		transform: translate3d(0, 0, 0) scale(.96);
	}

	.is-sheet-capable .vhl-modal.is-dragging {
		transition: none !important;
	}

	.is-sheet-capable .vhl-modal .vhl-modal-box {
		display: flex;
		flex-direction: column;
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
		padding: 30px 20px 20px;
		padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
		border-radius: 18px 18px 0 0;
		overflow: hidden;
	}

	.is-sheet-capable .vhl-modal .vhl-modal-title {
		flex-shrink: 0;
		padding-right: 44px;
		touch-action: none;
		user-select: none;
		-webkit-user-select: none;
	}

	.is-sheet-capable .vhl-modal .vhl-modal-subtitle {
		flex-shrink: 0;
	}

	/* The body scrolls: keep room at the top for floating labels (top: -6px) and focus rings. */
	.is-sheet-capable .vhl-modal .vhl-modal-body {
		flex: 1 1 auto;
		min-height: 0;
		margin-left: -20px;
		margin-right: -20px;
		padding: 10px 20px 4px;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}

	.is-sheet-capable .vhl-modal .vhl-modal-title + .vhl-modal-body {
		margin-top: 14px;
	}

	.is-sheet-capable .vhl-modal .vhl-modal-subtitle + .vhl-modal-body {
		margin-top: 16px;
	}

	.is-sheet-capable .vhl-modal-actions {
		flex-shrink: 0;
		flex-wrap: nowrap;
		gap: 12px;
		margin: 16px -20px 0;
		padding: 16px 20px 0;
		border-top: 1px solid var(--color-divider, #eaeaf5);
	}

	.is-sheet-capable .vhl-modal-actions .button {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 12px;
	}

	.is-sheet-capable .vhl-modal-handle {
		display: block;
		width: 96px;
		height: 26px;
		margin-left: -48px;
		position: absolute;
		top: 0;
		left: 50%;
		z-index: 3;
		cursor: grab;
		touch-action: none;
	}

	.is-sheet-capable .vhl-modal-handle::after {
		content: '';
		display: block;
		width: 40px;
		height: 4px;
		margin: 10px auto 0;
		border-radius: 200px;
		background-color: var(--color-border, #dedeea);
	}

	.is-sheet-capable .vhl-modal-close {
		width: 32px;
		height: 32px;
		top: 18px;
		right: 14px;
		border-radius: 10px;
		background-color: var(--color-box-highlight-background, #f7f7fb);
		color: var(--color-icon, #adafca);
	}

	.is-sheet-capable .vhl-modal-close svg {
		width: 10px;
		height: 10px;
		fill: var(--color-icon, #adafca);
	}

	.is-sheet-capable .vhl-modal-close:hover,
	.is-sheet-capable .vhl-modal-close:focus-visible {
		background-color: var(--color-box-hover-background, #f2f2f9);
	}

	.is-sheet-capable .vhl-modal-close:hover svg,
	.is-sheet-capable .vhl-modal-close:focus-visible svg {
		fill: var(--color-icon-highlighted, #3e3f5e);
	}
}

/* 5. Confirm (Vikinger message-box look) ----------------------------------------------------- */
.vhl-modal-confirm .vhl-modal-box {
	padding-top: 68px;
	text-align: center;
}

.vhl-modal-confirm .vhl-modal-title {
	justify-content: center;
	padding: 0;
	font-size: var(--vhl-font-18);
	text-align: center;
}

.vhl-modal-confirm .vhl-modal-title + .vhl-modal-body {
	margin-top: 16px;
}

.vhl-confirm {
	display: block;
}

.vhl-confirm-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	margin-left: -30px;
	border-radius: 12px;
	position: absolute;
	top: -16px;
	left: 50%;
	background-color: var(--color-secondary, #615dfa);
	box-shadow: var(--color-secondary-shadow, 4px 7px 12px 0 rgba(97, 93, 250, .2));
}

.vhl-confirm-icon.is-primary {
	background-color: var(--color-primary, #23d2e2);
	box-shadow: var(--color-primary-shadow, 4px 7px 12px 0 rgba(35, 210, 226, .2));
}

.vhl-confirm-icon.is-danger,
.vhl-confirm-icon.is-tertiary {
	background-color: var(--color-tertiary, #fd4350);
	box-shadow: var(--color-tertiary-shadow, 4px 7px 12px 0 rgba(253, 67, 80, .2));
}

.vhl-confirm-icon svg {
	width: 22px;
	height: 22px;
	fill: #fff;
}

.vhl-confirm-body > * + * {
	margin-top: 10px;
}

.vhl-confirm-text {
	max-width: 340px;
	margin: 0 auto;
	padding: 0;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-14);
	font-weight: 500;
	line-height: 1.5714285714em;
	overflow-wrap: anywhere;
}

.vhl-modal .vhl-modal-body .vhl-confirm-text {
	line-height: 1.5714285714em;
}

.vhl-confirm-details {
	max-width: 340px;
	margin-left: auto;
	margin-right: auto;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-13);
	font-weight: 500;
	line-height: 1.5em;
}

.vhl-confirm .vhl-confirm-type {
	margin-top: 28px;
	text-align: left;
}

.vhl-modal-confirm .vhl-modal-actions {
	justify-content: center;
	flex-wrap: nowrap;
	margin-top: 36px;
}

.vhl-modal-confirm .vhl-modal-actions .button {
	flex: 1 1 0;
	min-width: 0;
	max-width: 180px;
	padding: 0 16px;
}

@media screen and (max-width: 680px) {
	.is-sheet-capable .vhl-modal-confirm .vhl-modal-box {
		padding-top: 30px;
	}

	.is-sheet-capable .vhl-confirm-icon {
		margin: 6px auto 20px;
		position: static;
		flex-shrink: 0;
	}

	.is-sheet-capable .vhl-modal-confirm .vhl-modal-title {
		padding: 0 36px;
	}

	.is-sheet-capable .vhl-modal-confirm .vhl-modal-title + .vhl-modal-body {
		margin-top: 12px;
	}

	.is-sheet-capable .vhl-modal-confirm .vhl-modal-actions {
		margin-top: 24px;
	}

	.is-sheet-capable .vhl-modal-confirm .vhl-modal-actions .button {
		max-width: none;
	}
}

/* 6. Forms (inside modals) ------------------------------------------------------------------- */
.vhl-form .vhl-form-description {
	margin: 0 0 24px;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-14);
	font-weight: 500;
	line-height: 1.7142857143em;
}

.vhl-form .vhl-form-row ~ .vhl-form-row {
	margin-top: 28px;
}

.vhl-form .vhl-form-hidden {
	display: none;
}

.vhl-form .vhl-form-error {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
	padding: 12px 16px;
	border-radius: 12px;
	background-color: var(--color-notice-overlay-background-tertiary, rgba(253, 67, 80, .14));
	color: var(--color-tertiary, #fd4350);
	font-size: var(--vhl-font-14);
	font-weight: 600;
	line-height: 1.5em;
	animation: vhl-fade-in .25s ease-out;
}

.vhl-form .vhl-form-error[hidden] {
	display: none;
}

.vhl-form .vhl-field-footer {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.vhl-form .vhl-field-messages {
	flex: 1 1 auto;
	min-width: 0;
}

.vhl-form .vhl-field-help {
	margin: 8px 0 0;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-12);
	font-weight: 500;
	line-height: 1.5em;
}

.vhl-form .vhl-field-error {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 8px 0 0;
	color: var(--color-tertiary, #fd4350);
	font-size: var(--vhl-font-12);
	font-weight: 700;
	line-height: 1.5em;
	animation: vhl-fade-in .2s ease-out;
}

.vhl-form .vhl-field-error::before {
	content: '!';
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 14px;
	height: 14px;
	margin-top: 2px;
	border-radius: 50%;
	background-color: var(--color-tertiary, #fd4350);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	flex-shrink: 0;
}

.vhl-form .vhl-field-error[hidden] {
	display: none;
}

@keyframes vhl-fade-in {
	from { opacity: 0; transform: translate3d(0, -4px, 0); }
	to { opacity: 1; transform: none; }
}

.vhl-form .vhl-has-error .form-select select,
.vhl-form .vhl-has-error .checkbox-box {
	border-color: var(--color-tertiary, #fd4350);
}

.vhl-form .vhl-has-error .form-input input,
.vhl-form .vhl-has-error .form-input textarea {
	border-color: var(--color-tertiary, #fd4350);
}

.vhl-form .vhl-field-label .label-required {
	color: var(--color-secondary, #615dfa);
	font-weight: 700;
}

.vhl-form .form-input textarea {
	resize: vertical;
	line-height: 1.5em;
	padding-top: 16px;
	word-break: normal;
	overflow-wrap: anywhere;
}

.vhl-form .form-input input[readonly],
.vhl-form .form-input textarea[readonly] {
	cursor: default;
}

/* Vikinger styles text/email/number/… inputs but not url and date: match them. */
.vhl-form .form-input input[type="url"],
.vhl-form .form-input input[type="date"] {
	width: 100%;
	height: 54px;
	padding: 0 18px;
	border: 1px solid var(--color-border, #dedeea);
	border-radius: 12px;
	background-color: var(--color-box-background, #fff);
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
	font-size: var(--vhl-font-16);
	font-weight: 700;
	transition: border-color .2s ease-in-out;
}

.vhl-form .form-input.small input[type="url"],
.vhl-form .form-input.small input[type="date"] {
	height: 48px;
	font-size: var(--vhl-font-14);
}

.vhl-form .form-input input[type="url"]:focus,
.vhl-form .form-input input[type="date"]:focus {
	border-color: var(--color-secondary, #615dfa);
}

.vhl-form .form-input input[type="url"]::placeholder {
	color: var(--color-text-alt-2, #adafca);
	font-size: var(--vhl-font-14);
	font-weight: 500;
}

.vhl-form .form-input input[type="date"]::-webkit-calendar-picker-indicator {
	opacity: .6;
	cursor: pointer;
}

/* Native widgets (date picker, scrollbars) follow dark presets (class set by VALHFOVI.detectTheme()). */
html.vhl-theme-dark .vhl-modal,
html.vhl-theme-dark .vhl-form input[type="date"] {
	color-scheme: dark;
}

.vhl-form .vhl-field-label {
	margin: 0 0 16px;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-14);
	font-weight: 700;
	line-height: 1.2em;
}

.vhl-form .vhl-choices .vhl-choice + .vhl-choice {
	margin-top: 14px;
}

.vhl-form .vhl-choices.is-inline .vhl-choice-list {
	display: flex;
	flex-wrap: wrap;
	gap: 14px 28px;
}

.vhl-form .vhl-choices.is-inline .vhl-choice + .vhl-choice {
	margin-top: 0;
}

.vhl-form .vhl-choice-help {
	margin: 4px 0 0 34px;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-12);
	font-weight: 500;
	line-height: 1.5em;
}

/* Keep the theme's CSS-only checkboxes keyboard accessible inside our forms. */
.vhl-form .checkbox-wrap.vhl-choice {
	min-height: 22px;
}

.vhl-form .checkbox-wrap.vhl-choice input[type="checkbox"],
.vhl-form .checkbox-wrap.vhl-choice input[type="radio"] {
	display: block;
	width: 22px;
	height: 22px;
	margin: 0;
	position: absolute;
	top: 0;
	left: 0;
	z-index: 1;
	opacity: 0;
	cursor: pointer;
}

.vhl-form .checkbox-wrap.vhl-choice input:focus-visible + .checkbox-box {
	outline: 2px solid var(--color-secondary, #615dfa);
	outline-offset: 2px;
}

.vhl-form .checkbox-wrap.vhl-choice input:disabled + .checkbox-box,
.vhl-form .checkbox-wrap.vhl-choice input:disabled ~ label {
	opacity: .5;
	cursor: not-allowed;
}

.vhl-form .checkbox-wrap.vhl-choice label {
	display: inline-block;
	line-height: 22px;
}

.vhl-form .checkbox-wrap.vhl-choice:hover input:not(:checked):not(:disabled) + .checkbox-box {
	border-color: var(--color-secondary, #615dfa);
}

.vhl-form .vhl-form-html {
	font-size: var(--vhl-font-14);
	line-height: 1.7142857143em;
}

/* Two `half` fields share a row (stacks ≤960px like the theme's .form-row.split). */
.vhl-form .form-row.split .form-item > * {
	margin-bottom: 0;
}

/* Character counter (VALHFOVI.form textareas with maxlength, VALHFOVI.charCounter()). */
.vhl-char-counter {
	margin: 8px 0 0 auto;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-12);
	font-weight: 600;
	line-height: 1.5em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	transition: color .2s ease-in-out;
}

.vhl-char-counter.is-near {
	color: var(--color-text, #3e3f5e);
}

.vhl-char-counter.is-full {
	color: var(--color-tertiary, #fd4350);
	font-weight: 700;
}

.vhl-char-counter-row {
	display: flex;
	justify-content: flex-end;
}

/* Submitting: fields stay visible but locked; the submit button shows the spinner. */
.vhl-form.is-submitting .vhl-form-item {
	opacity: .65;
	transition: opacity .2s ease-in-out;
	cursor: progress;
}

/* 7. Dropdowns ------------------------------------------------------------------------------- */
.vhl-dropdown-wrap {
	position: relative;
}

.vhl-dd,
.vhl-dropdown {
	position: absolute;
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transform: translate(0, -20px);
	transition: transform .3s ease-in-out, opacity .3s ease-in-out, visibility .3s ease-in-out;
}

.vhl-dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translate(0, 0);
}

.vhl-dropdown.simple-dropdown {
	min-width: 140px;
	width: max-content;
	max-width: 240px;
}

/* 8. Activity settings menu (and the profile "more" menu) ------------------------------------ */
.vhl-fallback-settings .post-settings-wrap {
	position: relative;
}

.vhl-post-settings {
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	color: var(--color-icon, #adafca);
	font-size: 20px;
	line-height: 1;
	letter-spacing: -2px;
}

.vhl-post-settings .post-settings-icon {
	fill: var(--color-icon, #adafca);
}

.vhl-post-settings:hover .post-settings-icon,
.vhl-post-settings.active .post-settings-icon {
	fill: var(--color-icon-highlighted, #3e3f5e);
}

/* The theme's dropdown is only 140px wide: long (translated) labels wrap instead of being cut. */
.simple-dropdown .vhl-menu-item,
.simple-dropdown .vhl-profile-menu-item {
	justify-content: flex-start;
	gap: 10px;
	white-space: normal;
}

.simple-dropdown .vhl-menu-label {
	min-width: 0;
	line-height: 1.35em;
	overflow-wrap: anywhere;
}

.simple-dropdown .vhl-menu-item-icon {
	width: 12px;
	height: 12px;
	fill: var(--color-icon, #adafca);
	flex-shrink: 0;
	transition: fill .2s ease-in-out;
}

.simple-dropdown .simple-dropdown-link:hover .vhl-menu-item-icon,
.simple-dropdown .simple-dropdown-link:focus-visible .vhl-menu-item-icon {
	fill: var(--color-primary-dark, #00c7d9);
}

.simple-dropdown .simple-dropdown-link.is-danger {
	color: var(--color-tertiary, #fd4350);
}

.simple-dropdown .simple-dropdown-link.is-danger .vhl-menu-item-icon,
.simple-dropdown .simple-dropdown-link.is-danger:hover .vhl-menu-item-icon {
	fill: var(--color-tertiary, #fd4350);
}

.simple-dropdown .simple-dropdown-link.is-danger:hover {
	color: var(--color-tertiary-hover, #dd343f);
}

.simple-dropdown .simple-dropdown-link.has-divider {
	margin-top: 6px;
	padding-top: 14px;
	border-top: 1px solid var(--color-divider, #eaeaf5);
}

/* Nothing to separate from when ours is the first entry (fallback menu). */
.simple-dropdown .simple-dropdown-link.has-divider:first-child {
	margin-top: 0;
	padding-top: 8px;
	border-top: 0;
}

.simple-dropdown .simple-dropdown-link[aria-disabled="true"]:not(.vhl-busy) {
	opacity: .45;
	cursor: not-allowed;
}

.simple-dropdown .simple-dropdown-link[aria-disabled="true"]:not(.vhl-busy):hover {
	padding-left: 16px;
	color: var(--color-text, #3e3f5e);
}

/* 9. Comment actions ------------------------------------------------------------------------- */
.vhl-comment-action .meta-line-link {
	display: inline-flex;
	align-items: center;
	margin: 0;
	white-space: nowrap;
}

.vhl-comment-action.is-danger .meta-line-link:hover,
.vhl-comment-action.is-danger .meta-line-link:focus-visible {
	color: var(--color-tertiary, #fd4350);
}

.vhl-comment-action .meta-line-link.vhl-busy .vhl-spinner {
	margin-left: 6px;
}

/* 10. Profile header actions ----------------------------------------------------------------- */
.vhl-profile-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: nowrap;
	white-space: nowrap;
}

.vhl-profile-actions.is-empty {
	display: none !important;
}

.profile-header .profile-header-info .vhl-profile-actions {
	position: absolute;
	top: -40px;
	right: 32px;
	z-index: 3;
}

.profile-header .profile-header-info .vhl-profile-actions.is-left {
	right: auto !important;
	left: 32px;
}

/* Same footprint as the theme's own header buttons (.profile-header-info-action: 180px). */
.vhl-profile-actions .button {
	width: auto;
	min-width: 180px;
	padding: 0 24px;
	cursor: pointer;
	animation: vhl-fade-in .25s ease-out;
}

.vhl-profile-actions .button .button-icon {
	width: 16px;
	height: 16px;
	margin-right: 10px;
	fill: currentColor;
	flex-shrink: 0;
}

.vhl-profile-actions .button.white .button-icon,
.vhl-profile-actions .vhl-profile-more-trigger .button-icon {
	fill: var(--color-icon, #adafca);
}

/* Outlined buttons sit on the cover image on desktop: give them a solid surface. */
.profile-header .vhl-profile-actions .button.white {
	background-color: var(--color-box-background, #fff);
	box-shadow: var(--color-box-shadow, 0 0 40px 0 rgba(94, 92, 154, .06));
	color: var(--color-text, #3e3f5e);
}

.profile-header .vhl-profile-actions .button.white:hover,
.profile-header .vhl-profile-actions .button.white.active {
	border-color: var(--color-secondary, #615dfa);
	background-color: var(--color-secondary, #615dfa);
	color: #fff;
}

.profile-header .vhl-profile-actions .button.white:hover .button-icon,
.profile-header .vhl-profile-actions .button.white.active .button-icon {
	fill: #fff;
}

.vhl-profile-actions .vhl-profile-more {
	position: relative;
}

.vhl-profile-actions .vhl-profile-more-trigger {
	width: 48px;
	min-width: 48px;
	padding: 0;
	font-size: 20px;
	letter-spacing: -2px;
}

.vhl-profile-actions .vhl-profile-more-trigger .button-icon {
	width: 22px;
	height: 6px;
	margin: 0;
}

.vhl-profile-actions .vhl-profile-more-trigger.active .button-icon,
.vhl-profile-actions .vhl-profile-more-trigger:hover .button-icon {
	fill: var(--color-icon-highlighted, #3e3f5e);
}

.vhl-profile-actions .vhl-profile-more-dropdown {
	min-width: 180px;
	white-space: normal;
}

.vhl-profile-actions .vhl-profile-menu-item[aria-disabled="true"] {
	opacity: .5;
	cursor: not-allowed;
}

@media screen and (max-width: 1365px) {
	.profile-header .profile-header-info .vhl-profile-actions,
	.profile-header .profile-header-info .vhl-profile-actions.is-left {
		justify-content: center;
		flex-wrap: wrap;
		margin-top: 16px;
		padding: 0 16px 32px;
		position: static;
		white-space: normal;
	}
}

@media screen and (max-width: 480px) {
	.vhl-profile-actions .button {
		min-width: 0;
		padding: 0 20px;
	}

	/* One row on phones: the buttons share the width, the "more" button keeps its size. */
	.profile-header .profile-header-info .vhl-profile-actions,
	.profile-header .profile-header-info .vhl-profile-actions.is-left {
		flex-wrap: nowrap;
		gap: 10px;
		padding-left: 12px;
		padding-right: 12px;
	}

	.profile-header .profile-header-info .vhl-profile-actions > .button {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 10px;
	}

	.profile-header .profile-header-info .vhl-profile-actions > .button .button-icon {
		margin-right: 8px;
	}

	.vhl-profile-actions .vhl-profile-action-label {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.vhl-profile-actions .vhl-profile-more {
		flex-shrink: 0;
	}
}

@media screen and (max-width: 400px) {
	/* Very narrow phones: the label matters more than the icon. */
	.profile-header .profile-header-info .vhl-profile-actions > .button.has-icon .button-icon {
		display: none;
	}
}

/* Group header actions (VALHFOVI.addGroupAction): pills on the top-left corner of the group cover. */
.profile-header.v2 {
	position: relative;
}

.vhl-group-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 5;
	max-width: calc(100% - 32px);
}

.vhl-group-actions.is-empty {
	display: none !important;
}

.vhl-group-action {
	display: inline-flex;
	align-items: center;
	width: auto;
	height: 32px;
	padding: 0 14px;
	border: none;
	border-radius: 200px;
	background-color: var(--color-box-background, #fff);
	box-shadow: var(--color-overbox-shadow, 0 0 20px rgba(0, 0, 0, .12));
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
	font-size: var(--vhl-font-12);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: color .2s ease-in-out, background-color .2s ease-in-out, transform .2s ease-in-out;
}

.vhl-group-action:active:not(:disabled) {
	transform: scale(.97);
}

.vhl-group-action.is-primary {
	background-color: var(--color-primary, #23d2e2);
	color: #fff;
}

.vhl-group-action.is-tertiary {
	color: var(--color-tertiary, #fd4350);
}

.vhl-group-action.is-void {
	background-color: rgba(0, 0, 0, .35);
	box-shadow: none;
	color: #fff;
}

.vhl-group-action:hover:not(:disabled),
.vhl-group-action:focus-visible {
	background-color: var(--color-secondary, #615dfa);
	color: #fff;
}

.vhl-group-action.is-tertiary:hover:not(:disabled),
.vhl-group-action.is-tertiary:focus-visible {
	background-color: var(--color-tertiary, #fd4350);
}

.vhl-group-action:focus-visible {
	outline: 2px solid var(--color-secondary, #615dfa);
	outline-offset: 2px;
}

.vhl-group-action:disabled:not(.vhl-busy) {
	opacity: .6;
	cursor: not-allowed;
}

.vhl-group-action .vhl-group-action-icon {
	width: 14px;
	height: 14px;
	margin-right: 6px;
	fill: currentColor;
	flex-shrink: 0;
}

.vhl-group-action .vhl-spinner {
	width: 12px;
	height: 12px;
}

.vhl-group-action .vhl-spinner.is-leading {
	margin-right: 6px;
}

@media screen and (max-width: 680px) {
	.vhl-group-actions {
		top: 10px;
		left: 10px;
	}

	.vhl-group-action .vhl-group-action-icon + .vhl-group-action-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.vhl-group-action .vhl-group-action-icon,
	.vhl-group-action .vhl-spinner.is-leading {
		margin-right: 0;
	}
}

/* 11. Tooltip (VALHFOVI.tooltip fallback, same pill as the theme's .xm-tooltip-text) -------------- */
.vhl-tip {
	max-width: 280px;
	max-width: min(280px, calc(100vw - 16px));
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100200;
	opacity: 0;
	visibility: hidden;
	transform: translate3d(0, 6px, 0);
	transition: opacity .2s ease-in-out, transform .2s ease-in-out, visibility .2s ease-in-out;
	pointer-events: none;
}

.vhl-tip[data-side="bottom"] {
	transform: translate3d(0, -6px, 0);
}

.vhl-tip.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translate3d(0, 0, 0);
}

.vhl-tip-text {
	margin: 0;
	padding: 0 12px;
	border-radius: 12px;
	background-color: var(--color-tooltip-background, #3e3f5e);
	color: var(--color-tooltip-text, #fff);
	font-family: var(--vikinger-font-family-primary, inherit);
	font-size: var(--vhl-font-12);
	font-weight: 700;
	line-height: 24px;
	text-align: center;
	overflow-wrap: anywhere;
}

/* 12. Loading skeletons (VALHFOVI.skeleton) ------------------------------------------------------- */
.vhl-skeleton {
	display: grid;
	gap: 22px;
}

.vhl-skeleton + * {
	margin-top: 0;
}

.vhl-skeleton-row {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.vhl-skeleton-lines {
	display: grid;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;
}

.vhl-skeleton-line,
.vhl-skeleton-avatar,
.vhl-skeleton-cover {
	display: block;
	background-color: var(--color-divider, #eaeaf5);
	background-image: linear-gradient(90deg, transparent 0%, var(--color-box-highlight-background, #f7f7fb) 50%, transparent 100%);
	background-repeat: no-repeat;
	background-size: 60% 100%;
	background-position: -150% 0;
	animation: vhl-shimmer 1.5s ease-in-out infinite;
}

.vhl-skeleton-line {
	max-width: 100%;
	height: 10px;
	border-radius: 200px;
}

.vhl-skeleton-line.is-strong {
	height: 12px;
}

.vhl-skeleton-line.is-centered {
	margin-left: auto;
	margin-right: auto;
}

.vhl-skeleton-avatar {
	width: 40px;
	height: 44px;
	flex-shrink: 0;
}

.vhl-skeleton-avatar.is-hexagon {
	clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.vhl-skeleton-avatar.is-circle {
	height: 40px;
	border-radius: 50%;
}

.vhl-skeleton-avatar.is-square {
	height: 40px;
	border-radius: 10px;
}

.vhl-skeleton-lines .vhl-skeleton-line:nth-child(2) {
	animation-delay: .1s;
}

.vhl-skeleton-cards {
	grid-template-columns: repeat(auto-fill, minmax(184px, 1fr));
	gap: 16px;
}

.vhl-skeleton-card {
	border-radius: 12px;
	overflow: hidden;
	background-color: var(--color-box-background, #fff);
	box-shadow: var(--color-box-shadow, 0 0 40px 0 rgba(94, 92, 154, .06));
}

.vhl-skeleton-cover {
	height: 70px;
	border-radius: 0;
}

.vhl-skeleton-card-info {
	display: grid;
	justify-items: center;
	gap: 10px;
	padding: 0 20px 24px;
}

.vhl-skeleton-card-info .vhl-skeleton-avatar {
	margin-top: -22px;
	margin-bottom: 6px;
	outline: 4px solid var(--color-box-background, #fff);
}

.vhl-skeleton-card-info .vhl-skeleton-line {
	width: 100%;
}

.vhl-skeleton-table {
	gap: 0;
}

.vhl-skeleton-table .vhl-skeleton-row {
	display: grid;
	gap: 16px;
	padding: 16px 0;
	border-top: 1px solid var(--color-divider, #eaeaf5);
}

.vhl-skeleton-table .vhl-skeleton-row:first-of-type {
	border-top: 0;
}

.vhl-skeleton-text {
	gap: 12px;
}

@keyframes vhl-shimmer {
	0% { background-position: -150% 0; }
	100% { background-position: 250% 0; }
}

/* 13. Empty states (VALHFOVI.empty) --------------------------------------------------------------- */
.vhl-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 40px 24px;
	text-align: center;
	animation: vhl-fade-in .3s ease-out;
}

.vhl-empty-state-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background-color: var(--color-box-highlight-background, #f7f7fb);
}

.vhl-empty-state-icon svg {
	width: 40px;
	height: 36px;
	fill: var(--color-icon, #adafca);
	opacity: .8;
}

.vhl-empty-state-title {
	margin: 20px 0 0;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-16);
	font-weight: 700;
	line-height: 1.3em;
}

.vhl-empty-state-text {
	max-width: 380px;
	margin: 10px 0 0;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-14);
	font-weight: 500;
	line-height: 1.7142857143em;
}

.vhl-empty-state-text a {
	color: var(--color-primary-dark, #00c7d9);
	font-weight: 600;
}

.vhl-empty-state .vhl-empty-state-action {
	width: auto;
	margin-top: 24px;
}

.vhl-empty.vhl-empty-large {
	margin-top: 60px;
	padding-bottom: 60px;
}

.widget-box .vhl-empty.vhl-empty-large {
	margin-top: 24px;
}

/* 14. Components ----------------------------------------------------------------------------- */
.vhl-badge {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	height: 20px;
	padding: 0 8px;
	border-radius: 200px;
	background-color: var(--color-primary, #23d2e2);
	color: #fff;
	font-size: calc((11 / var(--vikinger-font-size-base, 16)) * 1rem);
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}

.vhl-badge.vhl-badge-secondary { background-color: var(--color-secondary, #615dfa); }
.vhl-badge.vhl-badge-tertiary { background-color: var(--color-tertiary, #fd4350); }
.vhl-badge.vhl-badge-muted {
	background-color: var(--color-box-highlight-background, #f7f7fb);
	color: var(--color-text-alt, #8f91ac);
}

.vhl-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 12px;
	border: 1px solid var(--color-border, #dedeea);
	border-radius: 200px;
	background-color: var(--color-box-background, #fff);
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-12);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.vhl-chip.is-active,
.vhl-chip.vhl-chip-primary {
	border-color: var(--color-primary, #23d2e2);
	background-color: var(--color-primary, #23d2e2);
	color: #fff;
}

.vhl-chip.vhl-chip-secondary {
	border-color: var(--color-secondary, #615dfa);
	background-color: var(--color-secondary, #615dfa);
	color: #fff;
}

.vhl-chip.vhl-chip-tertiary {
	border-color: var(--color-tertiary, #fd4350);
	background-color: var(--color-tertiary, #fd4350);
	color: #fff;
}

.vhl-chip svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.vhl-chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.vhl-table-wrap {
	padding: 18px 28px 0;
	border-radius: 12px;
	background-color: var(--color-box-background, #fff);
	box-shadow: var(--color-box-shadow, 0 0 40px 0 rgba(94, 92, 154, .06));
	overflow-x: auto;
}

.widget-box .vhl-table-wrap {
	padding: 0;
	box-shadow: none;
	background: transparent;
}

.vhl-table {
	width: 100%;
	border-collapse: collapse;
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
}

.vhl-table th {
	padding: 12px 16px 12px 0;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-12);
	font-weight: 700;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
}

.vhl-table td {
	padding: 12px 16px 12px 0;
	border-top: 1px solid var(--color-divider, #eaeaf5);
	font-size: var(--vhl-font-14);
	font-weight: 700;
	line-height: 1.4285714286em;
	vertical-align: middle;
}

.vhl-table th:last-child,
.vhl-table td:last-child {
	padding-right: 0;
}

.vhl-table td a {
	color: var(--color-primary, #23d2e2);
}

.vhl-table td.vhl-num,
.vhl-table th.vhl-num {
	text-align: right;
}

.vhl-table tr.is-highlighted td {
	background-color: var(--color-box-highlight-background, #f7f7fb);
}

.vhl-empty {
	padding: 48px 28px;
	text-align: center;
}

.vhl-nav-count {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-width: 18px;
	height: 18px;
	margin-left: 4px;
	padding: 0 6px;
	border-radius: 200px;
	background-color: var(--color-primary, #23d2e2);
	color: #fff;
	font-size: calc((10 / var(--vikinger-font-size-base, 16)) * 1rem);
	font-weight: 700;
	line-height: 1;
	vertical-align: middle;
}

.vhl-private-notice .vhl-private-notice-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24px 0;
	text-align: center;
}

.vhl-private-notice-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: var(--color-box-highlight-background, #f7f7fb);
}

.vhl-private-notice-icon svg {
	width: 24px;
	height: 24px;
	fill: var(--color-icon, #adafca);
}

.vhl-private-notice-title {
	margin: 20px 0 0;
	color: var(--color-text, #3e3f5e);
	font-size: var(--vhl-font-18);
	font-weight: 700;
}

.vhl-private-notice-text {
	max-width: 420px;
	margin: 12px 0 0;
	color: var(--color-text-alt, #8f91ac);
	font-size: var(--vhl-font-14);
	font-weight: 500;
	line-height: 1.7142857143em;
}

.vhl-avatar {
	display: inline-flex;
	flex-shrink: 0;
}

.vhl-avatar .vhl-avatar-img {
	display: block;
	border-radius: 50%;
	object-fit: cover;
}

.vhl-hub-content .vhl-hub-page > .widget-box + .widget-box {
	margin-top: 0;
}

/*
 * X (formerly Twitter). Vikinger 2.x already draws the X logo but still paints it Twitter's old light
 * blue (#1abcff). Use X's black wherever the theme colours it: the social link tiles (profile and group
 * headers, footer, share dialog), the white "void" tiles, footer icon hovers and Twitter buttons.
 * `--vhl-x-color` changes it site-wide.
 */
.social-link.twitter,
.button.twitter {
	background-color: var(--vhl-x-color, #000);
}

.button.twitter {
	box-shadow: 3px 5px 10px 0 rgba(0, 0, 0, .2);
}

.button.twitter:hover {
	background-color: var(--vhl-x-color, #000);
	opacity: .86;
}

.social-link.void.twitter .icon-twitter,
.social-item.twitter:hover .social-item-icon {
	fill: var(--vhl-x-color, #000);
}

/* Dark presets: a faint edge keeps the black tile apart from the dark box, and bare icons turn white. */
html.vhl-theme-dark .social-link.twitter:not(.void),
html.vhl-theme-dark .button.twitter {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

html.vhl-theme-dark .social-item.twitter:hover .social-item-icon {
	fill: #fff;
}

/* 15. Fallbacks for non-Vikinger themes ---------------------------------------------------- */
.vhl-no-vikinger .vhl-modal .button,
.vhl-no-vikinger .vhl-profile-actions .button,
.vhl-no-vikinger .vhl-empty-state .button {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	height: 44px;
	border: 1px solid transparent;
	border-radius: 10px;
	background-color: #3e3f5e;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.vhl-no-vikinger .vhl-modal .button[disabled] {
	opacity: .4;
	cursor: not-allowed;
}

.vhl-no-vikinger .vhl-modal .button.primary,
.vhl-no-vikinger .vhl-profile-actions .button.primary,
.vhl-no-vikinger .vhl-empty-state .button.primary { background-color: #23d2e2; }
.vhl-no-vikinger .vhl-modal .button.secondary,
.vhl-no-vikinger .vhl-profile-actions .button.secondary,
.vhl-no-vikinger .vhl-empty-state .button.secondary { background-color: #615dfa; }
.vhl-no-vikinger .vhl-modal .button.tertiary,
.vhl-no-vikinger .vhl-profile-actions .button.tertiary,
.vhl-no-vikinger .vhl-empty-state .button.tertiary { background-color: #fd4350; }

.vhl-no-vikinger .vhl-modal .button.white,
.vhl-no-vikinger .vhl-profile-actions .button.white {
	border-color: #dedeea;
	background-color: #fff;
	color: #3e3f5e;
}

.vhl-no-vikinger .vhl-form input[type="text"],
.vhl-no-vikinger .vhl-form input[type="number"],
.vhl-no-vikinger .vhl-form input[type="email"],
.vhl-no-vikinger .vhl-form input[type="url"],
.vhl-no-vikinger .vhl-form input[type="password"],
.vhl-no-vikinger .vhl-form input[type="tel"],
.vhl-no-vikinger .vhl-form input[type="date"],
.vhl-no-vikinger .vhl-form textarea,
.vhl-no-vikinger .vhl-form select,
.vhl-no-vikinger .vhl-confirm input[type="text"] {
	width: 100%;
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid #dedeea;
	border-radius: 10px;
	background-color: #fff;
	color: #3e3f5e;
	font-size: 14px;
}

.vhl-no-vikinger .vhl-form .form-input,
.vhl-no-vikinger .vhl-form .form-select,
.vhl-no-vikinger .vhl-confirm .form-input {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vhl-no-vikinger .vhl-form .form-input label,
.vhl-no-vikinger .vhl-form .form-select label,
.vhl-no-vikinger .vhl-confirm .form-input label {
	position: static;
	font-size: 13px;
	font-weight: 700;
}

.vhl-no-vikinger .vhl-form .form-select-icon {
	display: none;
}

.vhl-no-vikinger .vhl-form .form-row.split {
	display: flex;
	gap: 16px;
}

.vhl-no-vikinger .vhl-form .form-row.split .form-item {
	flex: 1 1 0;
	min-width: 0;
}

.vhl-no-vikinger .vhl-form .checkbox-wrap {
	position: relative;
}

.vhl-no-vikinger .vhl-form .checkbox-wrap label {
	padding-left: 32px;
}

.vhl-no-vikinger .vhl-form .checkbox-box {
	width: 20px;
	height: 20px;
	border: 1px solid #dedeea;
	border-radius: 6px;
	position: absolute;
	top: 0;
	left: 0;
	pointer-events: none;
}

.vhl-no-vikinger .vhl-form .checkbox-box.round { border-radius: 50%; }

.vhl-no-vikinger .vhl-form .checkbox-box svg {
	display: none;
}

.vhl-no-vikinger .vhl-form input:checked + .checkbox-box {
	border: 6px solid #615dfa;
}

.vhl-no-vikinger .simple-dropdown.vhl-dropdown {
	padding: 10px 0;
	border-radius: 12px;
	background-color: #fff;
	box-shadow: 0 0 40px 0 rgba(94, 92, 154, .12);
}

.vhl-no-vikinger .simple-dropdown.vhl-dropdown .simple-dropdown-link {
	display: flex;
	align-items: center;
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.vhl-no-vikinger .vhl-profile-actions {
	margin: 16px 0;
}

.vhl-no-vikinger .vhl-empty-state-icon svg {
	display: none;
}

.vhl-no-vikinger .vhl-alert {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 10px;
	background-color: rgba(97, 93, 250, .1);
	color: #3e3f5e;
}

.vhl-no-vikinger .vhl-alert.vhl-alert-success { background-color: rgba(35, 210, 226, .14); }
.vhl-no-vikinger .vhl-alert.vhl-alert-error { background-color: rgba(253, 67, 80, .12); }
.vhl-no-vikinger .vhl-alert.vhl-alert-warning { background-color: rgba(255, 181, 71, .16); }
.vhl-no-vikinger .vhl-alert .alert-line-icon-wrap { display: none; }
.vhl-no-vikinger .vhl-alert .alert-line-text { margin: 0; }

.vhl-no-vikinger .vhl-widget-box,
.vhl-no-vikinger .vhl-private-notice {
	padding: 28px 24px;
	border-radius: 12px;
	background-color: #fff;
	box-shadow: 0 0 40px 0 rgba(94, 92, 154, .06);
}

.vhl-no-vikinger .vhl-widget-box + .vhl-widget-box {
	margin-top: 16px;
}

.vhl-no-vikinger .vhl-widget-box .widget-box-title {
	margin: 0 0 20px;
	font-size: 16px;
	font-weight: 700;
}

.vhl-no-vikinger .vhl-user-status {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	column-gap: 12px;
	align-items: center;
}

.vhl-no-vikinger .vhl-user-status .user-status-avatar {
	grid-row: 1 / span 2;
}

.vhl-no-vikinger .vhl-user-status .user-status-title,
.vhl-no-vikinger .vhl-user-status .user-status-text {
	margin: 0;
}

/* 16. Reduced motion ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.vhl-modal-overlay,
	.vhl-modal-overlay.is-closing,
	.vhl-toast,
	.vhl-toast.is-leaving,
	.vhl-tip,
	.vhl-dropdown {
		transition-duration: .01ms !important;
	}

	.vhl-modal,
	.vhl-modal-overlay.is-open .vhl-modal,
	.vhl-modal-overlay.is-closing .vhl-modal,
	.vhl-modal-overlay.is-stacked .vhl-modal,
	.is-sheet-capable .vhl-modal,
	.vhl-modal-overlay.is-sheet-capable.is-open .vhl-modal,
	.vhl-modal-overlay.is-sheet-capable.is-closing .vhl-modal,
	.vhl-modal-overlay.is-sheet-capable.is-stacked .vhl-modal,
	.vhl-toast,
	.vhl-toast.is-visible,
	.vhl-toast.is-leaving,
	.vhl-tip,
	.vhl-tip[data-side="bottom"] {
		transform: none !important;
		transition-property: opacity !important;
	}

	.vhl-modal.is-nudging,
	.vhl-toast.is-bumped,
	.vhl-form .vhl-form-error,
	.vhl-form .vhl-field-error,
	.vhl-empty-state,
	.vhl-profile-actions .button {
		animation: none !important;
	}

	.vhl-skeleton-line,
	.vhl-skeleton-avatar,
	.vhl-skeleton-cover {
		animation: none;
		background-image: none;
	}

	.vhl-spinner {
		animation-duration: 1.6s;
	}

	.vhl-toast-progress {
		animation: none;
		display: none;
	}
}
