

.tmpay-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  padding: 18px;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  place-items: center;
}
.tmpay-overlay.open { display: grid; animation: tmpayFade .2s ease both; }
@keyframes tmpayFade { from { opacity: 0 } to { opacity: 1 } }

.tmpay-card {
  width: min(520px, 96vw);
  max-height: 92vh; overflow-y: auto;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.12);
  background: #0b0f24;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.08);
  padding: 26px;
  animation: tmpayUp .28s cubic-bezier(.4,0,.2,1) both;
  font-family: 'Cairo','Segoe UI',Tahoma,sans-serif;
  color: #eef2ff;
}
@keyframes tmpayUp { from { opacity:0; transform: translateY(24px) } to { opacity:1; transform: translateY(0) } }
.tmpay-card::-webkit-scrollbar { width: 5px; }
.tmpay-card::-webkit-scrollbar-thumb { background: linear-gradient(var(--brand-primary),var(--brand-secondary)); border-radius: 99px; }

.tmpay-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 18px; flex-wrap: wrap;
}
.tmpay-head h2 {
  font-size: 19px; font-weight: 900; margin: 0;
  display: flex; align-items: center; gap: 9px; color: #fff;
}
.tmpay-head h2 i { color: var(--brand-primary-h); }
.tmpay-steps { display: flex; align-items: center; gap: 6px; }
.tmpay-step {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 900;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  color: #6b7a99;
}
.tmpay-step.active {
  background: linear-gradient(135deg,var(--brand-primary),var(--brand-secondary));
  border-color: transparent; color: #fff;
}
.tmpay-step.done {
  background: rgba(var(--brand-success-rgb), 0.2); border-color: rgba(var(--brand-success-rgb), 0.2); color: #4ade80;
}
.tmpay-step-line { width: 28px; height: 2px; background: rgba(255,255,255,.12); border-radius: 2px; }
.tmpay-step-line.active { background: linear-gradient(90deg,var(--brand-primary),var(--brand-secondary)); }

