/* ============================================
   Checkout popup — Binance Gift Card flow
   ============================================ */

.ckt-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 6, 10, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .2s ease;
}
.ckt-overlay.open { opacity: 1; }

.ckt-modal {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: #0c0d12;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
  transform: translateY(14px) scale(.98);
  transition: transform .22s ease;
}
.ckt-overlay.open .ckt-modal { transform: translateY(0) scale(1); }

.ckt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.ckt-head h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
}
.ckt-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: #9aa0ae;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ckt-close:hover { background: rgba(255, 255, 255, .1); color: #fff; }

/* Progress */
.ckt-progress {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: 1rem 1.25rem 0;
}
.ckt-progress-step {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  transition: background .25s;
}
.ckt-progress-step.done { background: #3b82f6; }

.ckt-body { padding: 1.25rem; }

.ckt-step-label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #3b82f6;
  margin: 0 0 .35rem;
}
.ckt-step-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

/* Summary card */
.ckt-summary {
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 12px;
  padding: .9rem 1rem;
  background: rgba(255, 255, 255, .025);
  margin-bottom: 1rem;
}
.ckt-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .3rem 0;
  font-size: .82rem;
  color: #9aa0ae;
}
.ckt-summary-row strong { color: #fff; font-weight: 500; }
.ckt-summary-row.total {
  margin-top: .35rem;
  padding-top: .65rem;
  border-top: 1px dashed rgba(255, 255, 255, .1);
}
.ckt-summary-row.total strong { font-size: 1rem; color: #3b82f6; }
.ckt-summary-row .ckt-credit { color: #34d399; }

/* Instruction steps */
.ckt-guide { list-style: none; margin: 0 0 1rem; padding: 0; }
.ckt-guide li {
  display: flex;
  gap: .7rem;
  padding: .55rem 0;
  font-size: .82rem;
  line-height: 1.45;
  color: #c0c4cf;
}
.ckt-guide .n {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(59, 130, 246, .14);
  color: #3b82f6;
  font-size: .7rem;
  font-weight: 700;
}
.ckt-guide li strong { color: #fff; font-weight: 600; }

.ckt-note {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  padding: .65rem .8rem;
  border-radius: 10px;
  font-size: .76rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}
.ckt-note.warn {
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .25);
  color: #fbbf24;
}
.ckt-note.info {
  background: rgba(59, 130, 246, .07);
  border: 1px solid rgba(59, 130, 246, .22);
  color: #93c5fd;
}
.ckt-note svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }

/* Buttons */
.ckt-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  height: 42px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: filter .15s, background .15s;
}
.ckt-btn:disabled { opacity: .55; cursor: not-allowed; }
.ckt-btn-primary { background: #3b82f6; color: #fff; }
.ckt-btn-primary:hover:not(:disabled) { filter: brightness(1.12); }
.ckt-btn-ghost {
  background: rgba(255, 255, 255, .05);
  color: #c0c4cf;
  border: 1px solid rgba(255, 255, 255, .09);
}
.ckt-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .09); color: #fff; }
.ckt-btn + .ckt-btn { margin-top: .55rem; }
.ckt-btn svg { width: 16px; height: 16px; }

.ckt-btn .ckt-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ckt-spin .7s linear infinite;
}
@keyframes ckt-spin { to { transform: rotate(360deg); } }

/* Redeem input */
.ckt-code-input {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: .75rem .85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  color: #fff;
  font-size: .85rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  outline: none;
  transition: border-color .15s;
}
.ckt-code-input:focus { border-color: #3b82f6; }
.ckt-code-input::placeholder { color: #565b68; font-family: inherit; }

.ckt-code-preview {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 30px;
  margin: .55rem 0 .9rem;
  font-size: .78rem;
  color: #565b68;
}
.ckt-code-preview.ok { color: #34d399; }
.ckt-code-preview code {
  padding: .15rem .5rem;
  border-radius: 6px;
  background: rgba(52, 211, 153, .1);
  border: 1px solid rgba(52, 211, 153, .25);
  color: #34d399;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .06em;
}

.ckt-error {
  display: none;
  padding: .6rem .8rem;
  margin-bottom: .9rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, .09);
  border: 1px solid rgba(239, 68, 68, .3);
  color: #f87171;
  font-size: .78rem;
  line-height: 1.45;
}
.ckt-error.show { display: block; }

.ckt-success-msg {
  display: none;
  padding: .6rem .8rem;
  margin-bottom: .9rem;
  border-radius: 10px;
  background: rgba(52, 211, 153, .08);
  border: 1px solid rgba(52, 211, 153, .3);
  color: #34d399;
  font-size: .78rem;
}
.ckt-success-msg.show { display: block; }

/* Done step */
.ckt-done { text-align: center; padding: .5rem 0 .25rem; }
.ckt-done-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: .9rem;
  border-radius: 50%;
  background: rgba(52, 211, 153, .12);
  color: #34d399;
  animation: ckt-pop .4s ease;
}
.ckt-done-icon svg { width: 28px; height: 28px; }
@keyframes ckt-pop {
  0% { transform: scale(.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.ckt-done h4 { margin: 0 0 .35rem; color: #fff; font-size: 1.05rem; }
.ckt-done p { margin: 0 0 1rem; color: #9aa0ae; font-size: .82rem; line-height: 1.5; }

.ckt-license {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .8rem .9rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, .07);
  border: 1px solid rgba(59, 130, 246, .28);
}
.ckt-license code {
  color: #fff;
  font-size: .88rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .04em;
  word-break: break-all;
  text-align: left;
}
.ckt-copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .35rem .6rem;
  border: 0;
  border-radius: 7px;
  background: #3b82f6;
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
}
.ckt-copy:hover { filter: brightness(1.12); }
.ckt-copy svg { width: 13px; height: 13px; }

@media (max-width: 520px) {
  .ckt-modal { max-width: 100%; border-radius: 14px; }
  .ckt-body { padding: 1rem; }
}
