/**
 * 5etools Brazilian Portuguese Translation - Items CSS
 * Restores all core 5etools layout rules and adds modern card styles,
 * pill badges, bilingual typography, and clean column alignments.
 */

/* === Core 5etools Items Layout & Flexbox Containment === */
#listcontainer.ve-itm__wrp-lists {
	display: flex !important;
	flex-direction: column !important;
	height: 100% !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

/* Modern Segmented Tab Bar */
.ve-itm__tab-bar {
	flex: 0 0 auto !important;
	margin-bottom: 8px !important;
}

.ve-itm__tab-bar .ve-btn-group {
	display: flex !important;
	width: 100% !important;
	background: rgba(0, 0, 0, 0.25);
	border-radius: 8px;
	padding: 3px;
	gap: 4px;
	border: 1px solid rgba(255, 255, 255, 0.08);
}

:root:not(.ve-night-mode) .ve-itm__tab-bar .ve-btn-group {
	background: #e2e8f0;
	border-color: #cbd5e1;
}

.ve-itm__tab-bar .ve-btn {
	flex: 1 1 0% !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	font-size: 12px !important;
	padding: 5px 8px !important;
	border: none !important;
	background: transparent !important;
	color: #94a3b8 !important;
	transition: all 0.18s ease-in-out !important;
	cursor: pointer;
	text-align: center;
}

:root:not(.ve-night-mode) .ve-itm__tab-bar .ve-btn {
	color: #64748b !important;
}

.ve-itm__tab-bar .ve-btn:hover {
	color: #f8fafc !important;
	background: rgba(255, 255, 255, 0.06) !important;
}

:root:not(.ve-night-mode) .ve-itm__tab-bar .ve-btn:hover {
	color: #0f172a !important;
	background: rgba(0, 0, 0, 0.05) !important;
}

.ve-itm__tab-bar .ve-btn.active {
	background: #2563eb !important;
	color: #ffffff !important;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35) !important;
}

/* Headers */
#filtertools-mundane,
#filtertools-magic {
	flex: 0 0 auto !important;
	margin-bottom: 2px !important;
}

/* Item List Wrappers */
.ve-itm__wrp-list {
	display: flex !important;
	flex-direction: column !important;
	min-height: 0 !important;
	flex: 1 1 0% !important;
	height: 100% !important;
	overflow: hidden !important;
}

.ve-itm__wrp-list--empty {
	display: none !important;
	flex: 0 0 0px !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
	overflow: hidden !important;
}

/* Lists and Scrolling */
#list-mundane,
#list-magic,
.list--stats {
	height: 100% !important;
	min-height: 0 !important;
	flex: 1 1 0% !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
}

/* Rows styling */
#list-mundane .ve-lst__row,
#list-magic .ve-lst__row {
	padding: 3px 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
	transition: background-color 0.12s ease !important;
}

:root:not(.ve-night-mode) #list-mundane .ve-lst__row,
:root:not(.ve-night-mode) #list-magic .ve-lst__row {
	border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

#list-mundane .ve-lst__row:hover,
#list-magic .ve-lst__row:hover {
	background-color: rgba(255, 255, 255, 0.05) !important;
}

:root:not(.ve-night-mode) #list-mundane .ve-lst__row:hover,
:root:not(.ve-night-mode) #list-magic .ve-lst__row:hover {
	background-color: rgba(0, 0, 0, 0.03) !important;
}

.side-label,
h3.ele-mundane,
h3.ele-magic {
	display: none !important;
}

.ve-fltr__mini-view {
	max-height: 68px !important;
	overflow-y: auto !important;
}

.ve-itm__list-divider {
	width: 100%;
	height: 1px;
	margin: 6px 0;
	background: rgba(255, 255, 255, 0.08);
	flex: 0 0 auto !important;
}

:root:not(.ve-night-mode) .ve-itm__list-divider {
	background: rgba(0, 0, 0, 0.08);
}

@media screen and (width <= 991px) {
	.list--stats {
		max-height: 20em;
	}
}