.tmpay-summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.15), rgba(var(--brand-secondary-rgb), 0.15));
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
}
.tmpay-summary strong { display: block; font-size: 15px; font-weight: 900; margin-bottom: 3px; color:#fff; }
.tmpay-summary small  { color: #94a3b8; font-size: 12px; }
.tmpay-amount {
  font-size: 24px; font-weight: 900;
  background: linear-gradient(135deg,var(--brand-primary-h),var(--brand-secondary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.tmpay-cc { perspective: 1200px; width: 100%; max-width: 360px; margin: 0 auto 20px; aspect-ratio: 1.586; }
.tmpay-cc-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4,.2,.2,1);
}
.tmpay-cc-inner.flipped { transform: rotateY(180deg); }
.tmpay-cc-face {
  position: absolute; inset: 0; border-radius: 18px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: 20px; display: flex; flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18);
  overflow: hidden;
}
.tmpay-cc-front {
  background: linear-gradient(135deg,#1e293b 0%,#334155 55%,#475569 100%);
  justify-content: space-between;
}
.tmpay-cc-front::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.14), transparent 45%);
  pointer-events: none;
}
.tmpay-cc-visa       .tmpay-cc-front { background: linear-gradient(135deg,#1a1f71 0%,#2d4bb8 60%,#436fe0 100%); }
.tmpay-cc-mastercard .tmpay-cc-front { background: linear-gradient(135deg,#1a1a1a 0%,#3a2317 55%,#c2410c 110%); }
.tmpay-cc-amex       .tmpay-cc-front { background: linear-gradient(135deg,#006fcf 0%,#2671b9 60%,#4a9fe0 100%); }
.tmpay-cc-discover   .tmpay-cc-front { background: linear-gradient(135deg,#1a1a1a 0%,#3d2e0a 55%,var(--brand-warning) 120%); }

.tmpay-cc-row1 { display: flex; align-items: center; justify-content: space-between; }
.tmpay-cc-chip {
  width: 44px; height: 34px; border-radius: 7px;
  background: linear-gradient(135deg,#e6c878,#b8923e 50%,#e6c878);
  position: relative;
}
.tmpay-cc-chip::before {
  content: ''; position: absolute; inset: 6px 8px;
  border: 1px solid rgba(0,0,0,.25); border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 45%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.25) 55%, transparent 55%),
    linear-gradient(0deg,  transparent 45%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.25) 55%, transparent 55%);
}
.tmpay-cc-brand { min-height: 26px; display: flex; align-items: center; }
.tmpay-cc-number {
  font-family: 'Courier New', monospace;
  font-size: clamp(16px,4.6vw,21px); font-weight: 700;
  letter-spacing: 2px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.tmpay-cc-row3 { display: flex; justify-content: space-between; gap: 14px; }
.tmpay-cc-label {
  display: block; font-size: 8px; letter-spacing: .08em;
  color: rgba(255,255,255,.6); margin-bottom: 3px; text-transform: uppercase;
}
.tmpay-cc-value {
  display: block; font-size: 13px; font-weight: 700; color: #fff;
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
.tmpay-cc-back {
  background: linear-gradient(135deg,#1e293b,#334155);
  transform: rotateY(180deg); padding: 0;
}
.tmpay-cc-stripe { width: 100%; height: 44px; background: #0a0e17; margin-top: 22px; }
.tmpay-cc-cvv-band {
  margin: 16px 18px 0; padding: 10px 12px;
  background: #e2e8f0; border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.tmpay-cc-cvv-label { font-size: 9px; color: #475569; font-weight: 700; letter-spacing: .06em; }
.tmpay-cc-cvv-value {
  font-family: 'Courier New', monospace; font-size: 16px; font-weight: 700;
  color: #1e293b; letter-spacing: 3px;
}
.tmpay-cc-brand-back { position: absolute; bottom: 16px; inset-inline-end: 18px; opacity: .85; }

.tmpay-form { display: flex; flex-direction: column; gap: 14px; }
.tmpay-field { display: flex; flex-direction: column; gap: 6px; }
.tmpay-field > span { font-size: 12px; font-weight: 700; color: #94a3b8; }
.tmpay-field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  color: #eef2ff; font-size: 15px; font-family: inherit;
  font-weight: 600; letter-spacing: .02em;
  transition: border-color .2s, box-shadow .2s;
}
.tmpay-field input:focus {
  outline: none; border-color: rgba(var(--brand-primary-rgb), 0.2);
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.3);
}
.tmpay-input-wrap { position: relative; }
.tmpay-input-icon {
  position: absolute; top: 50%; inset-inline-end: 14px; transform: translateY(-50%);
  color: #6b7a99; font-size: 13px; pointer-events: none;
}
.tmpay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tmpay-accepted { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #94a3b8; }
.tmpay-brands { display: flex; align-items: center; gap: 8px; }

.tmpay-secure {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: #94a3b8;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(var(--brand-success-rgb), 0.2); border: 1px solid rgba(var(--brand-success-rgb), 0.2);
}
.tmpay-secure i { color: #4ade80; }

.tmpay-error {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; border-radius: 12px; margin: 4px 0 14px;
  background: rgba(var(--brand-danger-rgb), 0.2); border: 1px solid rgba(var(--brand-danger-rgb), 0.2);
  color: #fca5a5; font-size: 13px; font-weight: 700;
}

.tmpay-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; flex-wrap: wrap; }
.tmpay-actions button { min-width: 120px; }

.tmpay-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 14px;
  font-family: inherit; font-size: 14px; font-weight: 800;
  cursor: pointer; border: 1px solid transparent;
  transition: filter .2s, transform .15s, background .2s;
}
.tmpay-btn-primary {
  background: linear-gradient(135deg,var(--brand-primary),var(--brand-secondary)); color: #fff;
  box-shadow: 0 6px 20px rgba(var(--brand-primary-rgb), 0.3);
}
.tmpay-btn-primary:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.tmpay-btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.tmpay-btn-ghost {
  background: rgba(255,255,255,.06); color: #eef2ff;
  border-color: rgba(255,255,255,.14);
}
.tmpay-btn-ghost:hover { background: rgba(255,255,255,.12); }

.tmpay-3ds { display: flex; flex-direction: column; gap: 14px; }
.tmpay-3ds-bank {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.15), rgba(var(--brand-secondary-rgb), 0.15));
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
  font-size: 13px; font-weight: 800; color: #fff;
}
.tmpay-3ds-bank i { font-size: 18px; color: var(--brand-primary-h); }
.tmpay-3ds-card-line {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  font-size: 13px; font-weight: 700;
}
.tmpay-3ds-card-line strong { margin-inline-start: auto; font-size: 16px; color: var(--brand-primary-h); }
.tmpay-3ds-brand { display: flex; align-items: center; }
.tmpay-3ds-msg { font-size: 13px; color: #94a3b8; line-height: 1.8; margin: 4px 0; }
.tmpay-3ds-demo {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 12px;
  background: rgba(var(--brand-warning-rgb), 0.2); border: 1px dashed rgba(var(--brand-warning-rgb), 0.2);
  font-size: 12px; color: #fcd34d;
}
.tmpay-3ds-demo b {
  font-size: 16px; letter-spacing: 3px; color: var(--brand-warning);
  font-family: 'Courier New', monospace;
}
.tmpay-3ds-timer { font-size: 12px; color: #94a3b8; text-align: center; font-weight: 700; }

.tmpay-otp-inputs { display: flex; gap: 10px; justify-content: center; margin: 6px 0; direction: ltr; }
.tmpay-otp-box {
  width: 48px; height: 58px; text-align: center;
  font-size: 24px; font-weight: 900; border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 2px solid rgba(255,255,255,.14);
  color: #eef2ff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tmpay-otp-box:focus {
  outline: none; border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb), 0.3);
  transform: translateY(-2px);
}

.tmpay-success { text-align: center; padding: 10px 4px; }
.tmpay-success-check {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg,var(--brand-success),var(--brand-secondary));
  color: #fff; font-size: 38px;
  box-shadow: 0 12px 36px rgba(var(--brand-success-rgb), 0.3);
  animation: tmpayPop .45s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes tmpayPop { from { transform: scale(0) } to { transform: scale(1) } }
.tmpay-success h2 { font-size: 22px; font-weight: 900; margin: 0 0 10px; color:#fff; }
.tmpay-success p  { color: #94a3b8; font-size: 14px; line-height: 1.8; margin: 0 0 18px; }
.tmpay-success p b { color:#eef2ff; }
.tmpay-success-meta {
  display: inline-flex; flex-direction: column; gap: 3px;
  padding: 12px 24px; border-radius: 14px; margin-bottom: 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
}
.tmpay-success-meta span { font-size: 11px; color: #94a3b8; }
.tmpay-success-meta strong { font-size: 15px; font-weight: 900; color:#fff; }

.tmpay-brief-block {
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 14px;
  padding: 16px;
  margin: 16px 0;
  text-align: start;
}
.tmpay-brief-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #eef2ff;
  margin-bottom: 10px;
}
.tmpay-brief-label i { color: var(--brand-primary, #6366f1); }
.tmpay-brief-block textarea {
  width: 100%;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 90px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.tmpay-brief-block textarea:focus {
  outline: none;
  border-color: var(--brand-primary, #6366f1);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.tmpay-brief-block textarea::placeholder { color: rgba(255,255,255,0.4); }
.tmpay-brief-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
}
.tmpay-btn-ghost {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #94a3b8 !important;
}
.tmpay-btn-ghost:hover { background: rgba(255,255,255,0.04) !important; color: #fff !important; }
.tmpay-ref {
  display: block; font-size: 11px; color: #6b7a99;
  margin-bottom: 18px; font-family: 'Courier New', monospace;
}

.tmpay-coupon-wrap {
  margin: 4px 0 10px;
}
.tmpay-coupon-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tmpay-coupon-row input {
  flex: 1;
  padding: 9px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  color: #eef2ff;
  font-size: 13px;
  font-family: inherit;
  letter-spacing: .08em;
}
.tmpay-coupon-row input::placeholder { color: #64748b; }
.tmpay-btn-sm {
  padding: 9px 14px;
  font-size: 12px;
  border-radius: 10px;
  background: rgba(var(--brand-primary-rgb), 0.1);
  border: 1px solid rgba(var(--brand-primary-rgb), 0.2);
  color: var(--brand-primary-h);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: background .2s;
  white-space: nowrap;
}
.tmpay-btn-sm:hover { background: rgba(var(--brand-primary-rgb), 0.1); }
.tmpay-btn-sm:disabled { opacity: .5; cursor: default; }
.tmpay-coupon-msg {
  font-size: 12px;
  margin-top: 5px;
  padding: 0 2px;
  min-height: 16px;
}
.tmpay-coupon-applied {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(var(--brand-success-rgb), 0.1);
  border: 1px solid rgba(var(--brand-success-rgb), 0.2);
  border-radius: 10px;
  font-size: 13px;
  color: var(--brand-success);
}
.tmpay-coupon-applied i { color: var(--brand-success); }
.tmpay-coupon-remove {
  margin-inline-start: auto;
  background: none;
  border: none;
  color: #f87171;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .2s;
}
.tmpay-coupon-remove:hover { background: rgba(var(--brand-danger-rgb), 0.1); }

@media (max-width: 480px) {
  .tmpay-card { padding: 20px; }
  .tmpay-row { grid-template-columns: 1fr; }
  .tmpay-otp-box { width: 42px; height: 52px; font-size: 20px; }
}
