/* /pay/ payer page (merchant pay-me + OIMP) — additions on top of the shared
   hosted-page stylesheet /i/css/payment-redesign.css (.tp framework).
   Visual layer only: the form markup keeps its legacy hooks (#frm, .alert-*,
   .form-group, .input-group, .form-actions, .form-processing) so the untouched
   js/pay.js keeps working. */

/* Arabic mirror uses IBM Plex Sans Arabic (same as Public/c/). */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');
.tp[dir="rtl"], .tp[dir="rtl"] input, .tp[dir="rtl"] select,
.tp[dir="rtl"] textarea, .tp[dir="rtl"] button {
  font-family: 'IBM Plex Sans Arabic', 'Schibsted Grotesk', -apple-system, sans-serif;
}

/* amounts / phone numbers / dates stay LTR inside RTL text */
.pp-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* language toggle in the top bar */
.pp-lang { margin-inline-start: auto; margin-inline-end: 10px; font-size: 13px; font-weight: 600; text-decoration: none; color: #2A3747; opacity: .75; }
.pp-lang:hover { opacity: 1; color: #2A3747; }

.display-none { display: none; }

/* ---------- merchant branding extras ---------- */
.pp-slogan { font-size: 13px; color: #4a5568; margin-top: 10px; }
.pp-biz-website { display: inline-block; font-size: 12.5px; font-weight: 600; color: #F0536B; margin-top: 8px; overflow-wrap: anywhere; }
.pp-biz-website:hover { color: #d94660; }
.pp-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pp-social a { font-size: 11.5px; font-weight: 700; color: #5b6675; background: rgba(42,55,71,.07); border-radius: 999px; padding: 4px 12px; }
.pp-social a:hover { background: rgba(42,55,71,.12); color: #2A3747; }

/* ---------- OIMP amount hero + slots status ---------- */
.pp-amt-hero { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: 16px; }
.pp-amt-hero .tp-cur { font-size: 14px; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pp-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.pp-chip-paid { background: rgba(15,169,114,.12); color: #17714b; }
.pp-chip-left { background: rgba(240,83,107,.12); color: #b32a41; }
.pp-chip-open { background: rgba(42,55,71,.08); color: #2A3747; }
.pp-progress { height: 8px; border-radius: 6px; background: rgba(42,55,71,.08); overflow: hidden; margin-top: 10px; }
.pp-progress-fill { height: 100%; border-radius: 6px; background: #0FA972; }
.pp-expiry { font-size: 12.5px; color: #6b7686; margin-top: 10px; }

/* ---------- form fields ---------- */
.form-group { margin-bottom: 14px; }
.pp-label { display: block; font-size: 12.5px; font-weight: 700; color: #3B4552; margin-bottom: 6px; }
.pp-field {
  min-height: 50px; background: #fff; border-radius: 14px; border: 1.5px solid #E4E6EA;
  display: flex; align-items: center; flex-wrap: wrap; padding: 0 16px; gap: 10px;
  transition: border-color .15s;
}
.pp-field:focus-within { border-color: #F0536B; }
.pp-field input, .pp-field textarea {
  border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 14.5px; color: #212B38; flex: 1; min-width: 0; padding: 13px 0;
}
.pp-field input::placeholder, .pp-field textarea::placeholder { color: #8A93A0; }
.pp-field input[readonly], .pp-field textarea[readonly] { color: #5B6470; }
.pp-textarea { padding: 0 16px; }
.pp-textarea textarea { width: 100%; min-height: 84px; resize: vertical; padding: 12px 0; }
.pp-field input[type=number] { -moz-appearance: textfield; }
.pp-field input[type=number]::-webkit-outer-spin-button,
.pp-field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* jquery-validate error states (errorClass: help-block help-block-error) */
.has-error .pp-field { border-color: #F0536B; }
span.help-block, label.help-block { flex-basis: 100%; display: block; font-size: 12px; color: #b32a41; margin: -8px 0 10px; }
.pp-field span.help-block, .pp-field label.help-block { margin: 0 0 8px; }

/* mobile row: country code + number */
.pp-mobile-row { display: flex; gap: 10px; align-items: flex-start; }
.pp-mobile-row .pp-cc { flex: 0 0 45%; min-width: 0; }
.pp-mobile-row .pp-num { flex: 1; min-width: 0; }

/* select2 v3 restyled to the field look */
.pp-cc .select2-container { width: 100% !important; }
.pp-cc .select2-container .select2-choice {
  height: 50px; line-height: 47px; border-radius: 14px; border: 1.5px solid #E4E6EA;
  background: #fff; box-shadow: none; padding: 0 14px; font-size: 14px; color: #212B38;
  background-image: none; filter: none;
}
.pp-cc .select2-container-active .select2-choice,
.pp-cc .select2-dropdown-open .select2-choice { border-color: #F0536B; box-shadow: none; }
.pp-cc .select2-container .select2-choice .select2-arrow { background: transparent; border: none; background-image: none; filter: none; }
.pp-cc .select2-container .select2-choice abbr { top: 18px; }
.select2-drop { border-radius: 12px; border: 1px solid #E4E6EA; box-shadow: 0 10px 30px rgba(33,43,56,.12); font-size: 13.5px; }
.select2-drop-active { border-color: #E4E6EA; }
.select2-search input { border-radius: 8px; border: 1px solid #E4E6EA; font-family: inherit; }
.select2-results .select2-highlighted { background: #F0536B; color: #fff; border-radius: 8px; }
.select2-results img.flag { margin-inline-end: 6px; vertical-align: middle; }

/* ---------- captcha ---------- */
.pp-captcha-row { display: flex; gap: 14px; align-items: flex-start; }
.pp-captcha-img { flex-shrink: 0; }
.pp-captcha-img img { display: block; border-radius: 10px; border: 1px solid #E4E6EA; background: #fff; max-height: 56px; max-width: 120px; }
#aCaptcha { display: block; font-size: 11.5px; font-weight: 600; color: #F0536B; margin-top: 6px; max-width: 120px; }
.pp-captcha-input { flex: 1; min-width: 0; margin-bottom: 0; }
.pp-help { display: block; font-size: 11.5px; color: #8A93A0; margin-top: 6px; }

/* ---------- alerts (static .alert-* markup + Metronic-shim .pp-js-alert) ---------- */
.alert, .pp-js-alert { position: relative; border-radius: 14px; padding: 13px 38px 13px 16px; font-size: 13.5px; line-height: 1.5; margin-bottom: 14px; }
.tp[dir="rtl"] .alert, .tp[dir="rtl"] .pp-js-alert { padding: 13px 16px 13px 38px; }
.alert-danger, .pp-js-danger { background: rgba(240,83,107,.1); color: #b32a41; border: 1px solid rgba(240,83,107,.25); }
.alert-success, .pp-js-success { background: rgba(15,169,114,.09); color: #106B4C; border: 1px solid rgba(15,169,114,.3); }
.pp-js-alert a { font-weight: 700; color: inherit; text-decoration: underline; }
.alert .close { position: absolute; top: 8px; inset-inline-end: 10px; border: none; background: none; font-size: 16px; line-height: 1; color: inherit; opacity: .6; cursor: pointer; padding: 2px 4px; }
.alert .close:hover { opacity: 1; }

/* ---------- submit / processing ---------- */
.form-actions { margin-top: 4px; }
.form-processing { padding: 16px 20px; }

/* ---------- state cards (invalid / expired / fully paid) ---------- */
.pp-state { text-align: center; padding: 34px 20px; }

/* footer contact line under the shared tp-footer text */
.pp-footer-contact { margin-top: 4px; }
.pp-footer-contact a { color: inherit; }
.pp-footer-contact a:hover { color: #2A3747; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* numeric inputs type LTR even in the Arabic mirror */
.tp[dir="rtl"] input[name="amt"],
.tp[dir="rtl"] input[name="cust_mobile"],
.tp[dir="rtl"] input[name="cust_email"],
.tp[dir="rtl"] input[name="captcha"] { direction: ltr; text-align: right; }

@media (max-width: 420px) {
  .pp-mobile-row { flex-direction: column; gap: 0; }
  .pp-mobile-row .pp-cc { flex: none; width: 100%; }
  .pp-captcha-row { flex-wrap: wrap; }
  .pp-amt-hero { font-size: 28px; }
}
