.overlay-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 11, 8, 0.85);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	box-sizing: border-box;
}

.overlay-backdrop.hidden {
	display: none;
}

.overlay-frame {
	min-width: 700px;
	height: 95%;
	background: #1a1410;
	border: 3px solid #3d2b1f;
	box-shadow:
		0 0 15px #050403,
		inset 0 0 20px rgba(5, 4, 3, 0.9);
	display: flex;
	flex-direction: column;
	padding: 8px;
	color: #f1ceae;
	box-sizing: border-box;
}

.overlay-header-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	border-bottom: 2px solid #2b1e15;
	padding-bottom: 4px;
	margin-bottom: 6px;
}

.tab-button {
	background: #261d17;
	border: 1px solid #3d2b1f;
	border-radius: 6px;
	margin: 1px;
	color: #cfb9a6;
	padding: 6px 16px;
	font-weight: bold;
	box-shadow: inset 0 0 5px #0a0705;
	transition: all 0.2s ease;
}

.tab-button:hover {
	background: #2e231c;
	color: #c4ae9a;
}

.tab-button.active {
	position: relative;
	border: 2px solid transparent;
	border-radius: 6px;
	margin: 0;
	color: #e0c097;

	box-shadow:
		inset 0 1px 0 rgba(224, 192, 151, 0.05),
		0 0 6px rgba(143, 101, 66, 0.2);

	background-image: linear-gradient(#2b1e15, #1f1610), linear-gradient(90deg, #523a28, #8f6542, #e0c097, #8f6542, #523a28);

	background-origin: border-box;
	background-clip: padding-box, border-box;
	background-size:
		100% 100%,
		200% 100%;

	animation: borderSweep 2.5s linear infinite;
}

@keyframes borderSweep {
	from {
		background-position:
			0 0,
			200% 0;
	}
	to {
		background-position:
			0 0,
			0 0;
	}
}

.overlay-content {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 4px;
}

.overlay-content::-webkit-scrollbar {
	width: 6px;
}

.overlay-content::-webkit-scrollbar-track {
	background: #1a1410;
}

.overlay-content::-webkit-scrollbar-thumb {
	background: #3d2b1f;
	border-radius: 3px;
}

.overlay-title {
	text-align: center;
	color: #e0c097;
	font-size: 1.1em;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 2px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.list-item {
	display: flex;
	padding: 2px 6px;
	background: rgba(224, 192, 151, 0.03);
	border: 1px solid transparent;
	border-radius: 4px;
}

@keyframes magicBorderAnim {
	0% {
		background-position:
			0% 0%,
			0% 0%;
	}
	100% {
		background-position:
			0% 0%,
			200% 0%;
	}
}

.list-item.selected {
	color: #faebd7;
	border: 2px dashed transparent;
	background-image:
		linear-gradient(rgba(143, 101, 66, 0.1), rgba(143, 101, 66, 0.1)),
		repeating-linear-gradient(135deg, #e0c097 0%, #8f6542 15%, #523a28 35%, #8f6542 50%);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	background-size:
		100% 100%,
		200% 200%;
	animation: magicBorderAnim 4s linear infinite;
}

.item-key {
	color: #c9a47b;
	margin-right: 8px;
}

.item-slot {
	width: 140px;
}

.item-dummy {
	color: #5c4d42;
	font-style: italic;
}

.overlay-footer {
	border-top: 2px solid #2b1e15;
	padding-top: 12px;
	margin-top: auto;
	text-align: center;
	color: #cfb9a6;
	font-size: 0.85em;
}
