/* =========================================================
   WP WoW Guild Blocks — Character Profile Page Styles
   ========================================================= */

/* ── Page wrapper ────────────────────────────────────────── */

.wpwgb-char-profile {
	max-width: 900px;
	margin: 2em auto;
	padding: 0 1em;
	font-family: inherit;
	color: inherit;
}

/* ── Back link ───────────────────────────────────────────── */

.wpwgb-char-profile__back {
	margin: 0 0 1.25em;
	font-size: 0.88em;
}

.wpwgb-char-profile__back a {
	color: #999;
	text-decoration: none;
}

.wpwgb-char-profile__back a:hover {
	color: #c4a84a;
	text-decoration: underline;
}

/* ── Header ──────────────────────────────────────────────── */

.wpwgb-char-profile__header {
	display: flex;
	align-items: flex-start;
	gap: 1.25em;
	margin-bottom: 1.5em;
	padding-bottom: 1.5em;
	border-bottom: 2px solid #c4a84a;
}

.wpwgb-char-profile__avatar {
	width: 108px;
	height: 108px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 3px solid #e0e0ea;
}

.wpwgb-char-profile__avatar--placeholder {
	background: #e5e5e5;
}

.wpwgb-char-profile__header-meta {
	min-width: 0;
}

.wpwgb-char-profile__name {
	font-size: 1.75em;
	font-weight: 700;
	margin: 0 0 0.2em;
	line-height: 1.2;
}

.wpwgb-char-profile__meta {
	margin: 0.2em 0 0;
	font-size: 0.95em;
	opacity: 0.85;
}

.wpwgb-char-profile__spec {
	margin: 0.15em 0 0;
	font-size: 0.88em;
	color: #c4a84a;
	font-weight: 600;
}

.wpwgb-char-profile__realm {
	margin: 0.4em 0 0;
	font-size: 0.85em;
	opacity: 0.6;
}

/* ── Gear section (dark background) ─────────────────────── */

.wpwgb-char-profile__gear-section {
	background: #0d0d14;
	border-radius: 10px;
	padding: 1.5em;
	margin-bottom: 2.5em;
}

.wpwgb-char-profile__no-data {
	font-size: 0.9em;
	font-style: italic;
	color: #666;
	margin: 0;
}

/* ── Paper doll grid ─────────────────────────────────────── */

.wpwgb-char-profile__paper-doll {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 0.75em;
	align-items: center;
	min-height: 300px;
}

/* ── Gear columns ────────────────────────────────────────── */

