:root {
	--wow-bnet-bg: transparent;
	--wow-bnet-surface: var(--wp--preset--color--base, transparent);
	--wow-bnet-text: var(--wp--preset--color--contrast, currentColor);
	--wow-bnet-muted: color-mix(in srgb, var(--wow-bnet-text) 60%, transparent);
	--wow-bnet-border: color-mix(in srgb, var(--wow-bnet-text) 14%, transparent);
	--wow-bnet-accent: var(--wp--preset--color--primary, #0a84ff);
	--wow-bnet-accent-strong: color-mix(in srgb, var(--wow-bnet-accent) 82%, black);
	--wow-bnet-success: #1e5f2f;
	--wow-bnet-success-bg: #edf7ed;
	--wow-bnet-success-border: #b7e1c1;
	--wow-bnet-error: #8a1f1f;
	--wow-bnet-error-bg: #fbeaea;
	--wow-bnet-error-border: #efb3b3;
	--wow-bnet-radius: 18px;
	--wow-bnet-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
	--wow-bnet-drop-indicator: #f2c94c;
}

.wow-bnet-button,
.wow-bnet-button:visited {
	display: inline-block;
	padding: 12px 18px;
	border-radius: 999px;
	background: var(--wow-bnet-accent);
	color: #ffffff;
	text-decoration: none;
	font-weight: 600;
	line-height: 1.2;
	transition: background 0.2s ease, transform 0.1s ease;
}

.wow-bnet-button:hover,
.wow-bnet-button:focus {
	background: var(--wow-bnet-accent-strong);
	color: #ffffff;
	text-decoration: none;
}

.wow-bnet-button:active {
	transform: translateY(1px);
}

.wow-bnet-button--login-screen {
	min-width: 220px;
	text-align: center;
}

.wow-bnet-secondary-button {
	display: inline-block;
	padding: 10px 14px;
	border: 1px solid var(--wow-bnet-border);
	border-radius: 999px;
	background: transparent;
	color: var(--wow-bnet-text);
	cursor: pointer;
	font-weight: 500;
}

.wow-bnet-secondary-button:hover,
.wow-bnet-secondary-button:focus {
	background: color-mix(in srgb, var(--wow-bnet-text) 6%, transparent);
}

.wow-bnet-box {
	padding: 18px;
	border: 1px solid var(--wow-bnet-border);
	border-radius: var(--wow-bnet-radius);
	background: color-mix(in srgb, var(--wow-bnet-surface) 70%, transparent);
	color: var(--wow-bnet-text);
	margin: 12px 0;
	box-shadow: var(--wow-bnet-shadow);
	backdrop-filter: blur(6px);
}

.wow-bnet-box p {
	margin: 0 0 12px 0;
}

.wow-bnet-box p:last-child,
.wow-bnet-box form:last-child {
	margin-bottom: 0;
}

.wow-bnet-login-separator {
	text-align: center;
	margin: 16px 0 10px;
	color: var(--wow-bnet-muted);
	font-size: 13px;
}

.wow-bnet-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wow-bnet-notice {
	padding: 12px 14px;
	border-radius: 14px;
	margin: 0 0 12px 0;
}

.wow-bnet-notice--success {
	background: var(--wow-bnet-success-bg);
	border: 1px solid var(--wow-bnet-success-border);
	color: var(--wow-bnet-success);
}

.wow-bnet-notice--error {
	background: var(--wow-bnet-error-bg);
	border: 1px solid var(--wow-bnet-error-border);
	color: var(--wow-bnet-error);
}

.wow-bnet-characters-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 12px;
}

.wow-bnet-characters-header h3 {
	margin: 0 0 6px 0;
}

.wow-bnet-characters-header__intro {
	flex: 1 1 auto;
	min-width: 0;
}

.wow-bnet-characters-header__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	flex: 0 0 auto;
}

.wow-bnet-character-bulk-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
}

.wow-bnet-sync-form {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.wow-bnet-sync-meta,
.wow-bnet-sort-hint {
	font-size: 13px;
	color: var(--wow-bnet-muted);
}

.wow-bnet-sort-hint {
	margin: 0;
}

.wow-bnet-sync-meta {
	margin: 0 !important;
	text-align: right;
}

.wow-bnet-sort-status {
	min-height: 20px;
	font-size: 13px;
	margin: 0 0 14px 0;
	color: var(--wow-bnet-muted);
}

.wow-bnet-sort-status.is-success {
	color: var(--wow-bnet-success);
}

.wow-bnet-sort-status.is-error {
	color: var(--wow-bnet-error);
}

.wow-bnet-character-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 14px;
	align-items: start;
}

.wow-bnet-character-card {
	position: relative;
	border: 1px solid var(--wow-bnet-border);
	border-radius: var(--wow-bnet-radius);
	overflow: hidden;
	background: color-mix(in srgb, var(--wow-bnet-surface) 78%, transparent);
	box-shadow: var(--wow-bnet-shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
	backdrop-filter: blur(8px);
	align-self: start;
}

.wow-bnet-character-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(0, 0, 0, 0.1);
}

.wow-bnet-sort-placeholder {
	display: block !important;
	width: 100% !important;
	height: 0 !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	position: relative;
	align-self: start !important;
}

