/* CodePay Blocks UI v3 – classes cp-* usadas pelo JS */
:root {
  --cp-bg: #0b1220;
  --cp-bg2: #141b2e;
  --cp-grad1: #7c3aed;
  --cp-grad2: #06b6d4;
  --cp-grad3: #22c55e;
  --cp-text: #e5e7eb;
  --cp-muted: #9ca3af;
  --cp-border: #d1d5db;
  --cp-focus: rgba(6,182,212,.35);
}

/* ── Wrapper ── */
.cp-cc { margin: 12px 0 4px; }
.cp-desc { color: #4b5563; margin: .25rem 0 .75rem; }

/* ── Cartão 3D ── */
.cp-card {
  width: 100%; max-width: 460px; aspect-ratio: 16/10;
  border-radius: 20px; position: relative;
  perspective: 1200px; margin: 0 0 16px;
}
.cp-card__inner {
  position: absolute; inset: 0; border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2,.6,.2,1);
}
.cp-card.flipped .cp-card__inner { transform: rotateY(180deg); }

.cp-card__face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: inherit; padding: 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--cp-text);
  background:
    radial-gradient(1200px 300px at -20% -20%, color-mix(in oklab, var(--cp-grad2) 35%, transparent), transparent),
    radial-gradient(1200px 450px at 120% 120%, color-mix(in oklab, var(--cp-grad3) 35%, transparent), transparent),
    linear-gradient(160deg, var(--cp-bg), var(--cp-bg2));
  box-shadow: 0 16px 36px rgba(3,7,18,.35), inset 0 0 0 1px rgba(255,255,255,.06);
}
.cp-card__face.back { transform: rotateY(180deg); }

.cp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cp-row.top { align-items: flex-start; }

.cp-chip {
  width: 48px; height: 36px; border-radius: 8px;
  background: linear-gradient(180deg, #d1d5db, #9ca3af);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.cp-brand {
  width: 54px; height: 34px; object-fit: contain;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.25));
}
.cp-number {
  letter-spacing: 2.2px; font-size: 22px; font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.cp-meta { font-size: 12px; color: var(--cp-muted); text-transform: uppercase; letter-spacing: .08em; }
.cp-holder, .cp-exp { font-size: 14px; font-weight: 700; }

/* ── Verso ── */
.cp-strip { height: 44px; background: #111827; margin: 18px -22px 16px; }
.cp-cvv { display: flex; flex-direction: column; align-items: flex-end; padding-right: 8px; }
.cp-cvv-box {
  background: #fff; color: #111827; border-radius: 6px;
  padding: 8px 12px; min-width: 138px; text-align: center;
  font-weight: 800; letter-spacing: .18em;
}

/* ── Brilho animado ── */
@keyframes cp-shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.cp-shine { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.cp-shine::after {
  content: ""; position: absolute; top: 0; left: 0; width: 38%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.15), transparent);
  transform: translateX(-100%); animation: cp-shimmer 3.8s infinite ease-in-out;
}

/* ── Bandeiras ── */
.cp-brands { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 12px; }
.cp-brands img { height: 24px; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* ── Grid de campos ── */
.cp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cp-grid .full { grid-column: 1 / -1; }

.cp-field label { display: block; margin: 6px 0; font-weight: 700; color: #111827; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.cp-field .req { color: #ef4444; margin-left: 2px; }

.cp-input, .cp-select {
  width: 100%; border: 1px solid var(--cp-border); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; background: #fff;
  transition: box-shadow .15s, transform .05s;
}
.cp-input:focus, .cp-select:focus { outline: none; box-shadow: 0 0 0 4px var(--cp-focus); }
.cp-input::placeholder { color: #9ca3af; }

/* ── Responsivo ── */
@media (max-width: 560px) {
  .cp-grid { grid-template-columns: 1fr; }
  .cp-card { max-width: 100%; }
}