.wpwgb-gear-col {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.wpwgb-gear-col--left {
	align-items: flex-end;
}

.wpwgb-gear-col--right {
	align-items: flex-start;
}

.wpwgb-gear-col--center {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75em;
	align-self: stretch;
}

/* ── Individual gear item ────────────────────────────────── */

.wpwgb-gear-item {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	text-decoration: none;
	color: inherit;
}

.wpwgb-gear-item:hover {
	opacity: 0.8;
}

.wpwgb-gear-item--empty {
	opacity: 0.25;
}

/* ── Gear icon ───────────────────────────────────────────── */

.wpwgb-gear-icon {
	width: 36px;
	height: 36px;
	object-fit: cover;
	border: 2px solid #3a3a4a;
	border-radius: 4px;
	flex-shrink: 0;
	background: #1a1a24;
	display: block;
}

.wpwgb-gear-icon--placeholder {
	background: #1a1a24;
	border-color: #2a2a38;
}

/* Quality border colours on icons */
.wpwgb-quality--uncommon  .wpwgb-gear-icon { border-color: #1eff00; }
.wpwgb-quality--rare      .wpwgb-gear-icon { border-color: #0070dd; }
.wpwgb-quality--epic      .wpwgb-gear-icon { border-color: #a335ee; }
.wpwgb-quality--legendary .wpwgb-gear-icon { border-color: #ff8000; }
.wpwgb-quality--artifact  .wpwgb-gear-icon { border-color: #e6cc80; }
.wpwgb-quality--heirloom  .wpwgb-gear-icon { border-color: #0cf; }

/* ── Gear text ───────────────────────────────────────────── */

.wpwgb-gear-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
	max-width: 155px;
}

.wpwgb-gear-text--right {
	align-items: flex-end;
	text-align: right;
}

.wpwgb-gear-slot-label {
	font-size: 0.68em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #555;
	font-weight: 600;
}

.wpwgb-gear-name {
	font-size: 0.8em;
	font-weight: 600;
	color: #c0c0c8;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.wpwgb-gear-ilvl {
	font-size: 0.7em;
	color: #666;
	line-height: 1.2;
}

/* WoW item quality name colours */
.wpwgb-quality--poor      .wpwgb-gear-name { color: #9d9d9d; }
.wpwgb-quality--common    .wpwgb-gear-name { color: #c0c0c8; }
.wpwgb-quality--uncommon  .wpwgb-gear-name { color: #1eff00; }
.wpwgb-quality--rare      .wpwgb-gear-name { color: #0070dd; }
.wpwgb-quality--epic      .wpwgb-gear-name { color: #a335ee; }
.wpwgb-quality--legendary .wpwgb-gear-name { color: #ff8000; }
.wpwgb-quality--artifact  .wpwgb-gear-name { color: #e6cc80; }
.wpwgb-quality--heirloom  .wpwgb-gear-name { color: #0cf; }

/* ── Character render (centre column) ───────────────────── */

.wpwgb-char-render {
	max-height: 380px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
	object-position: top center;
	display: block;
	filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.7));
}

/* ── Average ilvl badge ──────────────────────────────────── */

.wpwgb-avg-ilvl-badge {
	display: inline-block;
	padding: 0.3em 1em;
	background: rgba(196, 168, 74, 0.1);
	border: 1px solid rgba(196, 168, 74, 0.5);
	border-radius: 999px;
	color: #c4a84a;
	font-size: 0.85em;
	font-weight: 700;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

/* ── Bottom row (trinkets + weapons) ─────────────────────── */

.wpwgb-gear-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 1.25em;
	padding-top: 1.25em;
	border-top: 1px solid #1c1c28;
}

.wpwgb-gear-bottom-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	width: 80px;
	text-align: center;
	text-decoration: none;
	color: inherit;
}

.wpwgb-gear-bottom-item:hover {
	opacity: 0.8;
}

.wpwgb-gear-bottom-item .wpwgb-gear-name {
	font-size: 0.72em;
	white-space: normal;
	text-align: center;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	max-width: 80px;
}

.wpwgb-gear-bottom-item .wpwgb-gear-ilvl {
	font-size: 0.66em;
}

/* ── Mythic+ section (inherits page theme) ───────────────── */

.wpwgb-char-profile__section {
	margin-bottom: 2.5em;
}

.wpwgb-char-profile__section-heading {
	font-size: 1.05em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 1em;
	padding-bottom: 0.5em;
	border-bottom: 2px solid #c4a84a;
	color: inherit;
}

.wpwgb-char-profile__mythic-score {
	font-size: 1em;
	margin: 0 0 1em;
}

.wpwgb-char-profile__mythic-score strong {
	font-size: 1.3em;
	color: #0070dd;
}

/* ── Mythic+ table ───────────────────────────────────────── */

.wpwgb-mythic-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.wpwgb-mythic-table thead tr {
	border-bottom: 2px solid #e2e2ea;
}

.wpwgb-mythic-table th {
	padding: 0.4em 0.75em 0.5em;
	text-align: left;
	font-size: 0.75em;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #888;
}

.wpwgb-mythic-row {
	border-bottom: 1px solid #f0f0f4;
	transition: background 0.1s;
}

.wpwgb-mythic-row:hover {
	background: #f8f8fb;
}

.wpwgb-mythic-row td {
	padding: 0.5em 0.75em;
	vertical-align: middle;
}

.wpwgb-mythic-level {
	font-weight: 700;
	color: #0070dd;
	white-space: nowrap;
}

.wpwgb-mythic-row--timed .wpwgb-mythic-level {
	color: #27a843;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 640px) {
	.wpwgb-char-profile__header {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.wpwgb-char-profile__name {
		font-size: 1.4em;
	}

	/* Collapse paper doll to a single stacked list */
	.wpwgb-char-profile__paper-doll {
		grid-template-columns: 1fr;
	}

	/* Hide character render on small screens to save space */
	.wpwgb-gear-col--center {
		display: none;
	}

	/* Both columns become left-aligned flat lists */
	.wpwgb-gear-col--left,
	.wpwgb-gear-col--right {
		align-items: stretch;
	}

	/* Flip left-column items so icon is on the left (like the right column) */
	.wpwgb-gear-col--left .wpwgb-gear-item {
		flex-direction: row-reverse;
		justify-content: flex-end;
	}

	.wpwgb-gear-col--left .wpwgb-gear-text--right {
		align-items: flex-start;
		text-align: left;
	}

	.wpwgb-gear-text {
		max-width: none;
	}
}
