/* Knight Online item card (inc/plugins/oyunbase/ko-items.php, images/oyunbase/ko-item.js), laid out like
   the item tooltip in the game: icon and "Name(+N)", rank and type on the right with the durability bar,
   "Stat : value" lines between thin olive rules, the rank line at the bottom. */

.ob-ko-card {
	--ob-ko-name: #c98ee8;
	--ob-ko-rule: rgba(176, 164, 96, 0.55);
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 330px;
	box-sizing: border-box;
	margin: 10px 0;
	padding: 8px 12px 6px;
	border: 1px solid #6f6a4a;
	border-radius: 3px;
	background: linear-gradient(180deg, rgba(34, 34, 30, 0.97) 0%, rgba(18, 18, 16, 0.97) 100%);
	box-shadow: 0 0 0 1px #000, 0 8px 22px rgba(0, 0, 0, 0.45);
	color: #f4f4f4;
	font-family: Tahoma, Verdana, "Segoe UI", sans-serif;
	font-size: 13px;
	line-height: 1.55;
	text-shadow: 0 1px 1px #000;
}

/* Name colour as in the game: normal (upgrade) items purple, reverse items pink,
   unique gold, rare blue. */
.ob-ko-card[data-tone="rebirth"] {
	--ob-ko-name: #ff8fb4;
}

.ob-ko-card[data-tone="unique"] {
	--ob-ko-name: #ffd24a;
}

.ob-ko-card[data-tone="rare"] {
	--ob-ko-name: #7ab8ff;
}

/* Faint "OyunBase" across the card, behind its content. */
.ob-ko-card::before {
	content: "OyunBase";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) rotate(-28deg);
	color: rgba(255, 255, 255, 0.05);
	font-family: Tahoma, Verdana, sans-serif;
	font-size: 40px;
	font-weight: 800;
	letter-spacing: 2px;
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
}

.ob-ko-card > * {
	position: relative;
}

.ob-ko-top {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ob-ko-icon {
	flex: none;
	width: 40px;
	height: 40px;
	border: 1px solid #8a8460;
	background: #000;
}

.ob-ko-name {
	color: var(--ob-ko-name);
	font-size: 15px;
	font-weight: 700;
}

.ob-ko-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 2px 0 0;
	line-height: 1.35;
}

.ob-ko-logo {
	width: 110px;
	height: auto;
	opacity: 0.35;
}

.ob-ko-metatext {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.ob-ko-rank {
	color: var(--ob-ko-name);
}

.ob-ko-bar {
	display: block;
	width: 48px;
	height: 5px;
	margin: 3px 0 2px;
	border: 1px solid #000;
	background: linear-gradient(180deg, #ffb347 0%, #e07b00 100%);
}

.ob-ko-line {
	padding: 0;
}

.ob-ko-stats {
	margin: 4px 0 0;
	padding: 4px 0;
	border-top: 1px solid var(--ob-ko-rule);
	border-bottom: 1px solid var(--ob-ko-rule);
}

.ob-ko-line.ob-ko-dmg {
	color: #7ee07e;
}

/* Stat bonuses and resistances are green in the game, like elemental damage. */
.ob-ko-line.ob-ko-bonus {
	color: #7ee07e;
}

.ob-ko-line.ob-ko-req {
	color: #ff7b7b;
}

.ob-ko-rankline {
	padding: 4px 0 2px;
	color: var(--ob-ko-name);
	text-align: center;
}

.ob-ko-rankline.ob-ko-dmg {
	color: #7ee07e;
}

.ob-ko-src {
	padding-top: 3px;
	border-top: 1px solid var(--ob-ko-rule);
	color: #8b8a80;
	font-size: 10px;
	text-align: right;
	text-shadow: none;
}

.ob-ko-search {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-bottom: 4px;
}

.ob-ko-show {
	display: flex;
	justify-content: center;
}

.ob-ko-preview:empty {
	display: none;
}