.wow-bnet-sort-placeholder::after {
	content: "";
	display: block;
	width: 100%;
	height: 4px;
	margin-top: 6px;
	border-radius: 999px;
	background: var(--wow-bnet-drop-indicator);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.wow-bnet-character-card--dragging-source {
	opacity: 0.22;
}

.wow-bnet-character-card--dragging-helper {
	opacity: 0.78;
	transform: rotate(2deg);
	box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
	pointer-events: none;
	z-index: 999999 !important;
	margin: 0 !important;
}

.wow-bnet-character-card--dragging-helper .wow-bnet-character-details {
	display: none !important;
}

.wow-bnet-character-drag {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, #ffffff 20%, transparent);
	background: rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(8px);
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	cursor: grab;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.wow-bnet-character-drag:active {
	cursor: grabbing;
}

.wow-bnet-character-drag span {
	display: block;
	width: 14px;
	height: 2px;
	border-radius: 999px;
	background: #ffffff;
	opacity: 0.85;
}

.wow-bnet-character-image-wrap {
	position: relative;
}

.wow-bnet-character-image {
	background: color-mix(in srgb, var(--wow-bnet-text) 8%, transparent);
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.wow-bnet-character-image--placeholder {
	background: linear-gradient(
		135deg,
		color-mix(in srgb, var(--wow-bnet-text) 6%, transparent),
		color-mix(in srgb, var(--wow-bnet-text) 12%, transparent)
	);
}

.wow-bnet-character-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wow-bnet-character-toggle {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 4;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.42);
	color: #ffffff;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	backdrop-filter: blur(8px);
}

.wow-bnet-character-toggle:hover,
.wow-bnet-character-toggle:focus {
	background: rgba(0, 0, 0, 0.56);
	color: #ffffff;
}

.wow-bnet-character-toggle__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	line-height: 1;
	font-size: 14px;
	font-weight: 700;
}

.wow-bnet-character-content {
	padding: 12px 12px 14px;
}

.wow-bnet-character-summary h4 {
	margin: 0 0 4px 0;
	font-size: 16px;
	line-height: 1.2;
	color: var(--wow-bnet-text);
}

.wow-bnet-character-subline {
	font-size: 12px;
	color: var(--wow-bnet-muted);
	margin: 0 !important;
}

.wow-bnet-character-details {
	margin-top: 12px;
	border-top: 1px solid var(--wow-bnet-border);
	padding-top: 12px;
}

.wow-bnet-character-card.is-collapsed .wow-bnet-character-details {
	display: none;
}

.wow-bnet-character-card.is-expanded .wow-bnet-character-toggle__icon {
	transform: rotate(45deg);
}

.wow-bnet-character-meta {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 8px;
}

.wow-bnet-character-meta li {
	margin: 0;
	font-size: 13px;
	padding: 8px 10px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--wow-bnet-text) 4%, transparent);
	color: var(--wow-bnet-text);
}

.wow-bnet-character-error {
	margin-top: 12px !important;
	color: var(--wow-bnet-error);
	font-size: 12px;
}

.wow-bnet-plugin-check {
	margin: 16px 0;
	padding: 12px 14px;
	border-radius: 12px;
	color: #fff;
}

.wow-bnet-plugin-check--ok {
	background: #2e7d32;
}

.wow-bnet-plugin-check--missing {
	background: #c62828;
}

.wow-bnet-raid-toggle {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 5;
	width: 36px;
	height: 36px;
	border: 1px solid color-mix(in srgb, #ffffff 20%, transparent);
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.34);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	backdrop-filter: blur(8px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.wow-bnet-raid-toggle:hover,
.wow-bnet-raid-toggle:focus {
	background: rgba(0, 0, 0, 0.56);
	color: #ffffff;
}

.wow-bnet-raid-toggle[aria-pressed="true"] {
	background: #d4af37;
	border-color: #d4af37;
	color: #111;
}

.wow-bnet-raid-toggle__icon {
	font-size: 16px;
	line-height: 1;
}

.wow-bnet-character-card.is-raid-selected {
	border-color: color-mix(in srgb, #d4af37 55%, var(--wow-bnet-border));
	box-shadow: 0 0 0 2px color-mix(in srgb, #d4af37 30%, transparent), var(--wow-bnet-shadow);
	background: color-mix(in srgb, #d4af37 8%, var(--wow-bnet-surface));
}

.wow-bnet-admin-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
	align-items: center;
}

.wow-bnet-admin-filters input[type="text"] {
	min-width: 180px;
}

.wow-bnet-admin-table .wow-bnet-admin-character-row {
	cursor: pointer;
}

.wow-bnet-admin-table .wow-bnet-admin-character-row:hover {
	background: #f6f7f7;
}

.wow-bnet-modal[hidden] {
	display: none !important;
}

.wow-bnet-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
}

.wow-bnet-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.wow-bnet-modal__dialog {
	position: relative;
	z-index: 2;
	width: min(980px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	overflow: auto;
	margin: 20px auto;
	background: #fff;
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.wow-bnet-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	border: 0;
	background: transparent;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.wow-bnet-modal-character {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 20px;
}

.wow-bnet-modal-character__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.wow-bnet-modal-character__details h2 {
	margin-top: 0;
}

body.wow-bnet-modal-open {
	overflow: hidden;
}

@media (max-width: 782px) {
	.wow-bnet-modal-character {
		grid-template-columns: 1fr;
	}

	.wow-bnet-characters-header {
		flex-direction: column;
		align-items: stretch;
	}

	.wow-bnet-characters-header__actions {
		align-items: stretch;
	}

	.wow-bnet-character-bulk-actions {
		justify-content: flex-start;
	}

	.wow-bnet-sync-form {
		align-items: flex-start;
	}

	.wow-bnet-sync-meta {
		text-align: left;
	}

	.wow-bnet-character-grid {
		grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	}
}