@import "badges-condition.css";
@import "badges-edition.css";
@import "badges-rarity.css";

@import "badges-rarity-digimon.css";
@import "badges-rarity-yugioh.css";

@import "badges-type-general.css";
@import "badges-type-yugioh.css";
@import "badges-type-pokemon.css";
@import "badges-type-vanguard.css";
@import "badges-type-digimon.css";
@import "badges-type-mtg.css";
@import "badges-type-onepiece.css";
@import "badges-type-dbs.css";

:root {
	--multiplier: 1.2;
	--img-width: calc(300px * var(--multiplier));
	--img-height: calc(442px * var(--multiplier));
	--img-cell-width: 100px;
	--bg-color: #ffffff;
	--text-color: #000000;
	--th-bg: #f4f4f4;
	--border-color: #cccccc;
	--button-bg: #e0e0e0;
	--button-text: #000000;
}

html[data-theme="dark"] {
	--multiplier: 1.2;
	--img-width: calc(300px * var(--multiplier));
	--img-height: calc(442px * var(--multiplier));
	--img-cell-width: 100px;
	--bg-color: #1e1e1e;
	--text-color: #ffffff;
	--th-bg: #2a2a2a;
	--border-color: #444444;
	--button-bg: #444444;
	--button-text: #ffffff;
}

/* General styling */
body {
	font-family: Arial, sans-serif;
	margin: 20px;
	background-color: var(--bg-color) !important;
	color: var(--text-color) !important;
}

header {
	text-align: center;
	margin-bottom: 20px;
	background-color: var(--bg-color) !important;
	color: var(--text-color) !important;
}

#filters {
	margin-bottom: 20px;
}

#filters input,
#filters select {
	padding: 5px;
	margin-right: 10px;
}

button {
	background-color: var(--button-bg);
	color: var(--button-text);
	padding: 5px 10px;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	border: 1px solid var(--border-color) !important;
	padding: 8px;
	vertical-align: middle;
	text-align: center;
}

tr,
td {
	height: 30px;
}

.small-tr {
	height: 22px !important;
}

.tall-tr {
	height: 60px !important;
}

.nowrap-td {
	white-space: nowrap;
}

th {
	background-color: var(--th-bg) !important;
}

/* Card image cell styling */
/* Set the image cell size to a fixed width and height. Here we assume 120px wide and 150px tall represent the top 30% of a typical card image. Adjust these values as needed. */
.img-cell {
	width: var(--img-cell-width);
	height: 30px;
	overflow: hidden;
	/* Crop any part of the image beyond this cell */
	position: relative;
}

.img-cell.tall-tr {
	height: 60px !important;
}

.img-cell.small-tr {
	height: 30px !important;
}

/* The card image is forced to fill the container while showing only its top part. object-fit: cover scales (or crops) the image so that the cell is filled, and object-position: top ensures the top edge is visible. */
.card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform 0.3s ease;
	cursor: pointer;
}

/* --- UPDATED: Full image overlay using fixed positioning --- */
#fullImageOverlay {
	position: fixed;
	/* Fixed relative to the viewport */
	display: none;
	/* Hidden until activated */
	z-index: 1000;
	/* Ensures it appears on top */
	pointer-events: none;
	/* Doesn’t block any mouse interactions */
	transition: top 0.1s ease, left 0.1s ease;
	/* Smoothly moves with the mouse */
}

#fullImageOverlay img {
	display: block;
	width: auto;
	height: auto;
	max-width: var(--img-width);
	max-height: var(--img-height);
	min-width: var(--img-width);
	min-height: var(--img-height);
}

.card-image:hover {
	transform: scale(1.5);
}

/* Quality badges (rectangular like Near Mint) */
.badge {
	padding: 3px 6px;
	border-radius: 3px;
	font-size: 0.9em;
}

.null {
	color: none !important;
	width: 0px !important;
	height: 0px !important;
	display: none !important;
}

.card-details {
	max-width: 600px;
	margin: auto;
	border: 1px solid #ccc;
	padding: 20px;
}

.card-details img {
	width: 200px;
	transition: transform 0.3s ease;
	cursor: pointer;
}

.card-details img:hover {
	transform: scale(1.5);
}

.back-link {
	display: block;
	margin-bottom: 20px;
}

.detail-row {
	margin: 10px 0;
}

.detail-label {
	font-weight: bold;
}

.topbutton {
	margin-left: 10px;
	margin-right: 10px;
}

textarea {
	background-color: var(--bg-color) !important;
	color: var(--text-color) !important;
}

.textboxinput {
	min-width: 200px;
	background-color: var(--bg-color) !important;
	color: var(--text-color) !important;
}

li {
	/* margin-left: 35px;
     */
}

.topmenu {
	margin-bottom: 15px;
	margin-top: 15px;
	display: flex;
	justify-content: center;
	/* centers horizontally */
	align-items: center;
	/* centers vertically */
	flex-direction: row;
	flex-wrap: wrap;
}

.break {
	flex-basis: 100%;
	height: 0;
}

.bottommenu {
	margin-bottom: 15px;
	margin-top: 15px;
	display: flex;
	justify-content: center;
	/* centers horizontally */
	align-items: center;
	/* centers vertically */
	flex-direction: row;
	flex-wrap: wrap;
}

.results {
	margin-left: 8px;
}

#chartsContainer {
	display: block;
}

.canvasclass {
	border: 3px solid black;
}

.tag-button {
	position: relative;
	background: #f0f0f0;
	border: 1px solid #ccc;
	padding: 4px 10px;
	cursor: pointer;
	color: transparent;
	/* hides any fallback text */
	border: 1px solid cyan;
	border-radius: 8px;
	/* <-- rounded corners */
	transition: background 0.2s, transform 0.1s;
}

/* Render visible label from data-value */
.tag-button::before {
	content: attr(data-value);
	color: black;
	font-style: italic;
	/* makes it look like <i> */
}

/* Hide label instantly when searching */
.tag-button.hidden-label::before {
	content: "";
}

span::before {
	content: "   ";
}

span::after {
	content: "   ";
}

span {
	margin-left: 8px;
}