/**
 * Valhalla for Vikinger — Safety module (Member Blocking).
 *
 * Uses Vikinger CSS variables (with fallbacks for other themes) so presets and dark mode work.
 * Breakpoints follow the theme: 1365 / 960 / 680 / 480.
 *
 * Shared building blocks (also used by add-ons rendering on the same pages): the restricted
 * profile card (.vhl-safety-private-*), the Account Hub wrapper (.vhl-safety-account,
 * .vhl-safety-box, .vhl-safety-help, .vhl-safety-notice) and the busy state (.vhl-safety-busy).
 */

/* ---------------------------------------------------------------------
 * Hidden content & blocked profile state
 * ------------------------------------------------------------------- */
[data-vhl-safety-hidden] {
	display: none !important;
}

body.vhl-safety-viewing-blocked #profile-header-actions {
	display: none !important;
}

.vhl-safety-busy {
	opacity: .6;
	pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Restricted profile page
 * ------------------------------------------------------------------- */
.vhl-safety-private-wrap {
	max-width: 584px;
	margin: 32px auto 0;
}

.vhl-safety-private-card .widget-box-content {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 0;
	padding: 20px 0 8px;
	text-align: center;
}

.vhl-safety-private-avatar {
	display: flex;
	justify-content: center;
	position: relative;
}

.vhl-safety-private-avatar-img {
	border-radius: 50%;
}

.vhl-safety-private-badge {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 36px;
	height: 36px;
	border: 4px solid var(--color-box-background, #fff);
	border-radius: 50%;
	background-color: var(--color-primary, #23d2e2);
	position: absolute;
	/* Bottom-left: Vikinger puts the member's level badge on the bottom-right of the avatar. */
	left: -6px;
	bottom: 0;
}

.vhl-safety-private-badge .vhl-safety-private-icon {
	width: 14px;
	height: 14px;
	fill: #fff;
}

.vhl-safety-private-badge.vhl-safety-private-badge-large {
	width: 92px;
	height: 92px;
	border: 0;
	background-color: var(--color-box-background-alt, #f8f8fb);
	position: static;
}

.vhl-safety-private-badge.vhl-safety-private-badge-large .vhl-safety-private-icon {
	width: 36px;
	height: 36px;
	fill: var(--color-icon-highlighted, var(--color-primary, #23d2e2));
}

.vhl-safety-private-name {
	margin-top: 24px;
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
	word-break: break-word;
}

.vhl-safety-private-mention {
	margin-top: 8px;
	color: var(--color-text-alt-2, #adafca);
	font-size: .875rem;
	font-weight: 700;
}

.vhl-safety-private-title {
	margin-top: 32px;
	color: var(--color-text, #3e3f5e);
	font-family: var(--vikinger-font-family-primary, inherit);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
}

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

.vhl-safety-private-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 32px;
}

.vhl-safety-private-actions .button {
	min-width: 180px;
	padding: 0 24px;
	cursor: pointer;
}

.vhl-safety-private-actions .button[disabled] {
	cursor: default;
}

/* ---------------------------------------------------------------------
 * Account Hub page
 * ------------------------------------------------------------------- */
.vhl-safety-account [hidden] {
	display: none !important;
}

.vhl-safety-account .vhl-safety-notice {
	margin-bottom: 16px;
}

.vhl-safety-account .widget-box + .widget-box {
	margin-top: 0;
}

.vhl-safety-account button.button {
	font-family: inherit;
	cursor: pointer;
}

.vhl-safety-help {
	margin-top: 12px;
	color: var(--color-text-alt, #8f91ac);
	font-size: .875rem;
	font-weight: 500;
	line-height: 1.4285714286em;
}

.vhl-safety-blocked-intro {
	margin-top: 0;
	margin-bottom: 28px;
}

/* Blocked members list. */
.vhl-safety-blocked-item {
	position: relative;
	transition: opacity .25s ease-in-out;
}

.vhl-safety-blocked-item + .vhl-safety-blocked-item {
	margin-top: 22px;
}

.vhl-safety-blocked-item .user-status {
	margin-bottom: 0;
	padding-right: 150px;
}

.vhl-safety-blocked-actions {
	position: absolute;
	top: 2px;
	right: 0;
}

.vhl-safety-blocked-actions .action-request {
	background-color: transparent;
	font-family: inherit;
}

.vhl-safety-blocked-item.vhl-safety-removing {
	opacity: 0;
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------- */
@media screen and (max-width: 680px) {
	.vhl-safety-private-wrap {
		margin-top: 16px;
	}

	.vhl-safety-private-actions .button {
		width: 100%;
	}
}

@media screen and (max-width: 479px) {
	.vhl-safety-blocked-item .user-status {
		padding-right: 52px;
	}
}
