/* Kit contents drawn as an in-game inventory by /kits-inventory.js from /data/kits.json. Shared by /kits.html and the gold
   rank pages (ranks/vipgold.html, veterangold.html, championgold.html). Each grid is <div class="kt-inv" data-kit="...">,
   a direct child of a .kt-card (.kt-rank or .kt-gold sets the tier frame); html.kt-js comes from a one-line head script. */
/* ===== the inventory panel, art in /images/kits/ =====
   Gunmetal panel in a riveted steel frame, steel label bands, thin steel slots. Tiers: gold hairline corners on VIP and
   Veteran; the engraved gold frame, gold slots and a soft glow on the Gold tiers. */
.kt-inv { display: none; }
.kt-js .kt-card:not(.kt-shot) > .kt-img-wrap { display: none; }
.kt-js .kt-card:not(.kt-shot) > .kt-inv { display: block; }
.kt-inv, .kt-both {
  position: relative;
  padding: 1.45rem 1.45rem 1.4rem;
  background: #1b1f26 url(/images/kits/kit-panel-gunmetal.png) 0 0 / 256px 256px repeat;
  border-bottom: 1px solid var(--line);
}
.kt-inv { min-height: 9.5rem; }
.kt-inv[data-ready] { min-height: 0; }
/* riveted steel frame (9-slice) */
.kt-inv::before, .kt-both::before {
  content: ""; position: absolute; inset: 0;
  border: 14px solid transparent;
  border-image: url(/images/kits/kit-frame-steel.png) 48 / 14px round;
  pointer-events: none;
}
/* tier overlay: gold hairline corners (VIP, Veteran), engraved gold frame (Gold tiers) */
.kt-rank .kt-inv::after {
  content: ""; position: absolute; inset: 17px;
  background:
    url(/images/kits/kit-corner-hairline.svg) left top / 12px 12px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c84a' stroke-width='1.5' stroke-linecap='square'%3E%3Cg transform='matrix(-1 0 0 1 24 0)'%3E%3Cpath d='M1 22V1H22'/%3E%3Cpath d='M5 13V5H13'/%3E%3C/g%3E%3C/svg%3E") right top / 12px 12px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c84a' stroke-width='1.5' stroke-linecap='square'%3E%3Cg transform='matrix(1 0 0 -1 0 24)'%3E%3Cpath d='M1 22V1H22'/%3E%3Cpath d='M5 13V5H13'/%3E%3C/g%3E%3C/svg%3E") left bottom / 12px 12px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c84a' stroke-width='1.5' stroke-linecap='square'%3E%3Cg transform='matrix(-1 0 0 -1 24 24)'%3E%3Cpath d='M1 22V1H22'/%3E%3Cpath d='M5 13V5H13'/%3E%3C/g%3E%3C/svg%3E") right bottom / 12px 12px no-repeat;
  opacity: 0.85;
  pointer-events: none;
}
.kt-gold .kt-inv::after, .kt-gold .kt-both::after {
  content: ""; position: absolute; inset: 0;
  border: 18px solid transparent;
  border-image: url(/images/kits/kit-frame-gold.png) 60 / 18px round;
  filter: drop-shadow(0 0 6px rgba(230,200,74,0.28));
  pointer-events: none;
}
.kt-cont { position: relative; z-index: 1; }
/* the row holding the hovered or focused slot paints above the rows below it, so its name tooltip is never covered */
.kt-cont:has(.kt-full:hover), .kt-cont:has(.kt-full:focus) { z-index: 5; }
.kt-cont + .kt-cont { margin-top: 0.65rem; }
/* steel label band (3-slice) */
.kt-cont-label {
  display: flex; align-items: center;
  height: 24px;
  margin: 0 0 0.4rem;
  border-style: solid; border-width: 0 27px;
  border-image: url(/images/kits/kit-band-steel.png) 0 64 fill / 0 27px stretch;
  font: 700 0.62rem/1 "Inter", sans-serif; letter-spacing: 0.18em; text-transform: uppercase;
  color: #d4d8df;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}
.kt-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.3rem; }
.kt-wear .kt-slots { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kt-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 4px;
  background: url(/images/kits/kit-slot.png) center / 100% 100% no-repeat;
}
.kt-gold .kt-slot { background-image: url(/images/kits/kit-slot-gold.png); }
.kt-full {
  background-image: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.07), transparent 70%), url(/images/kits/kit-slot.png);
  outline: none;
  cursor: default;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kt-gold .kt-full { background-image: radial-gradient(circle at 50% 45%, rgba(255,230,150,0.08), transparent 70%), url(/images/kits/kit-slot-gold.png); }
