/* ========================================================================
   BRANDIFY — Checkout pages (pay / online-pay)
   يعتمد متغيّرات Cyber Neon المعرّفة في style.css
   ======================================================================== */

.pay-head {
  padding: 130px 0 40px;
  position: relative;
  overflow: hidden;
}

.pay-head::before {
  content: '';
  position: absolute;
  width: min(520px, 80vw);
  height: min(520px, 80vw);
  top: -260px;
  inset-inline-end: -160px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.16), transparent 70%);
  filter: blur(70px);
  pointer-events: none;
}

.pay-head .container { position: relative; z-index: 2; }

.pay-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pay-crumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s ease; }
.pay-crumb a:hover { color: var(--neon-cyan); }
.pay-crumb svg { width: 14px; height: 14px; opacity: 0.5; transform: scaleX(-1); }
.pay-crumb .now { color: var(--neon-cyan); font-weight: 700; }

.pay-head h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 12px;
}

.pay-head p {
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 2;
  font-size: clamp(0.9rem, 2vw, 1rem);
}

.pay-section { padding: 10px 0 90px; }

/* ── Layout ── */
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* ── Form card ── */
.form-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3.5vw, 34px);
}

.checkout-head { margin-bottom: 24px; }

.checkout-head h2 {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.checkout-head p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.9;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field { display: flex; flex-direction: column; min-width: 0; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.field .req { color: var(--neon-cyan); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(5, 13, 26, 0.75);
  border: 1px solid rgba(0, 240, 255, 0.14);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { resize: vertical; min-height: 96px; }

/* سهم القائمة المنسدلة — SVG مضمّن (أوضح من رسمه بالتدرّجات) */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238899AA' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: left 16px center;
  background-size: 14px 14px;
  background-repeat: no-repeat;
  padding-inline-start: 42px;
  cursor: pointer;
}

.field select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300F0FF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.1);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }

.field .err {
  display: none;
  margin-top: 6px;
  font-size: 0.76rem;
  color: #FF6B6B;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #FF6B6B; }
.field.invalid .err { display: block; }

/* ── Amount field (quick pay) ── */
.amount-field { margin-bottom: 20px; }

.amount-wrap { position: relative; display: flex; align-items: center; }

/* الحقل LTR ليُكتب الرقم بترتيب صحيح، لكن محاذاته لليمين
   لأن كلمة «ريال» مثبّتة يساراً — وإلا تراكبا (خطأ أُصلح 2026-09-22).
   خصائص فيزيائية مقصودة هنا: اتجاه الحقل ثابت LTR داخل صفحة RTL. */
.amount-wrap input {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.5px;
  direction: ltr;
  text-align: right;
  padding: 16px 18px 16px 78px;
}

.amount-wrap input::placeholder { text-align: right; }

.amount-cur {
  position: absolute;
  left: 18px;
  right: auto;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.amount-chips button {
  padding: 8px 15px;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.amount-chips button:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.1);
}

/* ── Honeypot: clip-path (لا left:-9999px — يكسر RTL بتجاوز أفقي) ── */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Agreement ── */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 22px 0 6px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 240, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(0, 240, 255, 0.03);
}

.check-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #00F0FF;
  cursor: pointer;
}

.check-row label {
  font-size: 0.82rem;
  line-height: 1.95;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-row .agree-lead { display: block; margin-bottom: 3px; color: var(--text-muted); }
.check-row a { color: var(--neon-cyan); text-decoration: none; }
.check-row a:hover { text-decoration: underline; }
.check-row.invalid { border-color: #FF6B6B; }

/* ── Error box ── */
.pay-error {
  display: none;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 107, 107, 0.35);
  border-radius: var(--radius);
  background: rgba(255, 107, 107, 0.07);
  color: #FF8080;
  font-size: 0.85rem;
  line-height: 1.8;
}

.pay-error.show { display: flex; }
.pay-error svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* ── Submit ── */
.pay-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 16px 22px;
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 800;
  color: var(--bg-primary);
  background: linear-gradient(135deg, #00FF88, #00D4FF);
  box-shadow: 0 10px 28px rgba(0, 255, 136, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.pay-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 255, 136, 0.3);
}

.pay-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.pay-submit svg { width: 19px; height: 19px; flex-shrink: 0; }

.spin {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(5, 13, 26, 0.3);
  border-top-color: var(--bg-primary);
  border-radius: 50%;
  animation: paySpin 0.8s linear infinite;
}

.is-busy .spin { display: block; }
.is-busy .btn-ico { display: none; }

@keyframes paySpin { to { transform: rotate(360deg); } }

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--text-muted);
}

