/* QuickPay for WooCommerce — checkout styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --qp-bg:           #f5f6fa;
  --qp-white:        #ffffff;
  --qp-border:       #e4e7ef;
  --qp-text:         #1a1d2e;
  --qp-text2:        #5c6080;
  --qp-text3:        #9398b2;
  --qp-accent:       #3b6ef0;
  --qp-accent-light: #eef2fe;
  --qp-accent-dark:  #2855d4;
  --qp-green:        #16a34a;
  --qp-green-bg:     #f0fdf4;
  --qp-green-bd:     #bbf7d0;
  --qp-red:          #dc2626;
  --qp-red-bg:       #fef2f2;
  --qp-warn-text:    #92400e;
  --qp-warn-bg:      #fffbeb;
  --qp-warn-bd:      #fde68a;
  --qp-radius:       14px;
  --qp-shadow:       0 2px 16px rgba(0,0,0,0.07);
  --qp-shadow-lg:    0 8px 40px rgba(0,0,0,0.10);
}

.quickpay-body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--qp-bg);
  color: var(--qp-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 60px;
}

.quickpay-body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(59,110,240,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,110,240,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none; z-index: 0;
}

/* Wrap */
.qp-wrap { width: 100%; max-width: 460px; position: relative; z-index: 1; }

/* Step bar */
.qp-step-bar { display: flex; align-items: center; margin-bottom: 14px; padding: 0 2px; animation: qpFadeUp 0.35s ease both; }
.qp-step-node { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; position: relative; }
.qp-step-node:not(:last-child)::after {
  content: ''; position: absolute; top: 13px;
  left: calc(50% + 14px); right: calc(-50% + 14px);
  height: 1.5px; background: var(--qp-border); transition: background 0.4s;
}
.qp-step-node.done:not(:last-child)::after { background: var(--qp-accent); }
.qp-step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--qp-border); background: var(--qp-white);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--qp-text3);
  transition: all 0.25s; position: relative; z-index: 1;
}
.qp-step-node.active .qp-step-dot { border-color: var(--qp-accent); color: var(--qp-accent); background: var(--qp-accent-light); }
.qp-step-node.done .qp-step-dot   { border-color: var(--qp-green);  background: var(--qp-green-bg); color: var(--qp-green); }
.qp-step-lbl { font-size: 11px; font-weight: 600; color: var(--qp-text3); text-transform: uppercase; letter-spacing: 0.05em; transition: color 0.25s; }
.qp-step-node.active .qp-step-lbl { color: var(--qp-accent); }
.qp-step-node.done .qp-step-lbl   { color: var(--qp-green); }

/* Card */
.qp-card {
  background: var(--qp-white); border: 1px solid var(--qp-border);
  border-radius: var(--qp-radius); box-shadow: var(--qp-shadow-lg); overflow: hidden;
  animation: qpFadeUp 0.35s ease 0.1s both;
}
.qp-card-body { padding: 26px 26px 22px; }

/* Panels */
.qp-panel { display: none; animation: qpFadeUp 0.22s ease; }
.qp-panel.active { display: block; }

/* Headings */
.qp-title { font-size: 19px; font-weight: 800; color: var(--qp-text); letter-spacing: -0.02em; margin-bottom: 4px; }
.qp-sub   { font-size: 13px; color: var(--qp-text2); margin-bottom: 22px; line-height: 1.6; }

/* Fields */
.qp-field  { margin-bottom: 15px; }
.qp-label  {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--qp-text2);
  margin-bottom: 7px; text-transform: uppercase; letter-spacing: 0.04em;
}
.qp-req-dot { width: 5px; height: 5px; background: var(--qp-accent); border-radius: 50%; flex-shrink: 0; }
.qp-opt {
  font-size: 10px; font-weight: 600; color: var(--qp-text3);
  background: var(--qp-bg); border: 1px solid var(--qp-border);
  border-radius: 4px; padding: 1px 6px; text-transform: none; letter-spacing: 0;
}
.qp-input {
  width: 100%; background: var(--qp-bg); border: 1.5px solid var(--qp-border);
  border-radius: 10px; padding: 13px 15px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; color: var(--qp-text);
  outline: none; transition: all 0.18s; -webkit-appearance: none;
}
.qp-input::placeholder { color: var(--qp-text3); }
.qp-input:focus { border-color: var(--qp-accent); background: var(--qp-white); box-shadow: 0 0 0 3px rgba(59,110,240,0.1); }
.qp-input.error { border-color: var(--qp-red); background: var(--qp-red-bg); }

