/* Card de mesa (mesas abertas) — 138×87, header/footer 16px, corpo com gradiente + textura */
/* --open-table-mid-texture: definido em tables/index (image_path, Propshaft). */

.open-table-card {
  display: block;
  width: 138px;
  height: 87px;
  opacity: 1;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.open-table-card__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 138px;
  height: 87px;
  border-radius: 16px;
  /* visible: ilustração pode vazar à esquerda (2.º print); cantos vêm do header/mid/footer */
  overflow: visible;
  box-sizing: border-box;
  font-family: var(
    --cx-font-sans,
    "Inter",
    "Roboto",
    ui-sans-serif,
    system-ui,
    sans-serif
  );
  isolation: isolate;
}

/* Faixas header + footer (gradiente horizontal Figma) */
.open-table-card__header,
.open-table-card__footer {
  flex-shrink: 0;
  width: 138px;
  height: 16px;
  box-sizing: border-box;
  background: linear-gradient(
    90deg,
    rgba(3, 243, 235, 0.8) 0%,
    rgba(236, 114, 161, 0.8) 100%
  );
}

.open-table-card__header {
  display: flex;
  align-items: center;
  justify-content: center;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  position: relative;
  z-index: 3;
  overflow: hidden;
}

.open-table-card__footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px 0 22px;
  line-height: 0;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  position: relative;
  /* Acima da ilustração 3D (z-index 5), que vinha por cima do footer e “vazava” */
  z-index: 8;
  overflow: hidden;
  min-height: 16px;
  max-height: 16px;
  box-sizing: border-box;
}

/* IP + pin + ET: alinhamento vertical único */
.open-table-card__footer-mid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-shrink: 0;
  line-height: 0;
  max-height: 14px;
  overflow: hidden;
}

/* Células que prendem cada SVG à faixa de 16px (sem bleed / anti-alias para fora) */
.open-table-card__fwrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  line-height: 0;
  box-sizing: border-box;
}

.open-table-card__fwrap--crown {
  width: 13px;
  height: 9px;
}

.open-table-card__fwrap--ip {
  width: 12px;
  height: 9px;
}

.open-table-card__fwrap--pin {
  width: 11px;
  height: 11px;
}

.open-table-card__fwrap--et {
  width: 16px;
  height: 9px;
}

.open-table-card__fwrap--rt {
  width: 17px;
  height: 9px;
}

.open-table-card__footer-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Corpo (tudo que não é header nem footer) */
.open-table-card__mid {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px 0 0;
  box-sizing: border-box;
  overflow: hidden;
  /* Mesmo gradiente ciano → rosa → azul, translúcido sobre PNG halftone */
  background-color: #121c3a;
  background-image:
    linear-gradient(
      180deg,
      rgba(3, 243, 235, 0.62) 0%,
      rgba(236, 114, 161, 0.58) 48.56%,
      rgba(91, 135, 232, 0.66) 100%
    ),
    var(--open-table-mid-texture, none);
  background-size: auto, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.open-table-card--disabled .open-table-card__mid {
  background: linear-gradient(180deg, #e8e8e8 0%, #b8b8b8 45%, #9ca3af 100%);
}

.open-table-card--disabled .open-table-card__header,
.open-table-card--disabled .open-table-card__footer {
  background: linear-gradient(
    90deg,
    rgba(200, 200, 200, 0.88) 0%,
    rgba(150, 150, 150, 0.88) 100%
  );
}

.open-table-card__id {
  margin: 0;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  color: #000000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Ilustração: por cima do corpo e do footer (2.º print); pills/meta ficam acima (z-index maior) */
.open-table-card__art {
  position: absolute;
  left: -19px;
  bottom: 4px;
  width: 98px;
  height: 100px;
  /* A arte precisa “flutuar” sobre o card (efeito 3D) */
  z-index: 9;
  pointer-events: none;
}

.open-table-card__chips {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 81px;
  height: 84px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: left bottom;
  display: block;
  opacity: 1;
  transform-origin: 42% 88%;
  transform: perspective(240px) rotateY(-16deg) rotateZ(-2.5deg)
    translateY(-3px);
  /* Sombras sutis para dar volume sem “halo” */
  filter: drop-shadow(0 1px 2px rgba(3, 18, 7, 0.38))
    drop-shadow(4px 10px 14px rgba(3, 18, 7, 0.22))
    drop-shadow(0 6px 14px rgba(91, 135, 232, 0.22))
    drop-shadow(-3px 2px 10px rgba(3, 243, 235, 0.14));
}

.open-table-card--disabled .open-table-card__chips {
  transform: perspective(260px) rotateY(-8deg) rotateZ(-1deg) translateY(-1px);
  filter: grayscale(1) brightness(1.06);
}

.open-table-card__meta {
  position: relative;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  align-items: flex-end;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.open-table-card__pill {
  display: inline-flex;
  flex-direction: row;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 0 4px 0 5px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
}

.open-table-card--disabled .open-table-card__pill {
  background: rgba(123, 123, 123, 0.35);
  border-color: rgba(3, 18, 7, 0.06);
}

.open-table-card__pill-text {
  flex-shrink: 0;
  font-size: 0.4375rem;
  font-weight: 800;
  color: #031207;
  line-height: 1;
  white-space: nowrap;
}

.open-table-card__icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

/* Arte 3D do 2.º print (Pessoas.svg / Moeda.svg) — cabem na coluna sem cortar */
.open-table-card__icon--people {
  width: auto;
  height: 14px;
  max-width: 28px;
}

.open-table-card__icon--coin {
  width: auto;
  height: 14px;
  max-width: 22px;
}

.open-table-card--disabled .open-table-card__icon {
  opacity: 0.85;
  filter: grayscale(0.3);
}

.open-table-card__points {
  margin: 0;
  flex-shrink: 0;
  padding: 0 4px;
  border-radius: 9999px;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  color: #031207;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.3);
  align-self: flex-end;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
}

.open-table-card--disabled .open-table-card__points {
  background: rgba(232, 232, 232, 0.9);
}

/* Footer: dimensões = viewBox dos SVG (IP/ET/RT 9px altura), pin contido no slot 11×11 */
.open-table-card__fimg {
  flex-shrink: 0;
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.open-table-card__fimg--crown {
  width: 13px;
  height: 9px;
}

.open-table-card__fimg--ip {
  width: 12px;
  height: 9px;
}

.open-table-card__fimg--pin {
  width: 7px;
  height: 10px;
}

.open-table-card__fimg--et {
  width: 16px;
  height: 9px;
}

.open-table-card__fimg--rt {
  width: 17px;
  height: 9px;
}

.open-table-card--disabled .open-table-card__fimg {
  opacity: 0.92;
  filter: grayscale(0.15);
}