.kt-full img {
  position: absolute; left: 11%; top: 11%;
  width: 78%; height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.55));
}
.kt-amt {
  position: absolute; right: 0.24rem; bottom: 0.16rem;
  font: 800 0.7rem/1 "Inter", sans-serif;
  color: #ebe7dc;
  text-shadow: 0 1px 2px #000, 0 0 4px rgba(0,0,0,0.9);
  pointer-events: none;
}
.kt-key {
  position: absolute; left: 0.28rem; top: 0.22rem;
  font: 700 0.58rem/1 "Inter", sans-serif;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
}
.kt-full:hover, .kt-full:focus-visible {
  z-index: 3;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5), 0 0 10px rgba(205,212,224,0.12);
}
.kt-full:focus-visible { outline: 2px solid #e6c84a; outline-offset: 1px; }
.kt-rank .kt-full:hover, .kt-rank .kt-full:focus-visible { box-shadow: 0 6px 12px rgba(0,0,0,0.5), 0 0 10px rgba(230,200,74,0.18); }
.kt-gold .kt-full:hover, .kt-gold .kt-full:focus-visible { box-shadow: 0 6px 12px rgba(0,0,0,0.5), 0 0 14px rgba(230,200,74,0.32); }
/* a skinned item: small corner mark */
.kt-skinned::before {
  content: ""; position: absolute; top: 2px; right: 2px; width: 0.5rem; height: 0.5rem;
  border-radius: 0 3px 0 0;
  background: linear-gradient(225deg, #e6c84a 50%, transparent 50%);
  pointer-events: none;
}
/* the item name, under the slot */
.kt-full[data-name]:hover::after, .kt-full[data-name]:focus::after {
  content: attr(data-name);
  position: absolute; top: calc(100% + 0.35rem); left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
  font: 600 0.74rem/1.2 "Inter", sans-serif;
  color: var(--text);
  background: #0b0d11;
  border: 1px solid rgba(205,212,224,0.22);
  border-radius: 5px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  pointer-events: none;
}
.kt-slots > .kt-full:nth-child(6n+1)[data-name]:is(:hover, :focus)::after,
.kt-slots > .kt-full:nth-child(6n+2)[data-name]:is(:hover, :focus)::after { left: 0; transform: none; }
.kt-slots > .kt-full:nth-child(6n)[data-name]:is(:hover, :focus)::after,
.kt-slots > .kt-full:nth-child(6n+5)[data-name]:is(:hover, :focus)::after { left: auto; right: 0; transform: none; }
.kt-wear .kt-slots > .kt-full[data-name]:is(:hover, :focus)::after { left: 50%; right: auto; transform: translateX(-50%); }
.kt-wear .kt-slots > .kt-full:nth-child(-n+2)[data-name]:is(:hover, :focus)::after { left: 0; transform: none; }
.kt-wear .kt-slots > .kt-full:nth-child(n+6)[data-name]:is(:hover, :focus)::after { left: auto; right: 0; transform: none; }
.kt-card:has(.kt-full:hover), .kt-card:has(.kt-full:focus) { overflow: visible; z-index: 2; }
/* slots settle in when the card scrolls in */
@keyframes kt-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.kt-card.is-in .kt-inv[data-ready] .kt-full { animation: kt-in 0.3s ease-out backwards; animation-delay: calc(var(--i) * 22ms); }
/* Champion Gold: both Gold daily kits, joined by the gold crest */
.kt-both { display: flex; align-items: stretch; justify-content: center; gap: 0.6rem; min-height: 9.5rem; }
.kt-both-kit {
  position: relative; z-index: 1;
  flex: 1; max-width: 9.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  padding: 0.9rem 0.5rem;
  text-align: center; text-decoration: none;
  border-radius: 4px;
  background: url(/images/kits/kit-slot-gold.png) center / 100% 100% no-repeat;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kt-both-kit:hover, .kt-both-kit:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0,0,0,0.5), 0 0 14px rgba(230,200,74,0.32); }
.kt-both-name { font: 700 0.95rem/1.2 "Cinzel", serif; letter-spacing: 0.04em; color: var(--rk-accent-bright); }
.kt-both-sub { font: 600 0.68rem/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.kt-both-plus {
  position: relative; z-index: 1;
  flex: none; display: grid; place-items: center; align-self: center;
  width: 3.4rem; height: 3.4rem;
  background: url(/images/kits/kit-crest-gold.png) center / contain no-repeat;
  font: 800 1.3rem/1 "Inter", sans-serif; color: #2a2108;
  filter: drop-shadow(0 0 8px rgba(230,200,74,0.3));
}
@media (prefers-reduced-motion: reduce) {
  .kt-card.is-in .kt-inv[data-ready] .kt-full { animation: none; }
  .kt-full, .kt-both-kit { transition: none; }
}
