/* Pcngon checkout modal (mockup A — Tinh gọn). Dùng chung biến --pcn-* (cart.css).
 * Mở từ nút "Thanh toán" của giỏ. docs/10-website-cart-checkout.md (bước 2.3). */

.pcn-co-scrim {
  position: fixed; inset: 0; background: rgba(16,24,40,.5);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.pcn-co-scrim.is-open { opacity: 1; visibility: visible; }

.pcn-co {
  width: 460px; max-width: 100%; max-height: 92vh; background: #fff; border-radius: 12px;
  box-shadow: var(--pcn-shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  font-family: inherit; color: var(--pcn-ink); transform: translateY(12px); transition: transform .2s;
}
.pcn-co-scrim.is-open .pcn-co { transform: translateY(0); }
.pcn-co *, .pcn-co *::before, .pcn-co *::after { box-sizing: border-box; }
@media (max-width: 520px) {
  .pcn-co { width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .pcn-row2 { flex-direction: column; gap: 0; }   /* SĐT + Email xếp 1 cột trên mobile */
}

.pcn-co-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--pcn-line); flex: none;
}
.pcn-co-head h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--pcn-ink-strong); }
.pcn-co-x { width: 36px; height: 36px; border: none; background: none; cursor: pointer; color: #9ca3af; font-size: 20px; }

.pcn-co-body { padding: 20px; overflow-y: auto; flex: 1; position: relative; }

.pcn-co-sec {
  font-size: 13px; font-weight: 600; color: var(--pcn-muted);
  text-transform: uppercase; letter-spacing: .4px; margin: 0 0 12px;
}
.pcn-co-sec.mt { margin-top: 22px; }

.pcn-fld { margin-bottom: 12px; }
.pcn-fld label { display: block; font-size: 13px; font-weight: 500; color: var(--pcn-ink); margin-bottom: 6px; }
.pcn-fld label .opt { font-weight: 400; color: var(--pcn-muted); }
.pcn-fld .req { color: var(--pcn-danger); }
.pcn-fld input, .pcn-fld textarea {
  width: 100%; min-height: 46px; border: 1px solid var(--pcn-line); border-radius: 8px;
  padding: 0 14px; font-size: 15px; font-family: inherit; color: var(--pcn-ink); outline: none;
  background: #fff; transition: border-color .15s;
}
.pcn-fld textarea { padding: 12px 14px; min-height: 64px; resize: vertical; }
.pcn-fld input:focus, .pcn-fld textarea:focus { border-color: var(--pcn-primary); }
.pcn-fld input.err, .pcn-fld textarea.err { border-color: var(--pcn-danger); }
.pcn-row2 { display: flex; gap: 12px; }
.pcn-row2 > * { flex: 1; }

/* Payment radio-cards */
.pcn-pay { display: flex; flex-direction: column; gap: 10px; }
.pcn-pay label {
  display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--pcn-line);
  border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.pcn-pay label.sel { border-color: var(--pcn-primary); background: var(--pcn-primary-soft); }
.pcn-pay input { position: absolute; opacity: 0; pointer-events: none; }
.pcn-pay .ic {
  width: 38px; height: 38px; border-radius: 8px; background: var(--pcn-bg-soft);
  display: flex; align-items: center; justify-content: center; color: var(--pcn-primary); flex: none;
}
.pcn-pay label.sel .ic { background: #fff; }
.pcn-pay .meta { flex: 1; min-width: 0; }
.pcn-pay .meta b { display: block; font-size: 14px; font-weight: 600; color: var(--pcn-ink-strong); }
.pcn-pay .dot { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--pcn-line); flex: none; }
.pcn-pay label.sel .dot { border: 6px solid var(--pcn-primary); }

/* Summary box */
.pcn-co-sum { background: var(--pcn-bg-soft); border-radius: 10px; padding: 14px 16px; margin-top: 4px; }
.pcn-co-sum .li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-bottom: 6px; color: var(--pcn-ink); }
.pcn-co-sum .li .muted { color: var(--pcn-muted); }
.pcn-co-sum .li .free { font-weight: 600; color: var(--pcn-save); }
.pcn-co-sum .tot { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--pcn-line); }
.pcn-co-sum .tot .lbl { font-size: 14px; font-weight: 600; color: var(--pcn-ink-strong); }
.pcn-co-sum .tot .val { font-size: 21px; font-weight: 700; color: var(--pcn-primary); }

.pcn-co-foot { padding: 14px 20px; border-top: 1px solid var(--pcn-line); flex: none; }
.pcn-co-submit {
  width: 100%; height: 52px; border: none; border-radius: 10px; background: var(--pcn-primary);
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.pcn-co-submit:hover { background: var(--pcn-primary-dark); }
.pcn-co-submit:disabled { opacity: .6; cursor: not-allowed; }

/* States (overlay trong body) */
.pcn-co-state {
  position: absolute; inset: 0; background: #fff; display: none;
  flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 28px;
}
.pcn-co-state.show { display: flex; }
.pcn-co-spin {
  width: 46px; height: 46px; border-radius: 999px; border: 4px solid var(--pcn-primary-soft);
  border-top-color: var(--pcn-primary); animation: pcn-co-spin .8s linear infinite; margin-bottom: 18px;
}
@keyframes pcn-co-spin { to { transform: rotate(360deg); } }
.pcn-co-state .tt { font-size: 17px; font-weight: 700; color: var(--pcn-ink-strong); margin-bottom: 6px; }
.pcn-co-state .sub { font-size: 14px; line-height: 1.55; color: var(--pcn-muted); margin-bottom: 16px; }
.pcn-co-ok-ic {
  width: 72px; height: 72px; border-radius: 999px; background: var(--pcn-save-soft); color: var(--pcn-save);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.pcn-co-err-ic {
  width: 64px; height: 64px; border-radius: 999px; background: #FEF2F2; color: var(--pcn-danger);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.pcn-co-code {
  background: var(--pcn-bg-soft); border: 1px dashed var(--pcn-line); border-radius: 10px;
  padding: 12px 18px; margin-bottom: 18px;
}
.pcn-co-code .k { font-size: 12px; color: var(--pcn-muted); }
.pcn-co-code .v { font-size: 18px; font-weight: 700; color: var(--pcn-primary); letter-spacing: .5px; }
.pcn-co-state .acts { display: flex; gap: 10px; width: 100%; }
.pcn-co-btn {
  flex: 1; height: 48px; border-radius: 10px; border: none; cursor: pointer; font-size: 15px; font-weight: 600;
  background: var(--pcn-primary); color: #fff;
}
.pcn-co-btn.ghost { background: #fff; border: 1px solid var(--pcn-line); color: var(--pcn-ink); }
