/* Realm details — Doctorwow */

.realm-page {
	--rd-gold: #d4a84b;
	--rd-gold-soft: rgba(212, 168, 75, 0.16);
	--rd-text: #c9c0b4;
	--rd-muted: #8f8578;
	--rd-panel: rgba(18, 16, 14, 0.78);
	--rd-line: rgba(212, 168, 75, 0.22);
	--rd-alliance: #4f7db8;
	--rd-horde: #b84f4f;
	--rd-green: #6aab6a;
	--rd-red: #c4785a;
	max-width: 980px;
	margin: 0 auto;
	padding: 8px 12px 48px;
	text-align: start;
	font-family: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
}

.content_holder:has(.realm-page) > .sub-page-title {
	display: none;
}

.realm-page__hero {
	text-align: center;
	padding: 22px 16px 28px;
	margin-bottom: 14px;
	background:
		radial-gradient(ellipse 85% 65% at 50% 0%, rgba(212, 168, 75, 0.16), transparent 72%),
		linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent);
	border-radius: 14px;
	animation: realm-hero-in 0.55s ease both;
}

.realm-page__eyebrow {
	margin: 0 0 8px;
	font-size: 0.82rem;
	letter-spacing: 0.04em;
	color: var(--rd-muted);
	text-transform: none;
}

.realm-page__title {
	margin: 0 0 8px;
	font-size: clamp(1.85rem, 4.2vw, 2.55rem);
	font-weight: 700;
	color: var(--rd-gold);
	text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.realm-page__expansion {
	margin: 0 0 14px;
	font-size: 0.98rem;
	color: #d7cdb9;
}

.realm-page__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 16px;
}

.realm-page__tag {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid rgba(212, 168, 75, 0.28);
	background: rgba(0, 0, 0, 0.28);
	color: #e4d9c7;
	font-size: 0.8rem;
	font-weight: 600;
}

.realm-page__lead {
	margin: 0 auto;
	max-width: 40em;
	font-size: 1rem;
	line-height: 1.85;
	color: var(--rd-muted);
}

.realm-page__metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 16px;
	animation: realm-card-in 0.5s ease both;
	animation-delay: 0.08s;
}

