/* kgc styles: points — /ultimatePower, /mightiestKingdom, /spiritInvasion, /equip, /summonAltar, /actionPoints
 * (kgc-pages-points.js). Class prefix: .kgc-pt-  Reuses the core palette variables of #kgc-app. */

/* conditional blocks (`cond && <X/>`): no box, so an empty one takes no gap in a flex parent */
.kgc-pt-contents { display: contents; }
.kgc-pt-a { color: var(--kgc-accent); text-decoration: underline; text-underline-offset: 2px; }
.kgc-pt-a:hover { text-decoration-thickness: 2px; }
.kgc-pt-space-md { height: 16px; flex: 0 0 auto; }
/* width:0 + min-width:100% = fills its container but adds no min-content width (the site grid item has min-width:auto) */
.kgc-pt-xs { width: 0; min-width: 100%; }
.kgc-pt-mt16 { margin-top: 16px; }
.kgc-pt-ink { color: var(--kgc-ink); }
/* text colours that also win over the site rule `.frame p { color: var(--navy) }` */
#kgc-app .kgc-pt-purple { color: #9c36b5; }
#kgc-app .kgc-pt-red { color: var(--kgc-red); }
#kgc-app .kgc-pt-green { color: var(--kgc-green); }
#kgc-app .kgc-pt-purple .kgc-pt-ink, #kgc-app .kgc-pt-red .kgc-pt-ink { color: var(--kgc-ink); }
.kgc-pt-lg { font-size: 18px; }
#kgc-app .kgc-grid2.kgc-pt-gap-xs { gap: 10px; } /* SimpleGrid spacing="xs" */

/* SimpleGrid cols=2 / cols=3 with verticalSpacing="xs" */
.kgc-pt-cols2, .kgc-pt-cols3 { display: grid; column-gap: 16px; row-gap: 10px; align-items: start; }
.kgc-pt-cols2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kgc-pt-cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kgc-pt-cols3 .kgc-param-big { min-width: 0; }
.kgc-pt-cols3 .kgc-param-big .kgc-ni { max-width: min(140px, 100%) !important; }

/* ---------- /spiritInvasion ---------- */
#kgc-app .kgc-fieldset.kgc-pt-si-form { min-width: min(300px, 100%); }
.kgc-pt-si-sum { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.kgc-pt-si-cols { display: flex; flex-wrap: wrap; gap: 32px; padding: 8px; }
.kgc-pt-si-cols > .kgc-stack { min-width: 0; }
.kgc-pt-vdiv { align-self: stretch; width: 0; border-left: 1px solid var(--kgc-line); }
.kgc-pt-si-row { display: flex; gap: 4px; align-items: baseline; }
.kgc-pt-si-row > .kgc-fw700 { white-space: nowrap; flex: 0 0 auto; }
.kgc-pt-si-table td { white-space: nowrap; }
.kgc-pt-si-tw { max-width: 600px; }
.kgc-pt-si-table td.is-r, .kgc-pt-si-table th.is-r { text-align: right; }
.kgc-pt-si-table tr.is-elite td { background: #b98abf; }
.kgc-pt-si-table tr.is-boss td { background: #cc747c; }
.kgc-pt-si-table tr.is-elite td, .kgc-pt-si-table tr.is-boss td { border-color: rgba(60, 20, 60, 0.18); }

/* ---------- /equip ---------- */
/* Grid: Col span {xs:12, xl:5} + Col span {xs:12, xl:7}, gutter md */
.kgc-pt-eq-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 88em) { .kgc-pt-eq-form { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.kgc-pt-maw400 { max-width: 400px; }
.kgc-pt-eq-list { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; flex: 1 1 auto; }
.kgc-pt-eq-scroll { height: 304px; overflow-y: auto; border: 1px solid var(--kgc-line-soft); border-radius: 10px; background: rgba(255, 255, 255, 0.45); }
.kgc-pt-eq-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
@media (min-width: 48em) { .kgc-pt-eq-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kgc-pt-eq-card { display: flex; align-items: center; flex-wrap: nowrap; gap: 16px; min-width: 0; }
.kgc-pt-eq-info { display: flex; flex-direction: column; flex: 1 1 auto; width: 226px; min-width: 0; line-height: 1.4; }
.kgc-pt-trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kgc-pt-dim { color: var(--kgc-mute); font-size: 12px; }
.kgc-pt-eq-act { display: flex; gap: 16px; flex: 0 0 auto; }
.kgc-pt-ai { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px;
  background: var(--kgc-accent); color: #fff; cursor: pointer; flex: 0 0 auto; transition: filter .1s ease, transform .1s ease; }
.kgc-pt-ai:hover { filter: brightness(1.08); }
.kgc-pt-ai:active { transform: translateY(1px); }
.kgc-pt-ai svg { width: 18px; height: 18px; }

/* equip icon (kgcalc `xs`): weapon on the rank background + element badge */
.kgc-pt-eq-ic { position: relative; display: inline-flex; flex: 0 0 auto; padding: 0; margin: 0; border: 0; background: none; border-radius: 6px; vertical-align: middle; }
button.kgc-pt-eq-ic { cursor: pointer; }
.kgc-pt-eq-ic > .kgc-ic:first-child { width: 100%; height: 100%; }
#kgc-app .kgc-pt-eq-ic .kgc-ic.kgc-pt-eq-el, .kgc-modal .kgc-pt-eq-ic .kgc-ic.kgc-pt-eq-el { position: absolute; top: -8%; left: -8%; z-index: 3; }
.kgc-pt-eq-ic.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--kgc-accent, #1f6fe0); }
button.kgc-pt-eq-ic:focus-visible { outline: 2px solid var(--kgc-accent, #1f6fe0); outline-offset: 2px; }

/* modals (centered, Stack align="center") */
.kgc-modal-root.kgc-pt-centered { align-items: center; padding-top: 12px; }
.kgc-pt-modal { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 4px; }
.kgc-pt-modal .kgc-field { width: 220px; max-width: 100%; }
.kgc-pt-modal-foot { display: flex; justify-content: flex-end; }
.kgc-pt-modal-q { display: flex; flex-direction: column; gap: 16px; }
.kgc-pt-modal-q .kgc-pt-modal-foot { align-self: stretch; }

/* upgraded list: SimpleGrid cols {xs:1, sm:2, md:3, lg:1, xl:2} */
.kgc-pt-upg { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 48em) { .kgc-pt-upg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62em) { .kgc-pt-upg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 75em) { .kgc-pt-upg { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 88em) { .kgc-pt-upg { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kgc-pt-upg .kgc-group { font-variant-numeric: tabular-nums; }

/* ---------- /actionPoints ---------- */
.kgc-pt-ap-form { max-width: 600px; }
.kgc-pt-ap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.kgc-pt-ap-grid .kgc-res { min-width: 0; }
.kgc-pt-ap-grid .kgc-res .kgc-ni { max-width: 100%; }
.kgc-pt-ap-table td { white-space: nowrap; }
.kgc-pt-hero { border-radius: 8px; overflow: hidden; }
@media (max-width: 480px) {
  .kgc-pt-ap-grid { gap: 10px; }
  .kgc-pt-si-cols { gap: 16px; padding: 0; }
  .kgc-pt-vdiv { display: none; }
}

/* ours: the current AP from the game on the AP calculator */
.kgc-pt-ap-current { max-width: 280px; }
.kgc-pt-ap-note { font-size: 14px; color: var(--kgc-mute); }