@media screen and (device-height <= 700px) {
	.list {
		max-height: 20em;
	}

	.viewport-wrapper {
		bottom: auto;
	}

	.view-col-wrapper {
		flex-direction: column;
		max-height: none;
		height: auto;
	}
}

	/* === Bilingual Item Name Typography === */
	.item-name-container {
		display: inline-flex !important;
		flex-direction: column !important;
		justify-content: center !important;
		min-width: 0 !important;
		max-width: 100% !important;
		line-height: 1.2 !important;
		padding-right: 4px !important;
		vertical-align: middle !important;
		overflow: hidden !important;
	}

	.item-name-pt {
		font-weight: 600 !important;
		font-size: 12.5px !important;
		line-height: 1.25 !important;
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}

	:root.ve-night-mode .item-name-pt {
		color: #f1f5f9;
	}

	:root:not(.ve-night-mode) .item-name-pt {
		color: #0f172a;
	}

	.item-name-en {
		font-size: 10.5px !important;
		font-weight: 400 !important;
		line-height: 1.15 !important;
		margin-top: 1px !important;
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
		font-style: italic !important;
		opacity: 0.72;
	}

	:root.ve-night-mode .item-name-en {
		color: #94a3b8;
	}

	:root:not(.ve-night-mode) .item-name-en {
		color: #64748b;
	}

	/* Statblock / Modal Titles */
	.item-title__pt {
		display: block !important;
		font-size: 1.35em !important;
		font-weight: 700 !important;
		line-height: 1.18 !important;
	}

	:root.ve-night-mode .item-title__pt {
		color: #f8fafc;
	}

	:root:not(.ve-night-mode) .item-title__pt {
		color: #0f172a;
	}

	.item-title__en {
		display: block !important;
		font-size: 0.75em !important;
		font-style: italic !important;
		opacity: 0.75;
		font-weight: normal !important;
		margin-top: 2px !important;
	}

	:root.ve-night-mode .item-title__en {
		color: #94a3b8;
	}

	:root:not(.ve-night-mode) .item-title__en {
		color: #64748b;
	}

	/* === Item-specific Badges & Column Styling === */
	.item-badge--attunement {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 19px;
		height: 19px;
		font-size: 10px;
		font-weight: 800;
		border-radius: 50%;
		background: rgba(168, 85, 247, 0.18);
		color: #c084fc;
		border: 1px solid rgba(168, 85, 247, 0.35);
	}

	:root:not(.ve-night-mode) .item-badge--attunement {
		background: rgba(147, 51, 234, 0.1);
		color: #7e22ce;
		border-color: rgba(147, 51, 234, 0.25);
	}

	.item-badge--rarity {
		display: inline-block;
		font-size: 10.5px;
		font-weight: 700;
		padding: 1px 6px;
		border-radius: 5px;
		text-transform: capitalize;
		border: 1px solid transparent;
		line-height: 1.3;
	}

	/* Rarity Color Accents */
	.item-badge--rarity.ve-itm__rarity-common {
		background: rgba(148, 163, 184, 0.12);
		color: #94a3b8;
		border-color: rgba(148, 163, 184, 0.2);
	}

	.item-badge--rarity.ve-itm__rarity-uncommon {
		background: rgba(34, 197, 94, 0.14);
		color: #4ade80;
		border-color: rgba(34, 197, 94, 0.28);
	}

	:root:not(.ve-night-mode) .item-badge--rarity.ve-itm__rarity-uncommon {
		color: #16a34a;
		border-color: rgba(22, 163, 74, 0.3);
	}

	.item-badge--rarity.ve-itm__rarity-rare {
		background: rgba(59, 130, 246, 0.14);
		color: #60a5fa;
		border-color: rgba(59, 130, 246, 0.3);
	}

	:root:not(.ve-night-mode) .item-badge--rarity.ve-itm__rarity-rare {
		color: #2563eb;
		border-color: rgba(37, 99, 235, 0.3);
	}

	.item-badge--rarity.ve-itm__rarity-very-rare,
	.item-badge--rarity.ve-itm__rarity-very\ rare {
		background: rgba(168, 85, 247, 0.15);
		color: #c084fc;
		border-color: rgba(168, 85, 247, 0.3);
	}

	:root:not(.ve-night-mode) .item-badge--rarity.ve-itm__rarity-very-rare,
	:root:not(.ve-night-mode) .item-badge--rarity.ve-itm__rarity-very\ rare {
		color: #9333ea;
		border-color: rgba(147, 51, 234, 0.3);
	}

	.item-badge--rarity.ve-itm__rarity-legendary {
		background: rgba(245, 158, 11, 0.18);
		color: #fbbf24;
		border-color: rgba(245, 158, 11, 0.35);
	}

	:root:not(.ve-night-mode) .item-badge--rarity.ve-itm__rarity-legendary {
		color: #d97706;
		border-color: rgba(217, 119, 6, 0.35);
	}

	.item-badge--rarity.ve-itm__rarity-artifact {
		background: rgba(239, 68, 68, 0.18);
		color: #f87171;
		border-color: rgba(239, 68, 68, 0.35);
	}

	:root:not(.ve-night-mode) .item-badge--rarity.ve-itm__rarity-artifact {
		color: #dc2626;
		border-color: rgba(220, 38, 38, 0.35);
	}

	.item-badge--source {
		display: inline-block;
		font-size: 10.5px;
		font-weight: 600;
		padding: 2px 6px;
		border-radius: 5px;
		background: rgba(255, 255, 255, 0.04);
		color: #94a3b8;
		border: 1px solid rgba(255, 255, 255, 0.06);
	}

	:root:not(.ve-night-mode) .item-badge--source {
		background: #f8fafc;
		color: #64748b;
		border-color: #e2e8f0;
	}

	.item-list-col--type {
		font-size: 11.5px;
		color: #94a3b8;
		font-weight: 500;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	:root:not(.ve-night-mode) .item-list-col--type {
		color: #475569;
	}

	.item-list-col--value,
	.item-list-col--weight {
		font-size: 11.5px;
		color: #94a3b8;
		font-weight: 500;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	:root:not(.ve-night-mode) .item-list-col--value,
	:root:not(.ve-night-mode) .item-list-col--weight {
		color: #475569;
	}