/* vnEsports ĐTCL: tier list, comp cards, top list, set guide. Uses the theme's colour tokens. */

.tft-hub { margin-bottom: 16px; padding-bottom: 12px; }
.tft-note { margin: 4px 0 12px; color: var(--color-text-secondary); font-size: 13px; line-height: 20px; }
.tft-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Play-style filter */
.tft-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tft-filter button {
	padding: 6px 14px; border: var(--border-medium); border-radius: 999px; background: var(--color-pill);
	color: var(--color-text); font: inherit; font-size: 13px; line-height: 18px; cursor: pointer;
}
.tft-filter button:hover { background: var(--color-surface-hover); }
.tft-filter button.is-active { border-color: var(--color-primary); background: var(--color-primary-soft); color: #fff; }

.tft-tier-group { margin-bottom: 18px; }
.tft-tier-group[hidden] { display: none; }
.tft-tier-title { margin: 0 0 10px; font-size: 18px; line-height: 26px; }
.tft-empty { color: var(--color-text-secondary); }

/* Comp card: name, tags and 2 x 2 stats on the left; traits and champions on the right */
.tft-comp {
	position: relative; display: grid; grid-template-columns: 176px minmax(0, 1fr);
	grid-template-areas: "hd cm" "cs cm"; align-items: start; gap: 10px 16px;
	margin-bottom: 10px; padding: 14px 14px 12px; border: var(--border-light); border-left: 4px solid var(--t);
	border-radius: 6px; background: var(--color-bg); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35);
	scroll-margin-top: calc(var(--sticky-top) + 8px);
}
.tft-comp[hidden] { display: none; }
.tft-comp:target { border-color: var(--color-primary); border-left-color: var(--t); }

