/* UFC pages (#/ufc, #/ufc/fighter/:id). Colors come only from theme variables. */

.ufc-shot { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface-3); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); flex: none; }
.ufc-shot.sm { width: 32px; height: 32px; border-width: 1px; }
.ufc-shot.xl { width: 96px; height: 96px; border-width: 3px; box-shadow: 0 0 0 1px var(--border), var(--shadow); }
.ufc-noshot { display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 var(--font-display); color: var(--text-2); background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); }
.ufc-shot.sm.ufc-noshot { font-size: 10px; }
.ufc-shot.xl.ufc-noshot { font-size: 30px; }
.ufc-flag { width: 22px; height: 15px; object-fit: cover; border-radius: 2px; vertical-align: middle; margin-left: 4px; }

.ufc-chips { margin-bottom: 0; }
.card .ufc-chips + .table-scroll { margin-top: 12px; }
#rank-chips { margin-bottom: 0; }

/* fight rows */
.ufc-games { max-height: none; overflow: visible; margin-right: 0; padding-right: 0; }
.ufc-recent { max-height: 640px; }
.ufc-recent .ufc-shot { display: none; }
.ufc-fight { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.ufc-games { gap: 10px; }
.ufc-games .ufc-fight { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); }
.ufc-fight.main, .ufc-games .ufc-fight.main { background: linear-gradient(180deg, var(--accent-soft), var(--surface) 70%); border: 1.5px solid color-mix(in oklab, var(--accent) 55%, var(--border)); }
.ufc-fight.main .ufc-shot { width: 52px; height: 52px; }
.ufc-corner { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text); text-decoration: none; }
.ufc-corner.right { justify-content: flex-end; text-align: right; }
.ufc-corner:hover .ufc-name { text-decoration: underline; }
.ufc-ctext { display: flex; flex-direction: column; min-width: 0; }
.ufc-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }
.ufc-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ufc-pct { color: var(--text); font: 750 15px/1.3 var(--font-display); }
.ufc-tags { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.ufc-tags:empty { display: none; }
.ufc-tags .pill { font-size: 10px; padding: 1px 6px; margin-bottom: 2px; }
.ufc-pill-main { background: var(--accent); color: var(--accent-ink); }
.ufc-pill-title { border: 1px solid var(--accent); background: none; color: var(--accent); }
.ufc-lost { opacity: .55; }
.ufc-fight .result { gap: 8px; }
.ufc-fight .result span:last-child { text-align: right; }

/* ranking table */
.ufc-ratings .team-cell > span { display: flex; flex-direction: column; min-width: 0; }
.ufc-link { color: var(--text); text-decoration: none; font-weight: 600; }
.ufc-link:hover { text-decoration: underline; }
.ufc-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* fighter page */
.ufc-back { margin: 24px 0 0; font-size: 14px; font-weight: 600; }
.ufc-back a { text-decoration: none; }
.ufc-back a:hover { text-decoration: underline; }
.ufc-hero { padding-top: 12px; }
.ufc-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.ufc-id h1 { overflow-wrap: anywhere; }
.ufc-h2h { margin-bottom: 10px; }
.ufc-h2h-label { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.ufc-h2h input[type="search"] { width: 260px; max-width: 100%; }
.ufc-h2h-res { margin-bottom: 8px; }
.ufc-log td { vertical-align: top; }
.ufc-res { display: inline-grid; place-items: center; min-width: 24px; height: 22px; border-radius: 6px; font-weight: 750; font-size: 12px; background: var(--surface-3); color: var(--text-2); }
.ufc-res.won { color: var(--good-text); background: var(--good-soft); }
.ufc-res.upset { color: var(--critical); background: var(--critical-soft); }
.ufc-show-sm { display: none; }

@media (max-width: 640px) {
  .ufc-show-sm { display: block; }
  .ufc-fight { padding: 8px; gap: 6px; }
  .ufc-shot { width: 30px; height: 30px; }
  .ufc-name { font-size: 13px; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
  .ufc-rec { display: none; }
  .ufc-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; max-width: calc(100% + 32px); }
  .ufc-chips .chip { flex: none; }
  .card-head > .ufc-chips { width: calc(100% + 32px); }
  .ufc-id .ufc-shot.xl { width: 64px; height: 64px; }
  .ufc-fight.main .ufc-shot { width: 40px; height: 40px; }
  .ufc-hero h1 { font-size: 24px; }
  .ufc-hero .stat { min-width: 0; flex: 1 1 40%; }
  .ufc-log { font-size: 13px; }
  .ufc-log td:last-child small { display: block; }
  .ufc-logwrap { margin: 0 -8px; }
  .ufc-log td, .ufc-log th { padding-left: 4px; padding-right: 4px; }
}
@media (max-width: 420px) {
  .ufc-corner .ufc-shot { display: none; }
}

.ufc-grid > * { min-width: 0; }
.ufc-tv { border-top: 0; padding: 0 0 8px; }
