/* custom_hero (M199, kiki20072/custom_hero_prod#297): the item tooltip of the website (plugins/custom-hero-items).
   Columns and the fit inside the window: kiki20072/custom_hero_prod#324. */
.ch-item {
	display: inline-block;
	position: relative;
	line-height: 0;
	cursor: help;
	border-radius: 3px;
	outline: none;
}
.ch-item > img {
	display: block;
}
.ch-item:hover,
.ch-item:focus-visible,
[data-ch-item]:focus-visible {
	box-shadow: 0 0 0 1px #d6b25e, 0 0 6px rgba(214, 178, 94, 0.75);
}
.ch-item > template {
	display: none;
}
[data-ch-item] {
	cursor: help;
}

.ch-tooltip-layer {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 10000;
	/* #324: assets/items.js sets the exact room of the window in px; this is the start value. */
	max-width: calc(100vw - 16px);
	pointer-events: none;
	opacity: 0;
	transform: translateY(3px);
	transition: opacity 0.12s ease, transform 0.12s ease;
}
.ch-tooltip-layer.is-on {
	opacity: 1;
	transform: none;
}
.ch-tooltip-layer.is-pinned {
	pointer-events: auto;
}
.ch-tooltip-layer[hidden] {
	display: none;
}
@media (prefers-reduced-motion: reduce) {
	.ch-tooltip-layer {
		transition: none;
	}
}

/*
 * #324: the tooltip spreads its sections in --ch-tip-cols columns of --ch-tip-column (assets/items.js picks the count
 * that fits the window and sets the max-height); one column is the former 330px box. When even the widest layout is
 * taller than the window, the box scrolls inside it.
 */
.ch-tip {
	--ch-tip-cols: 1;
	--ch-tip-column: 304px;
	--ch-tip-gap: 20px;
	width: calc(var(--ch-tip-cols) * (var(--ch-tip-column) + var(--ch-tip-gap)) - var(--ch-tip-gap) + 26px);
}
.ch-tip-state {
	width: 330px;
}
.ch-tip,
.ch-tip-state {
	box-sizing: border-box;
	max-width: 100%;
	max-height: calc(100vh - 16px);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: #8c7442 #1b1813;
	padding: 10px 12px 10px;
	background: linear-gradient(180deg, #2a241c 0%, #1b1813 100%);
	border: 1px solid #8c7442;
	border-radius: 5px;
	box-shadow: 0 0 0 1px #0b0a08, inset 0 1px 0 rgba(255, 233, 170, 0.12), 0 8px 22px rgba(0, 0, 0, 0.55);
	color: #e8e0c8;
	font: 12px/1.4 Verdana, Tahoma, Arial, sans-serif;
	text-align: left;
	letter-spacing: 0;
}
.ch-tip-state {
	color: #c9bd99;
	font-style: italic;
}

.ch-tip__head {
	display: flex;
	align-items: center;
	gap: 9px;
}
.ch-tip__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: radial-gradient(circle at 50% 40%, #4a4134 0%, #23201a 75%);
	border: 1px solid #5f5038;
	border-radius: 4px;
	box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.7);
}
.ch-tip__icon img {
	image-rendering: pixelated;
}
.ch-tip__title {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.ch-tip__name {
	color: #ffd98a;
	font-size: 13px;
	line-height: 1.25;
	overflow-wrap: anywhere;
}
.ch-tip__subtitle {
	color: #b8aa86;
	font-size: 11px;
}

.ch-tip__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 7px;
}
.ch-tip__badge {
	padding: 1px 7px;
	border-radius: 10px;
	font-size: 10.5px;
	font-weight: bold;
	letter-spacing: 0.02em;
	border: 1px solid transparent;
}
.ch-tip__badge--class {
	background: rgba(87, 132, 196, 0.2);
	border-color: rgba(120, 165, 230, 0.55);
	color: #b9d3ff;
}
.ch-tip__badge--tier {
	background: rgba(214, 148, 52, 0.2);
	border-color: rgba(240, 175, 80, 0.6);
	color: #ffcf86;
}
/* custom_hero (M248, kiki20072/custom_hero_prod#379, PLAN-0050): the refine level of a saved item */
.ch-tip__badge--refine {
	background: rgba(90, 184, 255, 0.18);
	border-color: rgba(120, 200, 255, 0.55);
	color: #a9dcff;
}