/* Email note */
.qp-email-note {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--qp-warn-bg); border: 1px solid var(--qp-warn-bd);
  border-radius: 9px; padding: 11px 13px; margin-top: 8px;
  font-size: 12.5px; color: var(--qp-warn-text); line-height: 1.55;
}
.qp-email-note svg { margin-top: 1px; flex-shrink: 0; }

.qp-err { font-size: 12px; color: var(--qp-red); margin-top: 5px; display: none; }
.qp-err.show { display: block; }

/* Phone */
.qp-phone-row { display: flex; gap: 8px; }
.qp-phone-row .qp-input { flex: 1; }
.qp-country-wrap { position: relative; flex-shrink: 0; }
.qp-country-select {
  appearance: none; -webkit-appearance: none;
  background: var(--qp-bg); border: 1.5px solid var(--qp-border);
  border-radius: 10px; padding: 13px 32px 13px 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px; font-weight: 600; color: var(--qp-text);
  cursor: pointer; outline: none; transition: all 0.18s; height: 100%;
}
.qp-country-select:focus { border-color: var(--qp-accent); background: var(--qp-white); box-shadow: 0 0 0 3px rgba(59,110,240,0.1); }
.qp-select-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--qp-text3); }

/* Button */
.qp-btn {
  width: 100%; background: var(--qp-accent); color: #fff; border: none;
  border-radius: 10px; padding: 14px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin-top: 20px; letter-spacing: -0.01em;
}
.qp-btn:hover { background: var(--qp-accent-dark); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(59,110,240,0.22); }
.qp-btn:active { transform: translateY(0); }
.qp-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.qp-spin {
  width: 17px; height: 17px; border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: qpSpin 0.65s linear infinite; display: none;
}
.qp-loading .qp-spin { display: block; }
.qp-loading .qp-btn-label { display: none; }

/* Back */
.qp-back {
  background: none; border: none;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--qp-text3); cursor: pointer;
  display: flex; align-items: center; gap: 5px; padding: 0; margin-bottom: 18px;
  transition: color 0.15s;
}
.qp-back:hover { color: var(--qp-text); }

/* Payment methods */
.qp-method-list { display: flex; flex-direction: column; gap: 9px; }
.qp-method {
  display: flex; align-items: center; gap: 12px;
  background: var(--qp-bg); border: 1.5px solid var(--qp-border);
  border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: all 0.15s;
}
.qp-method:hover { border-color: #b0bef8; background: var(--qp-white); }
.qp-method.chosen { border-color: var(--qp-accent); background: var(--qp-accent-light); }
.qp-method-radio {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--qp-border);
  background: var(--qp-white); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.qp-method.chosen .qp-method-radio { border-color: var(--qp-accent); background: var(--qp-accent); }
.qp-method.chosen .qp-method-radio::after { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; }
.qp-method-icon { width: 32px; height: 23px; background: var(--qp-white); border: 1px solid var(--qp-border); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.qp-method-name { font-size: 14px; font-weight: 700; color: var(--qp-text); }
.qp-method-sub  { font-size: 12px; color: var(--qp-text3); margin-top: 1px; }

/* Total */
.qp-total-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--qp-bg); border: 1px solid var(--qp-border);
  border-radius: 10px; padding: 14px 15px; margin-top: 18px;
}
.qp-total-lbl { font-size: 13px; font-weight: 600; color: var(--qp-text2); }
.qp-total-val { font-size: 19px; font-weight: 800; color: var(--qp-text); letter-spacing: -0.02em; }

/* Security */
.qp-security { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; color: var(--qp-text3); margin-top: 12px; }

/* Success */
.qp-success-center { text-align: center; padding: 24px 0 16px; }
.qp-success-ring {
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--qp-green-bg); border: 2px solid var(--qp-green-bd);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 18px;
  animation: qpPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.qp-success-title { font-size: 21px; font-weight: 800; color: var(--qp-text); letter-spacing: -0.02em; margin-bottom: 20px; }
