/* =============================================================================
   پارسی شو — تسویه حساب / Checkout pro (method picker, wallet pay, guest guard)
   ============================================================================= */

/* ---------- روش پرداخت ---------- */
.cppay {
  margin-top: 12px;
  border: 1px solid #e3eaf3;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px -24px rgba(15, 34, 55, .5);
  overflow: hidden;
}
.cppay-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
}
.cppay-ico-wrap {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef5ff, #dbeafe);
  border: 1px solid #cfe0f7;
  color: #1d4ed8;
}
.cppay-ico-wrap svg { width: 18px; height: 18px; }
.cppay-head b { display: block; font-size: 13.5px; font-weight: 800; color: #16283b; }
.cppay-head i { display: block; font-style: normal; font-size: 11px; color: #7b8797; margin-top: 2px; }

.cppay-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 12px 12px; }

.cppay-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid #e6edf6;
  border-radius: 12px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.cppay-opt:hover { border-color: #cfe0f7; background: #f6faff; }
.cppay-opt.is-on {
  border-color: #1d4ed8;
  background: #f2f7ff;
  box-shadow: 0 0 0 1px #1d4ed8 inset;
}
.cppay-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.cppay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cppay-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 50%;
  border: 2px solid #c6d3e3;
  background: #fff;
  position: relative;
}
.cppay-opt.is-on .cppay-dot { border-color: #1d4ed8; }
.cppay-opt.is-on .cppay-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #1d4ed8;
}
.cppay-tx { min-width: 0; flex: 1 1 auto; }
.cppay-tx b { display: block; font-size: 12.5px; font-weight: 800; color: #16283b; }
.cppay-tx i { display: block; font-style: normal; font-size: 11px; color: #7b8797; margin-top: 2px; line-height: 1.6; }
.cppay-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f1ff;
  border: 1px solid #d6e6ff;
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 800;
}
.cppay-badge--wallet { background: #e7f8f1; border-color: #c7ecdd; color: #0d7a5f; }
.cppay-charge { color: #1d4ed8; font-weight: 800; text-decoration: none; border-bottom: 1px solid currentColor; }
.cppay-note {
  padding: 10px 16px 14px;
  font-size: 10.5px;
  line-height: 1.8;
  color: #8a97a8;
  border-top: 1px dashed #e8eef6;
  margin: 0 12px;
}

/* ---------- پیام پرداخت موفق ---------- */
.cppay-paid-banner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #bfe7d3;
  background: linear-gradient(180deg, #f1fcf7, #e8f8f1);
  color: #0d7a5f;
}
.cppay-paid-banner b { font-size: 13px; font-weight: 900; }
.cppay-paid-banner span { font-size: 11.5px; line-height: 1.8; }

/* ---------- توست ---------- */
.cppay-toast {
  position: fixed;
  z-index: 2147483000;
  inset-inline: 16px;
  bottom: 18px;
  max-width: 460px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #10243b;
  color: #eaf2fb;
  box-shadow: 0 24px 50px -28px rgba(9, 20, 34, .85);
  animation: cppay-in .22s ease;
}
.cppay-toast b { font-size: 12.5px; font-weight: 900; }
.cppay-toast span { grid-column: 1; font-size: 11.5px; line-height: 1.8; color: #b9cbdd; }
.cppay-toast span a { color: #93c5fd; }
.cppay-toast button {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: center;
  width: 26px; height: 26px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 16px; line-height: 1;
  cursor: pointer;
}
.cppay-toast.is-ok { background: linear-gradient(160deg, #0f6b53, #0b5340); }
.cppay-toast.is-err { background: linear-gradient(160deg, #7f1d1d, #5b1414); }
@keyframes cppay-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- پیام ورود برای پیگیری سفارش ---------- */
.cppay-guest {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 26px 18px;
  border-radius: 18px;
  border: 1px solid #e3eaf3;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  text-align: center;
}
.cppay-guest-ico {
  width: 54px; height: 54px;
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef5ff, #dbeafe);
  border: 1px solid #cfe0f7;
  color: #1d4ed8;
}
.cppay-guest-ico svg { width: 24px; height: 24px; }
.cppay-guest b { font-size: 14px; font-weight: 900; color: #16283b; }
.cppay-guest span { font-size: 11.5px; line-height: 1.9; color: #6b7c90; max-width: 420px; }
.cppay-guest-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 11px;
  background: linear-gradient(120deg, #2563eb, #1d4ed8);
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 22px -14px rgba(37, 99, 235, .9);
}

/* ---------- night ---------- */
html.ph-night .cppay,
html.ph-night .cppay-guest { background: #101f2f; border-color: #23394f; box-shadow: none; }
html.ph-night .cppay-head b,
html.ph-night .cppay-tx b,
html.ph-night .cppay-guest b { color: #e6eef8; }
html.ph-night .cppay-head i,
html.ph-night .cppay-tx i,
html.ph-night .cppay-guest span { color: #9fb3c8; }
html.ph-night .cppay-opt { background: #13263b; border-color: #24384d; }
html.ph-night .cppay-opt:hover { background: #162b42; border-color: #2c4560; }
html.ph-night .cppay-opt.is-on { background: #16283f; border-color: #3b82f6; box-shadow: 0 0 0 1px #3b82f6 inset; }
html.ph-night .cppay-dot { background: #0f1e2e; border-color: #3a5470; }
html.ph-night .cppay-note { border-color: #23394f; color: #8fa4ba; }
html.ph-night .cppay-paid-banner { background: #0f2f2a; border-color: #1d5c4b; color: #6ee7b7; }
html.ph-night .cppay-guest-ico { background: #16283c; border-color: #294158; color: #93c5fd; }

@media (max-width: 639.98px) {
  .cppay-opt { padding: 10px; }
  .cppay-badge { display: none; }
  .cppay-toast { inset-inline: 10px; bottom: 12px; }
}

/* ---------- کارت به کارت ---------- */
.cppay-badge--card{background:#eef2ff;border-color:#dbe4ff;color:#4338ca}
.ctc{margin:0 12px 14px;border-radius:16px;overflow:hidden;border:1px solid #e3eaf3;background:#fff}
.ctc-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;background:linear-gradient(120deg,#312e81,#4c1d95);color:#fff}
.ctc-bank{font-size:12px;font-weight:800}
.ctc-sheba-tag{font-size:10px;font-weight:700;padding:2px 8px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.28)}
.ctc-num{padding:16px 14px 4px;font-size:19px;font-weight:900;letter-spacing:1.5px;color:#1f2937;text-align:center;font-variant-numeric:tabular-nums}
.ctc-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px 10px}
.ctc-copy{border:1px solid #dbe4ff;background:#eef2ff;color:#3730a3;font:inherit;font-size:10.5px;font-weight:800;padding:5px 10px;border-radius:9px;cursor:pointer}
.ctc-holder{font-size:11px;font-weight:700;color:#6b7c90}
.ctc-sheba{padding:0 14px 10px;font-size:10.5px;color:#8a97a8;text-align:center;font-variant-numeric:tabular-nums}
.ctc-amount{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 14px 12px;padding:10px 12px;border-radius:12px;background:linear-gradient(120deg,#f5f3ff,#eef2ff);border:1px solid #e0e7ff}
.ctc-amount span{font-size:11px;color:#4b5563}
.ctc-amount b{font-size:14px;font-weight:900;color:#312e81;font-variant-numeric:tabular-nums}
.ctc-form{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 14px 14px}
.ctc-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.ctc-field span{font-size:10.5px;font-weight:700;color:#6b7c90}
.ctc-field input[type=text]{height:38px;padding:0 10px;border:1px solid #e3eaf3;border-radius:10px;background:#fff;font:inherit;font-size:12px;color:#16283b;outline:none}
.ctc-field input[type=text]:focus{border-color:#93b4f0;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.ctc-field.ctc-file{grid-column:1 / -1}
.ctc-field input[type=file]{font-size:11px}
.ctc-preview{grid-column:1 / -1}
.ctc-preview img{max-height:120px;border-radius:10px;border:1px solid #e3eaf3;display:block}
.ctc-terms{grid-column:1 / -1;display:flex;align-items:flex-start;gap:7px;font-size:11px;color:#4b5563;line-height:1.8}
.ctc-terms input{margin-top:3px}
.ctc-msg{grid-column:1 / -1;min-height:14px;font-size:11px;color:#b91c1c}
.ctc-done{margin:12px 0;padding:12px 14px;border-radius:14px;display:flex;flex-direction:column;gap:3px;font-size:12px}
.ctc-done.is-ok{background:#f0fdf4;border:1px solid #bbf7d0;color:#15803d}
.ctc-done.is-err{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c}
.ctc-done b{font-size:12.5px;font-weight:900}
html.ph-night .ctc{background:#101f2f;border-color:#23394f}
html.ph-night .ctc-num{color:#e6eef8}
html.ph-night .ctc-amount{background:#13263b;border-color:#24384d}
html.ph-night .ctc-amount span{color:#9fb3c8}
html.ph-night .ctc-amount b{color:#c7d2fe}
html.ph-night .ctc-field input[type=text]{background:#13263b;border-color:#24384d;color:#e6eef8}
html.ph-night .ctc-copy{background:#16283f;border-color:#2c4560;color:#c7d2fe}
html.ph-night .ctc-terms{color:#9fb3c8}
@media (max-width:639.98px){ .ctc-form{grid-template-columns:1fr} }
/* ---------- کارت به کارت: چیدمان افقی در دسکتاپ ---------- */
@media (min-width: 640px) {
  .ctc {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
    grid-auto-rows: min-content;
    background: linear-gradient(160deg, #f5f3ff, #eef2ff);
  }
  .ctc-top { grid-column: 1; grid-row: 1; }
  .ctc-num { grid-column: 1; grid-row: 2; }
  .ctc-row { grid-column: 1; grid-row: 3; }
  .ctc-sheba { grid-column: 1; grid-row: 4; }
  .ctc-amount { grid-column: 1; grid-row: 5; margin-bottom: 14px; }
  .ctc-form {
    grid-column: 2;
    grid-row: 1 / span 5;
    background: #ffffff;
    border-inline-start: 1px solid #eef2f7;
    padding: 14px;
    align-content: start;
  }
}
html.ph-night .ctc-form { background: #101f2f; border-color: #23394f; }

/* ---------- کارت به کارت: تاریخ خودکار، رسید و دکمهٔ ثبت ---------- */
.ctc-form-head{grid-column:1/-1;display:flex;flex-direction:column;gap:2px;padding-bottom:2px}
.ctc-form-head b{font-size:12.5px;font-weight:900;color:#16283b}
.ctc-form-head i{font-style:normal;font-size:10.5px;color:#8a97a8}
.ctc-field > span em{font-style:normal;font-size:9px;font-weight:800;color:#4338ca;background:#eef2ff;border:1px solid #dbe4ff;border-radius:999px;padding:1px 6px;margin-inline-start:4px}
.ctc-date{grid-column:1/-1}
.ctc-date-box{display:grid;grid-template-columns:76px minmax(0,1fr) 96px;gap:6px}
.ctc-date-box select{
  height:38px;padding:0 8px 0 24px;border:1px solid #e3eaf3;border-radius:10px;background:#fff;
  font:inherit;font-size:12px;font-weight:700;color:#16283b;outline:none;appearance:none;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat:no-repeat;background-position:left 8px center;cursor:pointer;
}
.ctc-date-box select:focus{border-color:#93b4f0;box-shadow:0 0 0 3px rgba(37,99,235,.10)}
.ctc-file{
  grid-column:1/-1;position:relative;display:flex;align-items:center;gap:10px;
  border:1px dashed #d7e3f3;border-radius:12px;padding:10px 12px;background:#fbfdff;cursor:pointer;
  transition:border-color .15s,background .15s;
}
.ctc-file:hover{border-color:#b9cdf0;background:#f6faff}
.ctc-file input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.ctc-file-btn{flex:0 0 auto;font-size:10.5px;font-weight:800;color:#3730a3;background:#eef2ff;border:1px solid #dbe4ff;border-radius:9px;padding:6px 10px}
.ctc-file-name{font-size:10.5px;color:#8a97a8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctc-preview img{max-height:140px;width:auto}
.ctc-submit{
  grid-column:1/-1;height:44px;border:0;border-radius:12px;
  background:linear-gradient(120deg,#4338ca,#312e81);color:#fff;font:inherit;font-size:12.5px;font-weight:900;
  cursor:pointer;box-shadow:0 14px 26px -18px rgba(67,56,202,.9);transition:filter .15s,transform .15s;
}
.ctc-submit:hover{filter:brightness(1.07)}
.ctc-submit:active{transform:scale(.99)}
.ctc-submit:disabled{opacity:.65;cursor:default;filter:none}
.ctc-hint{grid-column:1/-1;margin:-2px 0 0;font-size:9.5px;color:#93a1b3;text-align:center;line-height:1.8}
html.ph-night .ctc-form-head b{color:#e6eef8}
html.ph-night .ctc-date-box select{background-color:#13263b;border-color:#24384d;color:#e6eef8}
html.ph-night .ctc-file{background:#13263b;border-color:#2c4560}
html.ph-night .ctc-file-btn{background:#1b2f4a;border-color:#2c4560;color:#c7d2fe}
html.ph-night .ctc-hint{color:#8fa3b8}