.tft-hd { grid-area: hd; display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.tft-hd-text { min-width: 0; }
.tft-tb {
	position: relative; isolation: isolate; display: grid; flex: none; place-items: center;
	width: 28px; height: 36px; padding-bottom: 6px; color: #2a1a12; font-weight: 700; font-size: 17px;
}
.tft-tb::before {
	content: ""; position: absolute; inset: 0; z-index: -1; background: var(--t);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.tft-comp-name { margin: 0 0 6px; font-size: 16px; line-height: 21px; }
.tft-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tft-tag {
	padding: 1px 7px; border: 1px solid var(--color-border-medium); border-radius: 4px;
	color: var(--color-text-secondary); font-size: 12px; line-height: 18px; white-space: nowrap;
}
.tft-tag.is-fast { border-color: #2a6f8a; background: rgba(56, 189, 248, 0.1); color: #7dd3fc; }
.tft-tag.is-reroll { border-color: #8a6a2c; background: rgba(232, 184, 96, 0.12); color: #e8b860; }
.tft-tag.is-hot { border-color: #2a7d6c; background: rgba(79, 209, 181, 0.12); color: #4fd1b5; }
.tft-tag.is-rare { border-color: #4d4470; background: rgba(157, 124, 245, 0.1); color: #b3a6d9; }
.tft-tag.is-up { border-color: transparent; background: rgba(63, 185, 80, 0.12); color: #5fd08a; }
.tft-tag.is-down { border-color: transparent; background: rgba(239, 107, 107, 0.12); color: #f08a8a; }

.tft-cs { grid-area: cs; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
.tft-cs div { display: flex; flex-direction: column-reverse; padding: 5px 8px; border-radius: 5px; background: var(--color-white); }
.tft-cs dt { color: var(--color-text-secondary); font-size: 11.5px; line-height: 15px; white-space: nowrap; }
.tft-cs dd { margin: 0; font-weight: 700; font-size: 17px; line-height: 22px; }

.tft-cm { grid-area: cm; min-width: 0; }
.tft-tcs { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 64px 10px 0; padding: 0; list-style: none; }
.tft-tc {
	display: inline-flex; align-items: center; gap: 3px; margin: 0; padding: 2px 6px 2px 4px; border: 1px solid var(--c);
	border-radius: 5px; background: var(--color-white); font-size: 13px; line-height: 18px;
}
.tft-tc-icon { display: block; width: 16px; height: 16px; filter: drop-shadow(0 0 1px var(--c)); }
.tft-tc b { color: var(--c); font-weight: 700; }

.tft-us { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; max-width: 476px; margin: 0; padding: 0; list-style: none; }
.tft-u { min-width: 0; margin: 0; text-align: center; }
.tft-u.is-flex { opacity: 0.62; }
.tft-st { display: block; height: 13px; color: #d9dde3; font-size: 12px; line-height: 13px; letter-spacing: -1px; }
.tft-st.is-3 { color: #f5b400; }
.tft-pf, .tft-u .tft-ph { display: block; width: 100% !important; max-width: 48px; height: auto !important; margin: 0 auto; border: 2px solid var(--c); border-radius: 5px; background: var(--color-white); object-fit: cover; aspect-ratio: 1; }
.tft-its { display: flex; justify-content: center; gap: 1px; height: 16px; margin-top: 2px; }
.tft-it { display: block; width: 15px; height: 15px; border: 1px solid var(--color-border); border-radius: 3px; }
.tft-its .tft-ph { font-size: 6px; }
.tft-un { display: block; margin-top: 1px; overflow: hidden; color: var(--color-text-secondary); font-size: 11px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }

.tft-cact { position: absolute; top: 8px; right: 10px; display: flex; gap: 2px; }
.tft-ic {
	position: relative; display: grid; place-items: center; width: 28px; height: 26px; padding: 0; border: 0; border-radius: 4px;
	background: none; color: #c3c9d4; cursor: pointer;
}
.tft-ic svg { width: 17px; height: 17px; }
.tft-ic:hover { background: var(--color-pill); color: #fff; }
.tft-ic.is-done { color: #5fd08a; }
.tft-ic.is-done::after {
	content: attr(data-done); position: absolute; top: calc(100% + 4px); right: 0; z-index: 2; padding: 3px 8px; border-radius: 4px;
	background: #111318; color: #fff; font-size: 12px; line-height: 16px; white-space: nowrap; box-shadow: var(--shadow-sm);
}

.tft-ph {
	display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--color-surface-hover);
	color: var(--color-text-secondary); font-size: 10px; font-weight: 700; line-height: 1;
}

/* Set guide: champions by cost, trait grid */
.tft-roster-title { margin: 14px 0 8px; font-size: 16px; line-height: 22px; }
.tft-roster-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px 6px; margin: 0 0 4px; padding: 0; list-style: none; }
.tft-unit { display: flex; flex-direction: column; align-items: center; min-width: 0; margin: 0; text-align: center; }
.tft-unit-pic { position: relative; display: block; line-height: 0; }
.tft-unit-icon { display: block; width: 44px; height: 44px; border: 2px solid #8a8f98; border-radius: 5px; object-fit: cover; }
.tft-cost-2 .tft-unit-icon { border-color: #3fb950; }
.tft-cost-3 .tft-unit-icon { border-color: #3b82f6; }
.tft-cost-4 .tft-unit-icon { border-color: #a855f7; }
.tft-cost-5 .tft-unit-icon { border-color: #f5b400; }
.tft-unit-name { max-width: 100%; margin-top: 3px; overflow: hidden; color: var(--color-text-secondary); font-size: 11px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.tft-trait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.tft-trait-grid li { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px; border-radius: 4px; background: var(--color-pill); font-size: 14px; line-height: 20px; }
.tft-trait-icon { display: block; border-radius: 2px; }
.entry-content .tft-roster-list, .entry-content .tft-trait-grid, .entry-content .tft-us, .entry-content .tft-tcs, .entry-content .tft-top { padding-left: 0; }
.entry-content .tft-u, .entry-content .tft-tc, .entry-content .tft-top li { margin: 0; }

/* Patch archive links (hub + recap articles) */
.tft-archive { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.entry-content .tft-archive { padding-left: 0; }
.tft-archive li { margin: 0; }
.tft-archive a { display: inline-block; padding: 6px 14px; border: var(--border-light); border-radius: 999px; background: var(--color-pill); color: var(--color-text); font-size: 13.5px; line-height: 18px; text-decoration: none; }
.tft-archive a:hover { border-color: var(--color-primary); color: #fff; }

/* Top list (/dtcl/) */
.tft-top { margin: 0; padding: 0; list-style: none; }
.tft-top li + li { border-top: var(--border-light); }
.tft-top a { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: inherit; text-decoration: none; }
.tft-top a:hover .tft-top-name { color: var(--color-primary-dark); }
.tft-top .tft-tier {
	display: inline-flex; flex: none; align-items: center; justify-content: center; width: 26px; height: 26px;
	border-radius: 4px; color: #2a1a12; font-weight: 700; font-size: 14px;
}
.tft-tier--s { background: #ff7e83; }
.tft-tier--a { background: #ffbf7f; }
.tft-tier--b { background: #ffdf80; }
.tft-tier--c { background: #feff7f; }
.tft-tier--d { background: #9bd3ff; }
.tft-top-icon { flex: none; width: 32px; height: 32px; border-radius: 4px; }
.tft-top-name { flex: 1; min-width: 0; font-weight: 700; line-height: 18px; }
.tft-top-name small, .tft-top-stat small { display: block; color: var(--color-text-secondary); font-weight: 400; font-size: 11px; }
.tft-top-stat { flex: none; min-width: 52px; font-weight: 700; text-align: right; line-height: 18px; }
.tft-more { margin: 8px 0 0; font-size: 14px; }

@media (max-width: 640px) {
	.tft-comp { grid-template-columns: minmax(0, 1fr); grid-template-areas: "hd" "cm" "cs"; gap: 8px; padding: 10px 8px 10px 10px; border-left-width: 3px; }
	.tft-hd { padding-right: 60px; }
	.tft-tcs { margin-right: 0; }
	.tft-tb { width: 25px; height: 33px; font-size: 15px; }
	.tft-cs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
	.tft-cs div { padding: 4px 6px; }
	.tft-cs dd { font-size: 15px; line-height: 20px; }
	.tft-cs dt { font-size: 10.5px; }
	.tft-us { gap: 4px; max-width: none; }
	.tft-st { height: 11px; font-size: 9.5px; line-height: 11px; }
	.tft-its { height: 12px; }
	.tft-it { width: 12px; height: 12px; }
	.tft-un { font-size: 9.5px; }
	.tft-top-stat:last-child { display: none; }
}