.qp-redir-dots { display: flex; gap: 5px; align-items: center; justify-content: center; }
.qp-redir-dots span { width: 7px; height: 7px; background: var(--qp-green); border-radius: 50%; opacity: 0.5; animation: qpDot 1.2s ease-in-out infinite; }
.qp-redir-dots span:nth-child(2) { animation-delay: 0.2s; }
.qp-redir-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Footer */
.qp-card-foot {
  padding: 12px 26px; border-top: 1px solid var(--qp-border); background: var(--qp-bg);
  display: flex; align-items: center; justify-content: center; gap: 18px;
}
.qp-foot-badge { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--qp-text3); }

/* Keyframes */
@keyframes qpFadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
@keyframes qpPopIn  { from { transform:scale(0.4); opacity:0; } to { transform:scale(1); opacity:1; } }
@keyframes qpDot    { 0%,80%,100%{transform:scale(0.5);opacity:0.3} 40%{transform:scale(1);opacity:1} }
@keyframes qpSpin   { to { transform:rotate(360deg); } }

/* WooCommerce form overrides inside payment form box */
#qp-payment-form .woocommerce-checkout-payment,
#qp-payment-form ul.payment_methods { list-style: none; padding: 0; margin: 0; }
#qp-payment-form .payment_box { background: var(--qp-bg); border-radius: 10px; padding: 14px; margin-top: 10px; font-size: 14px; }
#qp-payment-form input[type="text"],
#qp-payment-form input[type="tel"],
#qp-payment-form input[type="email"],
#qp-payment-form select {
  width: 100%; background: var(--qp-bg); border: 1.5px solid var(--qp-border);
  border-radius: 10px; padding: 12px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px;
  outline: none; transition: all 0.18s;
}
#qp-payment-form input:focus { border-color: var(--qp-accent); }

@media (max-width: 480px) {
  .qp-card-body { padding: 20px 18px 18px; }
  .qp-title { font-size: 17px; }
}

/* Gateway loading & dynamic render */
.qp-gw-loading {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 14px; font-size: 14px; color: var(--qp-text3);
  background: var(--qp-bg); border-radius: 10px; border: 1.5px solid var(--qp-border);
}
.qp-spin-sm {
  width: 16px; height: 16px; flex-shrink: 0;
  border: 2px solid var(--qp-border); border-top-color: var(--qp-accent);
  border-radius: 50%; animation: qpSpin 0.65s linear infinite;
}
.qp-gw-error {
  padding: 12px 14px; font-size: 13px; color: var(--qp-red);
  background: var(--qp-red-bg); border-radius: 10px;
  border: 1px solid #fecaca;
}
.qp-gw-img {
  max-width: 32px; max-height: 20px; object-fit: contain; display: block;
}
.qp-gw-emoji { font-size: 15px; line-height: 1; }

/* ── v3 fixes ── */
.qp-gw-loading {
  display:flex; align-items:center; gap:10px; padding:16px 14px;
  font-size:14px; color:var(--qp-text3);
  background:var(--qp-bg); border-radius:10px; border:1.5px solid var(--qp-border);
}
.qp-spin-inline {
  display:inline-block; width:15px; height:15px; flex-shrink:0;
  border:2px solid var(--qp-border); border-top-color:var(--qp-accent);
  border-radius:50%; animation:qpSpin .6s linear infinite;
}
.qp-gw-err {
  padding:12px 14px; font-size:13px; color:var(--qp-red);
  background:var(--qp-red-bg); border:1px solid #fecaca; border-radius:10px;
}
/* gateway radio renamed */
.qp-radio {
  width:18px; height:18px; border-radius:50%; border:2px solid var(--qp-border);
  background:var(--qp-white); flex-shrink:0;
  display:flex; align-items:center; justify-content:center; transition:all .15s;
}
.qp-method.chosen .qp-radio { border-color:var(--qp-accent); background:var(--qp-accent); }
.qp-method.chosen .qp-radio::after { content:''; width:6px; height:6px; background:#fff; border-radius:50%; }
/* icon box */
.qp-mi { width:32px; height:23px; background:var(--qp-white); border:1px solid var(--qp-border); border-radius:5px; display:flex; align-items:center; justify-content:center; font-size:14px; flex-shrink:0; overflow:hidden; }
.qp-mi img { max-width:28px; max-height:18px; object-fit:contain; }
/* text */
.qp-mn { font-size:14px; font-weight:700; color:var(--qp-text); }
.qp-ms { font-size:12px; color:var(--qp-text3); margin-top:1px; }
