/* ══════════════════════════════════════════════════════════════════
   checkout-layout.css — Freedom Checkout Transparente
   Layout e estrutura do modal de pagamento (Pix + Cartão)
   ══════════════════════════════════════════════════════════════════ */

/* ── Container e overlay ────────────────────────────────────────── */
#ck2-container {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;      /* bottom sheet em mobile */
  justify-content: center;
}

@media (min-width: 560px) {
  #ck2-container {
    align-items: center;      /* centralizado em telas maiores */
  }
}

.ck2-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 10001;
  animation: ck2-fadeIn 0.2s ease;
}

/* ── Modal ──────────────────────────────────────────────────────── */
.ck2-modal {
  position: relative;
  z-index: 10002;
  background: #1A1A1A;
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  max-height: 92vh;          /* fallback */
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
  animation: ck2-slideUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ck2-modal::-webkit-scrollbar { display: none; }

@media (min-width: 560px) {
  .ck2-modal {
    border-radius: 20px;
    max-height: 88vh;
    animation: ck2-fadeInScale 0.22s cubic-bezier(0.32, 0.72, 0, 1);
  }
}

/* ── Header ─────────────────────────────────────────────────────── */
.ck2-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: sticky;
  top: 0;
  background: #1A1A1A;
  z-index: 1;
}

.ck2-titulo {
  flex: 1;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
}

/* ── Body ───────────────────────────────────────────────────────── */
.ck2-body {
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Resumo do pedido ───────────────────────────────────────────── */
.ck2-resumo {
  background: #000000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ck2-servico-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ck2-servico-nome {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

/* ── Valores ────────────────────────────────────────────────────── */
.ck2-valores {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ck2-valor-linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: #6B7A99;
}

.ck2-valor-linha span:last-child {
  font-weight: 600;
  color: #AAB4D6;
}

.ck2-divisor {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

.ck2-total {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #FFFFFF !important;
}

.ck2-total span {
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

/* ── Métodos de pagamento ───────────────────────────────────────── */
.ck2-metodos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Conteúdo dinâmico (Pix / Cartão / QR) ─────────────────────── */
#ck2-conteudo {
  /* sem altura mínima — deixa o conteúdo definir */
}

/* ── Passos Pix ─────────────────────────────────────────────────── */
.ck2-pix-info {
  background: #000000;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
}

.ck2-pix-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ck2-pix-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #AAB4D6;
  line-height: 1.4;
}

.ck2-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: #1A9EFF;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Formulário Cartão ──────────────────────────────────────────── */
.ck2-cartao-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ck2-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ck2-field label {
  font-size: 12px;
  font-weight: 600;
  color: #6B7A99;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.ck2-field input,
.ck2-field select {
  padding: 11px 14px;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 15px;
  color: #FFFFFF;
  background: #1A1A1A;
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.ck2-field input:focus,
.ck2-field select:focus {
  border-color: #1A9EFF;
  box-shadow: 0 0 0 3px rgba(26, 158, 255, 0.12);
}

.ck2-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Botão principal (Pagar) ────────────────────────────────────── */
.ck2-btn-pagar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  background: #1A9EFF;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  letter-spacing: 0.2px;
  -webkit-tap-highlight-color: transparent;
}

.ck2-btn-pagar:hover:not(:disabled) {
  background: #E84E15;
}

.ck2-btn-pagar:active:not(:disabled) {
  transform: scale(0.98);
}

.ck2-btn-pagar:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* ── Segurança ──────────────────────────────────────────────────── */
.ck2-seguro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #6B7A99;
  margin: 0;
  font-weight: 500;
}

/* ── Spinner ────────────────────────────────────────────────────── */
.ck2-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #1A9EFF;
  border-radius: 50%;
  animation: ck2-spin 0.7s linear infinite;
}

/* ── Animações ──────────────────────────────────────────────────── */
@keyframes ck2-slideUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes ck2-fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ck2-fadeInScale {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Aguardando ─────────────────────────────────────────────────── */
#ck2-aguardando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  color: #6B7A99;
  padding: 12px 0 4px;
  text-align: center;
  line-height: 1.5;
}
