/* checkout embutido: modal de pagamento (Pix e cartão) */
.ck { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.ck[hidden], .ck [hidden] { display: none !important; }
.ck-bg { position: absolute; inset: 0; background: rgba(8, 3, 5, .78); backdrop-filter: blur(6px); }
.ck-box {
  position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; padding: 26px 24px 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55); animation: ck-in .25s ease-out;
}
@keyframes ck-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.ck-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .06); color: var(--soft); font-size: 22px; line-height: 1; cursor: pointer;
}
.ck-x:hover { background: rgba(255, 255, 255, .12); color: var(--text); }
.ck-head { display: flex; align-items: center; gap: 12px; margin: 0 40px 18px 0; }
.ck-head img { width: 44px; height: 62px; object-fit: cover; border-radius: 5px; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.ck-head p { margin: 0; font-size: 14px; color: var(--soft); line-height: 1.35; }
.ck-head b { display: block; font-size: 16px; }
.ck-head .ck-total { color: var(--pink-2); font-weight: 500; }

.ck form { display: grid; gap: 12px; }
.ck-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ck label { display: grid; gap: 5px; font-size: 13px; color: var(--soft); }
.ck input, .ck select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04); color: var(--text); font: inherit; font-size: 16px; font-weight: 400;
  transition: border-color .15s, background .15s;
}
.ck select option { background: var(--bg-2); }
.ck input:focus, .ck select:focus { outline: none; border-color: var(--pink); background: rgba(255, 255, 255, .07); }
.ck input.bad { border-color: #ff6b6b; }
.ck .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

.ck-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(255, 255, 255, .05); margin-top: 4px; }
.ck-tabs button {
  border: 0; border-radius: 10px; padding: 10px; background: none; color: var(--soft);
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
}
.ck-tabs button[aria-selected="true"] { background: var(--pink); color: #fff; }
.ck-tabs button[hidden] { display: none; }
.ck-tabs:has(button[hidden]) { grid-template-columns: 1fr; }

.ck-pane[hidden] { display: none; }
.ck-pane { display: grid; gap: 12px; }
.ck-note { margin: 0; font-size: 13px; color: var(--muted); }

/* cartão desenhado (vira para mostrar o CVV) */
.ck-card { perspective: 900px; height: 172px; margin: 4px auto 2px; width: min(290px, 100%); }
.ck-card-in { position: relative; height: 100%; transition: transform .6s; transform-style: preserve-3d; }
.ck-card.flip .ck-card-in { transform: rotateY(180deg); }
.ck-face {
  position: absolute; inset: 0; border-radius: 16px; padding: 18px 20px; backface-visibility: hidden;
  background: linear-gradient(135deg, #7e424e 0%, #c2566f 55%, #f2446b 100%);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45); color: #fff; overflow: hidden;
}
.ck-face::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -70px; top: -90px; background: rgba(255, 255, 255, .1); }
.ck-face.back { transform: rotateY(180deg); padding: 0; }
.ck-chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #f7d27a, #c99a3b); }
.ck-brand { position: absolute; top: 16px; right: 18px; font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; z-index: 1; }
.ck-num { margin-top: 26px; font-size: 19px; letter-spacing: .12em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ck-bottom { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 13px; text-transform: uppercase; }
.ck-bottom small { display: block; font-size: 9px; opacity: .7; letter-spacing: .08em; }
.ck-bottom span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.ck-strip { height: 40px; background: #1d0e14; margin-top: 22px; }
.ck-cvv { margin: 16px 20px 0; background: #fff; color: #222; border-radius: 6px; padding: 8px 12px; text-align: right; font-size: 15px; letter-spacing: .2em; }

.ck-pay {
  width: 100%; margin-top: 6px; border: 0; border-radius: 999px; padding: 15px 20px; cursor: pointer;
  background: var(--pink); color: #fff; font: inherit; font-size: 16px; font-weight: 600;
  transition: filter .15s, transform .15s;
}
.ck-pay:hover { filter: brightness(1.08); }
.ck-pay:active { transform: scale(.98); }
.ck-pay[disabled] { opacity: .6; cursor: wait; }
.ck-err { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 107, 107, .12); color: #ffb3b3; font-size: 14px; }
.ck-err[hidden] { display: none; }
.ck-safe { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.ck-safe svg { width: 14px; height: 14px; }

/* etapa do Pix */
.ck-timer { margin: 0; font-size: 14px; color: var(--soft); }
.ck-timer b { color: var(--pink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.ck-timer.fim { color: #ffb3b3; }
.ck-back { border: 0; background: none; color: var(--soft); font: inherit; font-size: 14px; cursor: pointer; padding: 6px 10px; border-radius: 8px; text-decoration: underline; text-underline-offset: 3px; }
.ck-back:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.ck-pix { text-align: center; display: grid; gap: 12px; justify-items: center; }
.ck-pix h3 { margin: 0; font-size: 21px; font-weight: 500; }
.ck-pix img { width: 220px; height: 220px; background: #fff; border-radius: 14px; padding: 10px; }
.ck-copy { display: flex; gap: 8px; width: 100%; }
.ck-copy input { font-size: 13px; color: var(--soft); }
.ck-copy button {
  flex: none; border: 1px solid var(--pink); background: none; color: var(--pink-2); border-radius: 12px;
  padding: 0 16px; font: inherit; font-weight: 500; cursor: pointer;
}
.ck-wait { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--soft); margin: 0; }
.ck-wait i { width: 10px; height: 10px; border-radius: 50%; background: var(--pink); animation: ck-pulse 1.2s infinite; }
@keyframes ck-pulse { 50% { opacity: .25; } }

@media (max-width: 420px) {
  .ck { padding: 0; align-items: end; }
  .ck-box { border-radius: 22px 22px 0 0; max-height: 94dvh; padding: 22px 16px 18px; }
  .ck-num { font-size: 17px; }
}
