/* ============================================================
   COMP ENTRY — comp thumbnail in tier row
   Hex-cropped champion icons (TFT-native shape, like tactics.tools)
   ============================================================ */

.comp-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  background: transparent;
  transition: transform var(--dur-fast) var(--ease-out-quart);
  flex-shrink: 0;
  user-select: none;
  position: relative;
}

.comp-entry:hover {
  transform: translateY(-2px);
}

.comp-entry:focus-visible {
  outline: 2px solid var(--tier-color, var(--color-amber));
  outline-offset: 3px;
  border-radius: 4px;
}

.comp-entry:hover .comp-champ-icon {
  filter:
    drop-shadow(0 2px 6px oklch(0% 0 0 / 0.5))
    drop-shadow(0 0 8px oklch(from var(--tier-color, var(--color-amber)) l c h / 0.6));
}

.comp-entry.active .comp-champ-icon {
  filter:
    drop-shadow(0 2px 6px oklch(0% 0 0 / 0.5))
    drop-shadow(0 0 12px oklch(from var(--tier-color, var(--color-amber)) l c h / 0.8));
}

/* Carry label — small uppercase identifier above icons */
.comp-carry-label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(from var(--tier-color, var(--color-amber)) l c h / 0.85);
  line-height: 1;
  text-shadow: 0 0 8px oklch(from var(--tier-color, var(--color-amber)) l c h / 0.4);
}

/* Champion icon row — single carry champion, prominently sized */
.comp-icon-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
}

.comp-champ-icon.large {
  width: 100px;
  height: 114px;
}

/* Hex-cropped champion icon — pointy-top (TFT native) */
.comp-champ-icon {
  width: 38px;
  height: 44px;
  position: relative;
  flex-shrink: 0;
  /* Outer hex = cost-colored frame */
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(
    155deg,
    var(--cost-color, var(--cost-1-color)),
    oklch(from var(--cost-color, var(--cost-1-color)) calc(l - 0.15) c h)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px oklch(0% 0 0 / 0.5));
  transition: transform var(--dur-fast) var(--ease-out-quart);
}

/* Inner image is inset 5px on all sides, hex-clipped — thicker cost-color border */
.comp-champ-icon img {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: cover;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--color-surface);
}

/* Fallback when icon fails to load */
.comp-champ-icon.fallback {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: oklch(95% 0.02 75);
  text-shadow: 0 1px 2px oklch(0% 0 0 / 0.7);
}

.comp-entry:hover .comp-champ-icon {
  transform: translateY(-1px);
}

/* Cost color tokens — drives both the outer hex frame and any glow */
.comp-champ-icon[data-cost="1"] { --cost-color: var(--cost-1-color); }
.comp-champ-icon[data-cost="2"] { --cost-color: var(--cost-2-color); }
.comp-champ-icon[data-cost="3"] { --cost-color: var(--cost-3-color); }
.comp-champ-icon[data-cost="4"] { --cost-color: var(--cost-4-color); }
.comp-champ-icon[data-cost="5"] {
  --cost-color: var(--cost-5-color);
  filter:
    drop-shadow(0 1px 3px oklch(0% 0 0 / 0.5))
    drop-shadow(0 0 5px oklch(85% 0.14 85 / 0.55));
}

/* Comp name — readable, slightly warm */
.comp-name {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  color: oklch(86% 0.025 75);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
  transition: color var(--dur-fast) var(--ease-out-quart);
}

.comp-entry:hover .comp-name {
  color: var(--color-gold);
}

.comp-entry.active .comp-name {
  color: oklch(from var(--tier-color, var(--color-amber)) 92% 0.14 h);
  text-shadow: 0 0 8px oklch(from var(--tier-color, var(--color-amber)) l c h / 0.5);
}