.form-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--neon-cyan); }

/* ── Summary card ── */
.summary-card {
  position: sticky;
  top: 96px;
  background: linear-gradient(160deg, rgba(17, 34, 64, 0.85), rgba(13, 27, 42, 0.95));
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 28px);
  min-width: 0;
}

.summary-card .eyebrow {
  display: inline-block;
  padding: 5px 13px;
  margin-bottom: 14px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.22);
}

.sum-name {
  font-size: clamp(1.1rem, 2.6vw, 1.3rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.sum-desc {
  font-size: 0.84rem;
  line-height: 1.95;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.sum-list { list-style: none; margin: 0 0 20px; padding: 0; }

.sum-list li {
  position: relative;
  padding-inline-start: 24px;
  margin-bottom: 10px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.sum-list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.45);
}

.sum-list li::after {
  content: '';
  position: absolute;
  inset-inline-start: 4px;
  top: 11px;
  width: 5px;
  height: 3px;
  border-inline-start: 1.6px solid #00FF88;
  border-bottom: 1.6px solid #00FF88;
  transform: rotate(-45deg);
}

.sum-total {
  padding: 18px 0 14px;
  border-top: 1px dashed rgba(0, 240, 255, 0.18);
  transition: opacity 0.25s ease;
}

.sum-total.is-dim { opacity: 0.45; }
.sum-total .lbl { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 8px; }

.sum-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.sum-amount .num {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 900;
  color: transparent;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  -webkit-background-clip: text;
  background-clip: text;
  direction: ltr;
  unicode-bidi: isolate;
}

.sum-amount span { font-size: 0.84rem; color: var(--text-secondary); font-weight: 700; }

.sum-vat { margin-top: 10px; font-size: 0.74rem; line-height: 1.8; color: var(--text-muted); }

/* ── Payment methods + security note ── */
.pay-methods {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 240, 255, 0.1);
}

.pm-title { display: block; font-size: 0.76rem; color: var(--text-muted); margin-bottom: 11px; }

.pm-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* شعارات الدفع الحقيقية — بطاقات موحّدة 750×471 */
.pm-logo {
  width: 52px;
  height: 33px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pm-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(0, 240, 255, 0.4), 0 6px 14px rgba(0, 0, 0, 0.4);
}

/* بديل نصي إن تعذّر تحميل الشعار */
.pm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(5, 13, 26, 0.6);
  border: 1px solid rgba(0, 240, 255, 0.12);
}

.pm-chip svg { width: 15px; height: 15px; opacity: 0.8; }
.pm-chip .ltr { direction: ltr; unicode-bidi: isolate; }

.secure-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  font-size: 0.74rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.secure-note svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; color: #00FF88; }

/* ── Notices (gateway off / bad package) ── */
.pay-notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 22px;
  padding: 15px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 176, 32, 0.32);
  background: rgba(255, 176, 32, 0.07);
  color: #FFC766;
  font-size: 0.86rem;
  line-height: 1.9;
}

.pay-notice svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; }
.pay-notice a { color: var(--neon-cyan); font-weight: 700; }

/* ── Responsive ── */
@media (max-width: 980px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .summary-card { position: static; order: -1; }
}

@media (max-width: 560px) {
  .pay-head { padding: 110px 0 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .field input, .field select, .field textarea { font-size: 16px; } /* يمنع تكبير iOS */
}
