/* SJP Premium Checkout — shared stylesheet for all checkout pages.
   Two usage contexts: "select" (choose payment method) and "form" (enter card/EP details). */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
}

/* ── Card ── */
.co-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

/* ── Header ── */
.co-header {
  background: linear-gradient(135deg, #1a8f4c 0%, #0f6b38 100%);
  padding: 22px 28px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.co-logo { height: 36px; object-fit: contain; }
.co-secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 5px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.co-secure-badge svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── Amount Banner ── */
.co-amount-banner {
  background: linear-gradient(135deg, #f8fffe 0%, #edfaf3 100%);
  border-bottom: 1px solid #d4edda;
  padding: 22px 28px 20px;
  text-align: center;
}
.co-amount-label {
  font-size: 12px;
  font-weight: 600;
  color: #1a8f4c;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.co-amount-value {
  font-size: 42px;
  font-weight: 800;
  color: #1a2332;
  letter-spacing: -1px;
  line-height: 1;
}
.co-amount-currency {
  font-size: 20px;
  font-weight: 600;
  color: #4a5568;
  vertical-align: super;
  margin-right: 3px;
}
.co-amount-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12.5px;
  color: #718096;
  flex-wrap: wrap;
}
.co-order-chip {
  background: #e2e8f0;
  border-radius: 12px;
  padding: 3px 10px;
  font-weight: 600;
  color: #4a5568;
  font-size: 12px;
}

/* ── Body ── */
.co-body { padding: 24px 28px; }

/* ── Info / Note Box ── */
.co-info-box {
  background: #fffbeb;
  border: 1px solid #fbd38d;
  border-left: 4px solid #ed8936;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #744210;
  line-height: 1.5;
  margin-bottom: 22px;
}
.co-info-box strong { color: #c05621; }

/* ── Already-granted success box ── */
.co-granted-box {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-left: 4px solid #38a169;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 22px;
  text-align: center;
}
.co-granted-box .co-granted-title {
  font-size: 17px;
  font-weight: 700;
  color: #276749;
  margin-bottom: 8px;
}
.co-granted-box p { font-size: 13.5px; color: #2f855a; line-height: 1.5; margin-bottom: 6px; }

/* ── Payment method cards (selector pages) ── */
.co-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 4px;
}
.co-method-card {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px 12px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.co-method-card:hover {
  border-color: #1a8f4c;
  box-shadow: 0 4px 16px rgba(26,143,76,0.15);
  transform: translateY(-2px);
}
.co-method-card img { height: 32px; object-fit: contain; }
.co-method-card .co-method-label { font-size: 13px; font-weight: 700; color: #1a2332; }
.co-method-card .co-method-sub { font-size: 11px; color: #718096; }
button.co-method-card { outline: none; border-style: solid; }

/* ── Section title ── */
.co-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 18px;
}
.co-method-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.co-method-icon img { height: 20px; }

/* ── Label / Input ── */
.co-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 7px;
  letter-spacing: 0.3px;
}
.co-input {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  color: #1a2332;
  background: #f7fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  margin-bottom: 16px;
}
.co-input:focus {
  border-color: #1a8f4c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,143,76,0.12);
}
.co-input::placeholder { color: #a0aec0; }

/* ── Price selector ── */
.co-select-wrap {
  position: relative;
  margin-bottom: 16px;
}
.co-select {
  width: 100%;
  padding: 13px 40px 13px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1a2332;
  background: #f7fafc;
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.co-select:focus {
  border-color: #1a8f4c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,143,76,0.12);
}
.co-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  display: block;
  transform: translateY(-50%);
  pointer-events: none;
  color: #718096;
}

/* ── Stripe card element container ── */
.co-stripe-wrap {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  background: #f7fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 16px;
}
.co-stripe-wrap.focused {
  border-color: #1a8f4c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26,143,76,0.12);
}

/* ── Pay Button ── */
.co-pay-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #1a8f4c 0%, #0f6b38 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(26,143,76,0.35);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.co-pay-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,143,76,0.4); }
.co-pay-btn:active { transform: translateY(0); }
.co-pay-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.co-pay-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Search-lawyer button (already-granted state) */
.co-cta-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1a8f4c 0%, #0f6b38 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(26,143,76,0.3);
  cursor: pointer;
}

/* ── Status messages ── */
.co-msg { display: none; text-align: center; padding: 14px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-top: 14px; }
.co-msg-success { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.co-msg-error   { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; }
.co-msg-wait    { background: #ebf8ff; color: #2c5282; border: 1px solid #90cdf4; }

/* ── Processing overlay ── */
.co-processing {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 0 8px;
  text-align: center;
}
.co-spinner {
  width: 44px; height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: #1a8f4c;
  border-radius: 50%;
  animation: co-spin 0.8s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }
.co-processing p { font-size: 14px; color: #4a5568; font-weight: 500; }
.co-processing strong { color: #1a2332; display: block; font-size: 15px; margin-bottom: 2px; }

/* ── Payment success screen ── */
.co-success-screen {
  padding: 28px 28px 8px;
  text-align: center;
}
.co-success-icon {
  width: 64px; height: 64px;
  background: #1a8f4c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.co-success-icon svg { width: 32px; height: 32px; color: #fff; }
.co-success-title { font-size: 22px; font-weight: 800; color: #1a2332; margin-bottom: 8px; }
.co-success-code {
  font-size: 48px;
  font-weight: 900;
  color: #1a8f4c;
  letter-spacing: 6px;
  background: #f0fff4;
  border: 2px dashed #9ae6b4;
  border-radius: 12px;
  padding: 12px;
  margin: 16px 0;
}
.co-success-sub { font-size: 13px; color: #718096; margin-bottom: 8px; }

/* ── Easypaisa full-screen processing overlay ── */
#loading2 {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #eef2f7;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ep-ov-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 48px rgba(0,0,0,.18);
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ep-ov-img-section { position: relative; padding-top: 52px; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.ep-ov-logo { display: block; width: 100%; height: auto; }
.ep-ov-ring-box { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 100px; height: 100px; background: #fff; border-radius: 50%; box-shadow: 0 4px 20px rgba(0,0,0,.12); z-index: 2; }
.ep-ov-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ep-ov-ring-bg { fill: none; stroke: #e2e8f0; stroke-width: 10; }
.ep-ov-ring-track { fill: none; stroke: #22c55e; stroke-width: 10; stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear, stroke .6s ease; }
.ep-ov-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ep-ov-seconds { font-size: 28px; font-weight: 900; color: #1a2332; line-height: 1; letter-spacing: -.02em; }
.ep-ov-sec-lbl { font-size: 9px; color: #718096; text-transform: uppercase; letter-spacing: .1em; margin-top: 1px; }
.ep-ov-body { padding: 14px 22px 20px; text-align: center; flex-shrink: 0; }
.ep-ov-title { font-size: 16px; font-weight: 800; color: #1a2332; margin: 0 0 6px; }
.ep-ov-sub { font-size: 13px; color: #374151; line-height: 1.55; margin: 0 0 14px; font-weight: 500; }
.ep-ov-warn { font-size: 10.5px; color: #9ca3af; text-transform: uppercase; letter-spacing: .08em; padding-top: 10px; border-top: 1px solid #e5e7eb; margin: 0; }

/* ── Divider ── */
.co-divider { height: 1px; background: #e2e8f0; margin: 20px 0; }

/* ── Trust Footer ── */
.co-trust {
  padding: 16px 28px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.co-trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #718096;
  font-weight: 500;
}
.co-trust-item svg { width: 14px; height: 14px; color: #1a8f4c; }

/* ── Mobile ── */
@media (max-width: 480px) {
  body { padding: 12px 10px 40px; }
  .co-card { border-radius: 16px; }
  .co-header { padding: 18px 20px; }
  .co-amount-banner { padding: 18px 20px; }
  .co-amount-value { font-size: 34px; }
  .co-body { padding: 18px 20px; }
  .co-trust { padding: 12px 20px 18px; gap: 12px; }
  .co-pay-btn { font-size: 15px; padding: 14px; }
  .co-methods { grid-template-columns: 1fr 1fr; gap: 10px; }
}
