/* 23/07/2026 05:09 - offcanvas checkout 50% estilo Stripe @filipemontt */

.ck-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  z-index: 100000;
}

.ck-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.ck-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  min-width: 420px;
  max-width: 640px;
  height: 100%;
  background: #fff;
  z-index: 100001;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -24px 0 64px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.ck-offcanvas.open {
  transform: translateX(0);
}

body.ck-open {
  overflow: hidden;
}

.ck-offcanvas-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px;
  border-bottom: 1px solid #e6e9ef;
  flex-shrink: 0;
  background: #fff;
}

.ck-offcanvas-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 650;
  color: #0a2540;
  letter-spacing: -0.02em;
}

.ck-offcanvas-brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
}

.ck-offcanvas-close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #f4f6f9;
  color: #425466;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.ck-offcanvas-close:hover {
  background: #e9eef5;
}

.ck-offcanvas-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.ck-offcanvas-loading {
  padding: 48px 28px;
  color: #697386;
  font-size: 14px;
  text-align: center;
}

/* ---- conteúdo Stripe-like ---- */
.checkout-wrap {
  --ck-ink: #0a2540;
  --ck-mute: #697386;
  --ck-line: #e6e9ef;
  --ck-accent: #635bff;
  --ck-accent-hover: #0a2540;
  --ck-surface: #f6f9fc;
  --ck-green: #0d9488;
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ck-ink);
  background: #fff;
}

.ck-inner {
  padding: 0 0 40px;
}

.ck-summary {
  background: var(--ck-surface);
  border-bottom: 1px solid var(--ck-line);
  padding: 28px 32px 26px;
}

.ck-summary-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ck-mute);
}

.ck-summary-amount {
  margin: 0 0 18px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--ck-ink);
}

.ck-summary-amount span {
  font-size: 16px;
  font-weight: 500;
  color: var(--ck-mute);
  letter-spacing: 0;
}

.ck-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ck-plan {
  text-align: left;
  border: 1px solid var(--ck-line);
  background: #fff;
  border-radius: 10px;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ck-plan:hover {
  border-color: #c7cdd6;
}

.ck-plan.active {
  border-color: var(--ck-accent);
  box-shadow: 0 0 0 1px var(--ck-accent);
}

.ck-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ck-plan-top strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-ink);
}

.ck-plan-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #c7cdd6;
  position: relative;
  background: #fff;
}

.ck-plan.active .ck-plan-radio {
  border-color: var(--ck-accent);
  background: var(--ck-accent);
}

.ck-plan.active .ck-plan-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #fff;
}

.ck-plan em {
  display: block;
  font-style: normal;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.ck-plan em span {
  font-size: 12px;
  font-weight: 500;
  color: var(--ck-mute);
}

.ck-plan small {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  color: var(--ck-mute);
}

.ck-form {
  padding: 28px 32px 0;
}

.ck-steps {
  display: flex;
  gap: 6px;
  margin: 0 0 24px;
}

.ck-step-dot {
  flex: 1;
  height: 2px;
  border-radius: 99px;
  background: #e6e9ef;
  overflow: hidden;
}

.ck-step-dot span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--ck-accent);
  transition: width 0.3s ease;
}

.ck-step-dot.active span,
.ck-step-dot.done span {
  width: 100%;
}

.ck-panel { display: none; }
.ck-panel.active {
  display: block;
  animation: ckFade 0.28s ease both;
}

@keyframes ckFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.ck-section-title {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ck-ink);
}

.ck-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.ck-field { margin: 0; }

.ck-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ck-field label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 500;
  color: #425466;
}

.ck-input,
.ck-field input.form-control {
  width: 100%;
  height: 44px;
  border: 1px solid #e0e6ed;
  border-radius: 8px !important;
  padding: 0 12px;
  font-size: 15px;
  color: var(--ck-ink);
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ck-input::placeholder { color: #a3acb9; }

.ck-input:focus,
.ck-field input.form-control:focus {
  border-color: var(--ck-accent);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15) !important;
  outline: none;
}

.ck-pay-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--ck-line);
  border-radius: 8px;
  overflow: hidden;
}

.ck-tab {
  border: none;
  background: #fff;
  padding: 12px 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}

.ck-tab + .ck-tab {
  border-left: 1px solid var(--ck-line);
}

.ck-tab.active {
  background: #f0efff;
}

.ck-tab strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ck-ink);
}

.ck-tab small {
  font-size: 11px;
  color: var(--ck-mute);
}

.ck-pay-block { margin-bottom: 4px; }

.ck-help {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ck-mute);
  line-height: 1.5;
}

.ck-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--ck-accent);
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08), 0 2px 5px rgba(99, 91, 255, 0.2);
}

.ck-btn:hover { background: #5851ea; }
.ck-btn:disabled { opacity: 0.55; cursor: wait; }

.ck-btn.accent {
  background: var(--ck-accent);
}

.ck-btn-ghost {
  background: transparent;
  border: none;
  color: var(--ck-mute);
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.ck-btn-ghost:hover { color: var(--ck-ink); }

.ck-btn-link { display: block; text-decoration: none; }

.ck-secure-box {
  min-height: 44px;
  border: 1px solid #e0e6ed;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.ck-pix-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.ck-pix-box img {
  width: 196px;
  height: 196px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--ck-line);
  padding: 10px;
  background: #fff;
}

.ck-copia {
  width: 100%;
  min-height: 84px;
  border-radius: 8px;
  border: 1px solid var(--ck-line);
  background: var(--ck-surface);
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ck-ink);
  resize: none;
}

.ck-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ck-mute);
  font-size: 13px;
}

.ck-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #ddd6fe;
  border-top-color: var(--ck-accent);
  border-radius: 50%;
  animation: ckSpin 0.7s linear infinite;
}

@keyframes ckSpin { to { transform: rotate(360deg); } }

.ck-success {
  text-align: center;
  padding: 12px 0;
}

.ck-success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #30b37c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
}

.ck-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: var(--ck-ink);
}

.ck-title-sm { font-size: 20px; }

.ck-sub {
  margin: 0 0 20px;
  color: var(--ck-mute);
  font-size: 14px;
  line-height: 1.5;
}

.ck-cred {
  text-align: left;
  margin: 0 0 20px;
  border: 1px solid var(--ck-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.ck-cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--ck-line);
  font-size: 13px;
}

.ck-cred-row:last-child { border-bottom: none; }
.ck-cred-row span { color: var(--ck-mute); }
.ck-cred-row code,
.ck-cred-row a {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--ck-ink);
  font-weight: 600;
  word-break: break-all;
  text-align: right;
}
.ck-cred-row a { color: var(--ck-accent); text-decoration: none; }

.ck-fail {
  text-align: center;
  padding: 16px 0;
}

.ck-fail h4 {
  margin: 0 0 8px;
  color: #df1b41;
  font-size: 18px;
  font-weight: 650;
}

.ck-footer-secure {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--ck-line);
  font-size: 12px;
  color: var(--ck-mute);
  text-align: center;
}

@media (max-width: 900px) {
  .ck-offcanvas {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .ck-summary,
  .ck-form { padding-left: 20px; padding-right: 20px; }
  .ck-plans { grid-template-columns: 1fr; }
  .ck-field-row { grid-template-columns: 1fr; }
  .ck-summary-amount { font-size: 30px; }
}