.ch-tip__section {
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px solid rgba(140, 116, 66, 0.45);
}
/* #324: the sections and texts in columns, each one whole in its column; the space between blocks is a bottom margin
   so that every column starts at the same height (a top margin is cut at a column break). */
.ch-tip__body {
	margin-top: 8px;
	column-count: var(--ch-tip-cols);
	column-gap: var(--ch-tip-gap);
	column-rule: 1px solid rgba(140, 116, 66, 0.3);
	column-fill: balance;
}
.ch-tip__body > * {
	break-inside: avoid;
	page-break-inside: avoid;
	-webkit-column-break-inside: avoid;
}
.ch-tip__body > .ch-tip__section,
.ch-tip__body > .ch-tip__text {
	margin-top: 0;
	margin-bottom: 8px;
}
.ch-tip__body > :last-child {
	margin-bottom: 0;
}
.ch-tip__heading {
	margin: 0 0 4px;
	padding: 0;
	color: #d0a95b;
	font-size: 10px;
	font-weight: bold;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	background: none;
	border: 0;
}
.ch-tip__rows {
	margin: 0;
	padding: 0;
}
.ch-tip__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 1px 0;
}
.ch-tip__row dt {
	flex: 0 1 auto;
	margin: 0;
	color: #b3a682;
	font-weight: normal;
}
.ch-tip__row dd {
	flex: 0 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	margin: 0;
	text-align: right;
	min-width: 0;
}
.ch-tip__value {
	color: #f3ecd8;
	font-weight: bold;
	overflow-wrap: anywhere;
}
.ch-tip__time,
.ch-tip__detail {
	color: #a99c79;
	font-size: 10.5px;
	font-weight: normal;
}
.ch-tip__row--pos .ch-tip__value {
	color: #8fe08a;
}
.ch-tip__row--neg .ch-tip__value {
	color: #ff8a80;
}
.ch-tip__row--imbued .ch-tip__value {
	color: #d4b2ff;
}
.ch-tip__row--bound .ch-tip__value {
	color: #f4c95d;
}
.ch-tip__row--muted .ch-tip__value {
	color: #8a816d;
	font-weight: normal;
	font-style: italic;
}

.ch-tip__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
}
.ch-tip__chip {
	--chip: #c8bda5;
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
	margin: 0;
	padding: 1px 7px 1px 6px;
	border-left: 3px solid var(--chip);
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.05);
	color: #ddd3b8;
	font-size: 11px;
}
.ch-tip__chip b {
	color: var(--chip);
}
.ch-tip__chip--neg b {
	color: #ff8a80;
}
.ch-tip__chip--physical { --chip: #d8ccb1; }
.ch-tip__chip--fire { --chip: #ff8a4c; }
.ch-tip__chip--earth { --chip: #86d063; }
.ch-tip__chip--energy { --chip: #c28dff; }
.ch-tip__chip--ice { --chip: #79d8ff; }
.ch-tip__chip--holy { --chip: #ffe27a; }
.ch-tip__chip--death { --chip: #d27878; }
.ch-tip__chip--lifedrain { --chip: #ff7f9e; }
.ch-tip__chip--manadrain { --chip: #7f9dff; }
.ch-tip__chip--healing { --chip: #7fe8c2; }
.ch-tip__chip--drown { --chip: #5bb8de; }
.ch-tip__chip--all { --chip: #efe6cf; }
.ch-tip__chip--imbuement { --chip: #d4b2ff; }

.ch-tip__note {
	margin: 4px 0 0;
	color: #9d916f;
	font-size: 10.5px;
	font-style: italic;
}
.ch-tip__text {
	margin: 8px 0 0;
	padding: 5px 8px;
	border-left: 2px solid #6d5c3b;
	background: rgba(0, 0, 0, 0.22);
	color: #cfc4a5;
	font-style: italic;
	overflow-wrap: anywhere;
}
