/* Paldeck card content: identity, elements, stats, and work suitability. */

.paldeck-card-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.paldeck-card-identity {
  min-width: 0;
  width: 100%;
  display: grid;
  gap: .22rem;
}

.paldeck-card-kicker {
  min-width: 0;
  width: 100%;
  min-height: 1.16rem;
  display: flex;
  align-items: center;
  gap: .38rem;
}

.paldeck-card-name-row {
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: .42rem;
}

.paldeck-card-number {
  display: flex;
  align-items: center;
  color: #eaf3f4;
  font-size: .84rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .02em;
}

.paldeck-card-number b {
  display: block;
  color: #aababc;
  font-size: 1.16rem;
  font-weight: 420;
  line-height: 1;
  letter-spacing: .07em;
}

.paldeck-card-rarity {
  --rarity-color: #cbd5d6;
  display: inline-flex;
  align-items: center;
  min-height: 1.16rem;
  color: var(--rarity-color);
  font-size: .5rem;
  font-weight: 850;
  letter-spacing: .055em;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
  text-transform: uppercase;
  transform: translateY(.06rem);
  white-space: nowrap;
}

.paldeck-card-rarity[data-rarity="uncommon"] { --rarity-color: #75d77a; }
.paldeck-card-rarity[data-rarity="rare"] { --rarity-color: #52aef3; }
.paldeck-card-rarity[data-rarity="epic"] { --rarity-color: #c477ef; }
.paldeck-card-rarity[data-rarity="legendary"] { --rarity-color: #f3bc45; }

.paldeck-card-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 1.04rem;
  font-weight: 780;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paldeck-card-elements {
  position: static;
  z-index: 5;
  width: auto;
  min-height: 1.16rem;
  margin: 0 0 0 auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: nowrap;
  gap: .18rem;
  pointer-events: none;
  transform: translateY(.06rem);
}

.paldeck-card-element {
  --element-color: #d9d6ce;
  min-height: 1.16rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: .21rem;
  color: var(--element-color);
  border: 0;
  background: transparent;
  font-size: .6rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
}

.paldeck-card-element + .paldeck-card-element::before { margin-inline: .06rem .02rem; color: rgba(210, 226, 228, .42); content: "/"; }
.paldeck-card-element img { width: 1.02rem; height: 1.02rem; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.paldeck-card-element[data-element="Fire"] { --element-color: #ff7058; }
.paldeck-card-element[data-element="Water"] { --element-color: #55c5f3; }
.paldeck-card-element[data-element="Grass"] { --element-color: #83dc69; }
.paldeck-card-element[data-element="Electric"] { --element-color: #f2d957; }
.paldeck-card-element[data-element="Ice"] { --element-color: #81e7ef; }
.paldeck-card-element[data-element="Ground"] { --element-color: #dfa261; }
.paldeck-card-element[data-element="Dark"] { --element-color: #da78c4; }
.paldeck-card-element[data-element="Dragon"] { --element-color: #bc9af0; }

.paldeck-card-stats {
  order: 3;
  width: 100%;
  margin-top: 0;
  padding-top: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .1rem;
}

.paldeck-card-stat {
  --stat-color: #dce9ea;
  position: relative;
  min-width: 0;
  width: auto;
  min-height: 1.08rem;
  flex: 1 1 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  color: #f8fbfb;
  font-size: .56rem;
  line-height: 1;
}

.paldeck-card-stat-icon {
  position: absolute;
  z-index: 3;
  left: .24rem;
  width: .68rem;
  height: .68rem;
  display: grid;
  place-items: center;
  color: #f4f9f9;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .85));
  pointer-events: none;
}

.paldeck-card-stat-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.paldeck-card-stat-bar {
  position: relative;
  min-width: 0;
  height: 1.08rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: rgba(5, 14, 18, .82);
  box-shadow: inset 0 0 0 1px rgba(194, 222, 224, .1);
}

.paldeck-card-stat-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--stat-color);
  box-shadow: inset 0 1px rgba(255, 255, 255, .13);
}

.paldeck-card-stat-bar span {
  position: relative;
  z-index: 1;
  padding-left: 1.08rem;
  color: #fff;
  font-size: .61rem;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .85);
}

.paldeck-card-stat.is-hp { --stat-color: #2fc381; }
.paldeck-card-stat.is-attack { --stat-color: #dc7833; }
.paldeck-card-stat.is-defense { --stat-color: #359fd3; }

/* Final selected design: one continuous strip with transparent icon cells and matching forward-slash ends. */
.pal-card[data-stat-layout="continuous-strip"] {
  --stat-shape: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.pal-card[data-stat-layout="continuous-strip"] .paldeck-card-stats {
  gap: 0;
  overflow: hidden;
  background: transparent;
}

.pal-card[data-stat-layout="continuous-strip"] .paldeck-card-stat-bar,
.pal-card[data-stat-layout="continuous-strip"] .paldeck-card-stat-bar i {
  clip-path: var(--stat-shape);
}

/* Palworld-style fused strip: transparent icon cell directly joined to the colored value bar. */
.pal-card[data-stat-layout] .paldeck-card-stat {
  grid-template-columns: 1.12rem minmax(0, 1fr);
  grid-template-rows: 1.08rem;
  justify-items: stretch;
  gap: 0;
  background: transparent;
}

.pal-card[data-stat-layout] .paldeck-card-stat-icon {
  position: static;
  z-index: 3;
  grid-column: 1;
  grid-row: 1;
  justify-self: stretch;
  width: 1.12rem;
  height: 1.08rem;
  padding: .21rem;
  color: #f7fbfb;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .72));
  transform: none;
}

.pal-card[data-stat-layout] .paldeck-card-stat-bar {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.pal-card[data-stat-layout] .paldeck-card-stat-bar span {
  width: auto;
  padding: 0 0 0 .4rem;
  text-align: left;
}

.pal-card[data-stat-layout] .paldeck-card-stat-bar strong,
.pal-card[data-stat-layout] .paldeck-card-stat-bar small {
  font: inherit;
}

.pal-card[data-stat-layout] .paldeck-card-stat-bar small {
  opacity: .56;
}

.paldeck-card-works {
  order: 2;
  width: 100%;
  min-height: 1.5rem;
  margin-block: auto;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: .26rem;
}

.paldeck-card-work {
  width: auto;
  height: 1.42rem;
  display: inline-flex;
  align-items: center;
  gap: .1rem;
  color: #fff;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8));
}

.paldeck-card-work img { width: 1.24rem; height: 1.24rem; object-fit: contain; }
.paldeck-card-work b { min-width: .5rem; color: #dce9ea; font-size: .57rem; text-align: center; }