.realm-metric {
	padding: 16px 14px;
	border-radius: 12px;
	background: var(--rd-panel);
	border: 1px solid var(--rd-line);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
	min-height: 112px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.realm-metric:hover {
	border-color: rgba(212, 168, 75, 0.42);
	transform: translateY(-1px);
}

.realm-metric.is-online {
	border-color: rgba(106, 171, 106, 0.45);
}

.realm-metric.is-offline {
	border-color: rgba(196, 120, 90, 0.45);
}

.realm-metric__label {
	font-size: 0.82rem;
	color: var(--rd-muted);
}

.realm-metric__value {
	font-size: 1.55rem;
	line-height: 1.2;
	color: #efe5d4;
	font-weight: 700;
}

.realm-metric__value--status.is-online { color: var(--rd-green); }
.realm-metric__value--status.is-offline { color: var(--rd-red); }
.realm-metric__value--status.is-unknown { color: var(--rd-muted); }

.realm-metric__value--factions {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-variant-numeric: tabular-nums;
}

.realm-metric__value--factions .is-alliance { color: #7aa5d8; }
.realm-metric__value--factions .is-horde { color: #d88a8a; }
.realm-metric__sep { color: var(--rd-muted); font-weight: 500; }

.realm-metric__hint {
	margin-top: auto;
	font-size: 0.78rem;
	color: #7a7165;
}

.realm-page__about {
	padding: 20px 22px;
	border-radius: 12px;
	background: var(--rd-panel);
	border: 1px solid var(--rd-line);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
	margin-bottom: 16px;
	animation: realm-card-in 0.5s ease both;
	animation-delay: 0.14s;
}

.realm-about__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.realm-about__head h2 {
	margin: 0;
	font-size: 1.15rem;
	color: var(--rd-gold);
	font-weight: 700;
}

.realm-about__links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.realm-about__links a {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 8px;
	border: 1px solid rgba(212, 168, 75, 0.25);
	background: rgba(0, 0, 0, 0.28);
	color: #e8dfd2;
	text-decoration: none;
	font-size: 0.82rem;
	font-weight: 600;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.realm-about__links a:hover,
.realm-about__links a:focus-visible {
	color: #f5ecd8;
	border-color: rgba(212, 168, 75, 0.5);
	background: rgba(212, 168, 75, 0.12);
	outline: none;
}

.realm-page__about p {
	margin: 0;
	color: var(--rd-text);
	font-size: 0.95rem;
	line-height: 1.85;
}

.realm-about__note {
	margin-top: 10px !important;
	color: var(--rd-muted) !important;
}

.realm-page__stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 14px;
	animation: realm-card-in 0.55s ease both;
	animation-delay: 0.2s;
}

.realm-stat-card {
	padding: 18px 16px;
	border-radius: 12px;
	background: var(--rd-panel);
	border: 1px solid var(--rd-line);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
	min-width: 0;
}

.realm-stat-card h3 {
	margin: 0 0 6px;
	font-size: 1.05rem;
	color: var(--rd-gold);
	font-weight: 700;
}

.realm-stat-card__desc {
	margin: 0 0 16px;
	font-size: 0.82rem;
	line-height: 1.55;
	color: var(--rd-muted);
}

.realm-faction__bar-wrap {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 10px;
	height: 150px;
	margin-bottom: 14px;
	padding: 0 8px;
}

.realm-faction__bar {
	width: 46%;
	max-width: 110px;
	min-height: 18%;
	border-radius: 10px 10px 4px 4px;
	position: relative;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.realm-faction__bar.is-alliance {
	background: linear-gradient(180deg, rgba(95, 145, 210, 0.85), rgba(40, 70, 120, 0.9));
}

.realm-faction__bar.is-horde {
	background: linear-gradient(180deg, rgba(210, 95, 95, 0.85), rgba(120, 40, 40, 0.9));
}

.realm-faction__numbers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.realm-faction__side {
	text-align: center;
	padding: 10px 8px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.04);
}

.realm-faction__side strong {
	display: block;
	font-size: 1.45rem;
	color: #efe5d4;
	line-height: 1.1;
}

.realm-faction__side span {
	display: block;
	margin-top: 4px;
	font-size: 0.75rem;
	color: var(--rd-muted);
	text-transform: none;
}

.realm-faction__side em {
	display: block;
	margin-top: 4px;
	font-style: normal;
	font-size: 0.8rem;
	font-weight: 600;
}

.realm-faction__side.is-alliance em { color: #7aa5d8; }
.realm-faction__side.is-horde em { color: #d88a8a; }

.realm-faction__total {
	margin-top: 10px;
	text-align: center;
	padding: 10px;
	border-radius: 8px;
	background: rgba(212, 168, 75, 0.08);
	border: 1px solid rgba(212, 168, 75, 0.18);
	color: #d7cdb9;
	font-size: 0.9rem;
	font-weight: 600;
}

.realm-bars {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.realm-bars__row {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	grid-template-rows: auto auto;
	gap: 4px 8px;
	align-items: center;
}

.realm-bars__ico {
	grid-row: 1 / span 2;
	width: 20px;
	height: 20px;
	border-radius: 4px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background-size: cover;
	background-position: center;
	box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
}

.realm-bars__track {
	height: 8px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.35);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.04);
}

.realm-bars__fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, rgba(212, 168, 75, 0.55), rgba(212, 168, 75, 0.9));
	min-width: 8%;
	transition: width 0.45s ease;
}

html[dir="rtl"] .realm-bars__fill {
	background: linear-gradient(270deg, rgba(212, 168, 75, 0.55), rgba(212, 168, 75, 0.9));
}

.realm-bars__fill--dk { background: linear-gradient(90deg, #6e1a26, #c41f3b); }
.realm-bars__fill--dr { background: linear-gradient(90deg, #7a3a08, #ff7d0a); }
.realm-bars__fill--ht { background: linear-gradient(90deg, #4f6a2a, #abd473); }
.realm-bars__fill--mg { background: linear-gradient(90deg, #2a6a88, #69ccf0); }
.realm-bars__fill--pl { background: linear-gradient(90deg, #8a4a5a, #f58ca0); }
.realm-bars__fill--pr { background: linear-gradient(90deg, #888, #f0f0f0); }
.realm-bars__fill--rg { background: linear-gradient(90deg, #8a8418, #fff569); }
.realm-bars__fill--sh { background: linear-gradient(90deg, #104070, #0070de); }
.realm-bars__fill--wl { background: linear-gradient(90deg, #4a3a4a, #9482c9); }
.realm-bars__fill--wr { background: linear-gradient(90deg, #6a4a20, #c79c61); }

html[dir="rtl"] .realm-bars__fill--dk { background: linear-gradient(270deg, #6e1a26, #c41f3b); }
html[dir="rtl"] .realm-bars__fill--dr { background: linear-gradient(270deg, #7a3a08, #ff7d0a); }
html[dir="rtl"] .realm-bars__fill--ht { background: linear-gradient(270deg, #4f6a2a, #abd473); }
html[dir="rtl"] .realm-bars__fill--mg { background: linear-gradient(270deg, #2a6a88, #69ccf0); }
html[dir="rtl"] .realm-bars__fill--pl { background: linear-gradient(270deg, #8a4a5a, #f58ca0); }
html[dir="rtl"] .realm-bars__fill--pr { background: linear-gradient(270deg, #888, #f0f0f0); }
html[dir="rtl"] .realm-bars__fill--rg { background: linear-gradient(270deg, #8a8418, #fff569); }
html[dir="rtl"] .realm-bars__fill--sh { background: linear-gradient(270deg, #104070, #0070de); }
html[dir="rtl"] .realm-bars__fill--wl { background: linear-gradient(270deg, #4a3a4a, #9482c9); }
html[dir="rtl"] .realm-bars__fill--wr { background: linear-gradient(270deg, #6a4a20, #c79c61); }

.realm-bars__meta {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
	font-size: 0.8rem;
	color: var(--rd-muted);
}

.realm-bars__meta strong {
	color: #e8dfd2;
	font-variant-numeric: tabular-nums;
}

.realm-bars__meta span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #a89c8c;
}

.realm-bars__meta em {
	font-style: normal;
	color: #7d7468;
	font-variant-numeric: tabular-nums;
}

.realm-page__note {
	margin: 0;
	padding: 14px 16px;
	border-radius: 10px;
	background: rgba(0, 0, 0, 0.28);
	border: 1px solid rgba(255, 255, 255, 0.04);
	color: var(--rd-muted);
	font-size: 0.85rem;
	line-height: 1.7;
	text-align: center;
}

@keyframes realm-hero-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

@keyframes realm-card-in {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
	.realm-page__metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.realm-page__stats {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.realm-page {
		padding-left: 8px;
		padding-right: 8px;
	}

	.realm-page__metrics {
		grid-template-columns: 1fr;
	}

	.realm-about__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.realm-metric__value {
		font-size: 1.35rem;
	}
}
