/* =====================================================================
   صفحة «طلب الشراكة» (partner.html, 14 Nov) — التحالف الوطني | NACDW v2
   Option B (designer): a step-by-step form + «مراجعة الطلب» before sending.
   Built only from the existing tokens: site.css (--green-900, --orange, Cairo, .btn .btn-primary / .btn-outline,
   .eyebrow-line, .wrap) and the #mj tokens in areas.css (--base, --acc, --line, --soft, --dark, --body, --medium, --r*).
   Fields follow the areas search field (#mj .mj-search input): 1px --line border, --base focus with the same ring.
   No decorative motion: steps swap instantly.
   ===================================================================== */

#mj .pt-sec{ background:linear-gradient(180deg, var(--soft) 0, #fff 420px); }

/* page head: same eyebrow + two-tone h2 as the section heads on areas/platforms */
#mj .pt-head{ max-width:760px; margin-bottom:36px; }
#mj .pt-head .mj-h2{ font-size:clamp(1.9rem, 3.1vw, 2.75rem); line-height:1.35; }
#mj .pt-head .mj-h2 .l1{ display:block; }
#mj .pt-head .mj-h2 .l2{ display:block; color:var(--acc); }
#mj .pt-head p{ margin-top:14px; font-size:17px; line-height:1.85; color:var(--body); }

/* layout (14 Nov, designer): one centred column; the steps are a row of circles at the top of the card */
/* the page head stays right-aligned (designer, 14 Nov), like the section heads on every other page */
#mj .pt-grid{ max-width:860px; margin-inline:auto; }

/* stepper: numbered circles joined by a line; finished = filled with a tick, current = ringed, next = outline.
   No text beside the circles (the step name is the heading under them), so the row reads at a glance. */
#mj .pt-stepper{ margin-bottom:32px; }
html:not(.pt-js) #mj .pt-stepper{ display:none; }                 /* no-JS: all steps show stacked, no stepper */
#mj .pt-steps{ list-style:none; margin:0 auto; padding:0; max-width:520px; display:flex; align-items:center; }
#mj .pt-steps li{ display:flex; align-items:center; }
#mj .pt-steps li + li{ flex:1; }
#mj .pt-steps li + li::before{ content:""; flex:1; height:2px; margin:0 8px; border-radius:2px; background:var(--line); transition:background .25s; }
#mj .pt-steps li.done::before, #mj .pt-steps li.cur::before, #mj .pt-steps li.open::before{ background:var(--base); }
#mj .pt-si{ flex:none; padding:0; border:0; background:transparent; border-radius:50%; cursor:default; font-family:inherit; }
#mj .pt-si .n{ width:40px; height:40px; border-radius:50%; display:grid; place-items:center; font-size:15px; font-weight:700;
  border:2px solid var(--line); background:#fff; color:var(--medium); transition:background .25s, border-color .25s, color .25s; }
#mj .pt-steps li.cur .n{ border-color:var(--base); color:var(--base); box-shadow:0 0 0 5px rgba(242,140,40,.18); }
#mj .pt-steps li.done .n{ background:var(--base); border-color:var(--base); color:transparent; position:relative; }
#mj .pt-steps li.done .n::after{ content:""; position:absolute; width:12px; height:7px; border:solid #fff; border-width:0 2.5px 2.5px 0; transform:translateY(-2px) rotate(45deg); }
#mj .pt-steps li.open .n{ border-color:var(--base); color:var(--base); }
#mj .pt-steps li.done .pt-si, #mj .pt-steps li.open .pt-si{ cursor:pointer; }
#mj .pt-steps li.done .pt-si:hover .n{ background:var(--base-2); border-color:var(--base-2); }
#mj .pt-steps li.open .pt-si:hover .n{ background:var(--soft); }
#mj .pt-si:focus-visible{ outline:2px solid var(--base); outline-offset:3px; }

/* the form card */
#mj .pt-card{ background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:40px 44px; box-shadow:0 18px 40px -28px rgba(14,91,82,.28); }
#mj .pt-req{ margin:0 0 24px; font-size:14px; color:var(--medium); }
#mj .pt-step{ border:0; margin:0; padding:0; min-width:0; }
#mj .pt-step + .pt-step{ margin-top:48px; }                     /* no-JS: all steps stacked */
.pt-js #mj .pt-step + .pt-step{ margin-top:0; }
.pt-js #mj .pt-step:not(.on){ display:none; }
#mj .pt-sh{ padding-bottom:20px; margin-bottom:28px; border-bottom:1px solid var(--line-2); }
#mj .pt-sh .no{ display:inline-block; font-size:13px; font-weight:700; color:var(--acc); margin-bottom:6px; }
#mj .pt-sh h2{ font-size:clamp(1.35rem, 2vw, 1.6rem); line-height:1.4; font-weight:700; color:var(--base); outline:none; }
#mj .pt-sh p{ margin-top:6px; font-size:15px; color:var(--medium); }

/* fields */
#mj .pt-fields{ display:flex; flex-direction:column; gap:24px; }
#mj .pt-row{ display:grid; grid-template-columns:1fr 1fr; gap:24px; }       /* only short, related pairs (contact step) */
#mj .pt-f{ display:flex; flex-direction:column; gap:8px; min-width:0; }
#mj .pt-f[hidden]{ display:none; }
#mj .pt-f label, #mj .pt-f .lbl{ font-size:15px; font-weight:700; color:var(--dark); }
#mj .opt{ font-weight:500; color:var(--medium); font-size:14px; }
#mj .pt-f .hint{ margin:-2px 0 0; font-size:13.5px; line-height:1.7; color:var(--medium); }
#mj .pt-f input, #mj .pt-f select, #mj .pt-f textarea{ width:100%; margin:0; padding:0 16px; height:52px; border:1px solid var(--line); border-radius:var(--r);
  background:#fff; font-family:inherit; font-size:15px; color:var(--dark); transition:border-color .2s, box-shadow .2s; }
#mj .pt-f textarea{ height:auto; min-height:132px; padding:14px 16px; line-height:1.8; resize:vertical; }
#mj .pt-f input[dir="ltr"]{ text-align:left; }
#mj .pt-f input::placeholder, #mj .pt-f textarea::placeholder{ color:#93A09D; }
#mj .pt-f input:hover, #mj .pt-f select:hover, #mj .pt-f textarea:hover{ border-color:#C9D6D3; }
#mj .pt-f input:focus, #mj .pt-f select:focus, #mj .pt-f textarea:focus{ outline:none; border-color:var(--base); box-shadow:0 0 0 4px rgba(14,91,82,.12); }
#mj .pt-f .sel{ position:relative; }
#mj .pt-f select{ appearance:none; -webkit-appearance:none; padding-inline-end:44px; cursor:pointer; }
#mj .pt-f select:invalid{ color:#93A09D; }
#mj .pt-f select option{ color:var(--dark); }
#mj .pt-f .sel::after{ content:""; position:absolute; inset-inline-end:18px; top:50%; width:8px; height:8px; margin-top:-6px; border:solid var(--medium); border-width:0 0 2px 2px; transform:rotate(-45deg); pointer-events:none; }
/* errors */
#mj .pt-f .err{ margin:0; font-size:13.5px; font-weight:600; color:#B42318; }
#mj .pt-f .err:empty{ display:none; }
#mj .pt-f [aria-invalid="true"]{ border-color:#D92D20; }
#mj .pt-f [aria-invalid="true"]:focus{ box-shadow:0 0 0 4px rgba(217,45,32,.12); }

/* files: drop area (also a normal click target) + the chosen files with remove buttons */
#mj .pt-drop{ position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:156px; padding:24px;
  border:1.5px dashed #C9D6D3; border-radius:var(--r-md); background:var(--soft); text-align:center; cursor:pointer; transition:border-color .2s, background .2s; }
#mj .pt-drop:hover, #mj .pt-drop.over{ border-color:var(--base); background:#EAF2F0; }
#mj .pt-drop:focus-within{ border-color:var(--base); box-shadow:0 0 0 4px rgba(14,91,82,.12); }
#mj .pt-drop .ic{ width:48px; height:48px; border-radius:50%; display:grid; place-items:center; background:#fff; color:var(--base); font-size:22px; }
#mj .pt-drop .t{ font-size:15px; color:var(--body); }
#mj .pt-drop .t b{ color:var(--base); font-weight:700; text-decoration:underline; text-underline-offset:4px; }
#mj .pt-drop input{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; }
#mj .pt-drop.bad{ border-color:#D92D20; }
#mj .pt-files{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
#mj .pt-files:empty{ display:none; }
#mj .pt-files li{ display:flex; align-items:center; gap:12px; padding:10px 8px 10px 12px; border:1px solid var(--line); border-radius:var(--r); background:#fff; }
#mj .pt-files .ft{ flex:none; min-width:46px; height:30px; padding:0 6px; border-radius:8px; display:grid; place-items:center; background:var(--soft); color:var(--base); font-size:12px; font-weight:700; direction:ltr; }
#mj .pt-files .fn{ flex:1; min-width:0; font-size:14.5px; color:var(--dark); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; direction:ltr; text-align:left; }
#mj .pt-files .fs{ flex:none; font-size:13px; color:var(--medium); direction:ltr; }
#mj .pt-files .rm{ flex:none; width:36px; height:36px; border-radius:50%; display:grid; place-items:center; border:0; background:transparent; color:var(--medium); cursor:pointer; font-size:18px; }
#mj .pt-files .rm:hover{ background:#FDECEA; color:#B42318; }
#mj .pt-files .rm:focus-visible{ outline:2px solid var(--base); outline-offset:1px; }

/* review */
#mj .pt-rev{ display:flex; flex-direction:column; gap:16px; }
#mj .pt-rg{ border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden; }
#mj .pt-rg .hd{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; background:var(--soft); }
#mj .pt-rg h3{ font-size:16px; font-weight:700; color:var(--base); }
#mj .pt-rg .ed{ display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:#fff;
  font-family:inherit; font-size:14px; font-weight:600; color:var(--base); cursor:pointer; }
#mj .pt-rg .ed:hover{ border-color:var(--base); }
#mj .pt-rg .ed:focus-visible{ outline:2px solid var(--base); outline-offset:2px; }
#mj .pt-rg dl{ margin:0; padding:6px 18px; }
#mj .pt-rg .it{ display:grid; grid-template-columns:200px minmax(0,1fr); gap:16px; padding:12px 0; }
#mj .pt-rg .it + .it{ border-top:1px solid var(--line-2); }
#mj .pt-rg dt{ font-size:14px; color:var(--medium); }
#mj .pt-rg dd{ margin:0; font-size:15px; font-weight:600; color:var(--dark); white-space:pre-line; overflow-wrap:anywhere; }
#mj .pt-rg dd.empty{ font-weight:500; color:#93A09D; }

/* actions: «السابق» start, «التالي / إرسال الطلب» end; the homepage .btn sizes */
#mj .pt-nav{ display:flex; align-items:center; gap:12px; margin-top:36px; padding-top:24px; border-top:1px solid var(--line-2); }
#mj .pt-nav .pt-next, #mj .pt-nav .pt-send{ margin-inline-start:auto; }
/* areas.css resets every <button> inside #mj (#mj button{ background:none; border:0; padding:0; color:inherit }), which
   strips the homepage .btn off these <button>s; restore exactly the site.css values (.btn 48px / 0 24px, .btn-primary,
   .btn-outline with the green-900 border) */
#mj .pt-nav .btn{ padding:0 24px; border:1.5px solid transparent; }
#mj .pt-nav .btn-primary{ background:var(--green-900); color:#fff; }
#mj .pt-nav .btn-primary:hover{ background:var(--green); }
#mj .pt-nav .btn-outline{ background:transparent; color:var(--green-900); border-color:var(--green-900); }   /* 17 Nov: = homepage .btn-outline */
#mj .pt-nav .btn-outline:hover{ background:rgba(255,255,255,.35); }
.pt-js #mj .pt-prev[hidden], .pt-js #mj .pt-next[hidden], .pt-js #mj .pt-send[hidden]{ display:none; }
html:not(.pt-js) #mj .pt-prev, html:not(.pt-js) #mj .pt-next{ display:none; }   /* no-JS: one plain submit */

/* sent */
#mj .pt-done{ text-align:center; padding:24px 0 8px; outline:none; }
#mj .pt-done[hidden]{ display:none; }
#mj .pt-done .ok{ width:72px; height:72px; margin:0 auto 20px; border-radius:50%; display:grid; place-items:center; background:var(--soft); color:var(--base); font-size:34px; }
#mj .pt-done .ok svg.i{ stroke-width:2.2; }
#mj .pt-done h2{ font-size:clamp(1.5rem, 2.4vw, 1.9rem); font-weight:700; color:var(--base); }
#mj .pt-done p{ max-width:520px; margin:12px auto 28px; font-size:16px; line-height:1.9; color:var(--body); }

/* ---------- tablet ---------- */
@media (max-width:980px){
  #mj .pt-card{ padding:32px; }
  #mj .pt-head{ margin-bottom:28px; }
}
/* ---------- phones ---------- */
@media (max-width:767px){
  #mj .pt-head p{ font-size:16px; }
  #mj .pt-card{ padding:24px 18px; border-radius:var(--r-md); }
  #mj .pt-row{ grid-template-columns:minmax(0, 1fr); }
  #mj .pt-stepper{ margin-bottom:24px; }
  #mj .pt-si .n{ width:34px; height:34px; font-size:14px; }
  #mj .pt-steps li + li::before{ margin:0 4px; }
  #mj .pt-f input, #mj .pt-f select, #mj .pt-f textarea{ font-size:16px; }   /* 16px stops iOS zooming in on focus */
  #mj .pt-sh{ margin-bottom:22px; padding-bottom:16px; }
  #mj .pt-rg .it{ grid-template-columns:minmax(0, 1fr); gap:4px; }
  #mj .pt-rg .hd{ padding:10px 14px; }
  #mj .pt-rg dl{ padding:4px 14px; }
  #mj .pt-nav{ gap:10px; }
  #mj .pt-nav .btn{ flex:1; justify-content:center; padding:0 16px; }
  #mj .pt-drop{ min-height:132px; }
}

/* ===== 22 Nov (owner): «قدّم طلب الشراكة» as a POPUP — title + steps indicator fixed on top, one step at a time in the
   middle, «السابق / التالي» fixed at the bottom. Phones: full screen. ===== */
#mj .pt-modal { width: min(820px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 0;
  border-radius: 28px; background: #fff; color: var(--body); overflow: hidden; box-shadow: 0 40px 90px -30px rgba(4, 40, 35, .55); }
#mj .pt-modal[open] { display: flex; flex-direction: column; animation: ptIn .35s cubic-bezier(.22, 1, .36, 1); }
#mj .pt-modal::backdrop { background: rgba(4, 36, 31, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
@keyframes ptIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
#mj .pt-mwrap { display: flex; flex-direction: column; min-height: 0; flex: 1; }
#mj .pt-mhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 30px 6px; }
#mj .pt-mt { display: grid; gap: 4px; }
#mj .pt-mt .eyebrow { font-size: 13.5px; color: var(--orange); font-weight: 700; }
#mj .pt-mt .eyebrow::after { display: none; }
#mj .pt-mt h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 800; color: var(--green-900); line-height: 1.35; }
#mj .pt-mx { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: #F1F6F4; color: var(--green-900); cursor: pointer; transition: background .2s; }
#mj .pt-mx svg { width: 20px; height: 20px; }
#mj .pt-mx:hover { background: #E3EEEA; }
#mj .pt-mx:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* steps indicator on top, with each step's name under its number */
#mj .pt-modal .pt-stepper { margin: 0; padding: 14px 30px 40px; border-bottom: 1px solid var(--line-2); }
#mj .pt-modal .pt-stepper[hidden] { display: none; }
#mj .pt-modal .pt-steps { max-width: 620px; }
#mj .pt-modal .pt-steps li { position: relative; }
#mj .pt-modal .pt-si .n { width: 38px; height: 38px; }
#mj .pt-modal .pt-steps .tt { position: absolute; top: 44px; right: 19px; transform: translateX(50%); white-space: nowrap; font-size: 12.5px; font-weight: 600; color: var(--muted); }
#mj .pt-modal .pt-steps li.cur .tt { color: var(--green-900); font-weight: 800; }
#mj .pt-modal .pt-steps li.done .tt { color: var(--green-900); }
/* the step itself scrolls; buttons stay at the bottom */
#mj .pt-mbody { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 30px 0; }
#mj .pt-modal .pt-card { border: 0; border-radius: 0; padding: 0; box-shadow: none; background: none; }
#mj .pt-modal .pt-sh .no { display: none; }
#mj .pt-modal .pt-nav { position: sticky; bottom: 0; z-index: 2; margin: 28px -30px 0; padding: 16px 30px 22px; background: #fff; border-top: 1px solid var(--line-2); }
#mj .pt-modal .pt-done { padding: 34px 0 34px; }
html.mj-lock { overflow: hidden; }
@media (max-width: 767px) {
  #mj .pt-modal { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  #mj .pt-mhead { padding: 16px 18px 4px; }
  #mj .pt-modal .pt-stepper { padding: 12px 18px 16px; }
  #mj .pt-modal .pt-steps .tt { display: none; }
  #mj .pt-modal .pt-sh .no { display: inline-block; }
  #mj .pt-mbody { padding: 20px 18px 0; }
  #mj .pt-modal .pt-nav { margin: 24px -18px 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { #mj .pt-modal[open] { animation: none; } }

/* 22 Nov (admin dashboard): the send error under the form (partner + opportunity popups), same look as «اتصل بنا» */
#mj .pt-send-err, .pt-modal .pt-send-err{ margin:16px 0 0; padding:12px 16px; border:1px solid #F4C7C2; border-radius:var(--r, 14px); background:#FDF0EE; color:#8A1C12; font-size:15px; font-weight:600; line-height:1.8; }
#mj .pt-send-err[hidden], .pt-modal .pt-send-err[hidden]{ display:none; }

/* 22 Nov: the age worked out from the national ID, under the field (job application popup) */
#mj .ja-age{ margin:6px 0 0; font-size:13.5px; font-weight:700; color:var(--base, #106B62); }
#mj .ja-age[hidden]{ display:none; }

/* 25 Nov (owner): one form, two requests — «شريك تنموي» / «عضوية التحالف». Texts that differ come in pairs marked
   data-pt-kind; partner.js puts .pt-member on <html> for a membership request. */
:root:not(.pt-member) [data-pt-kind="member"], :root.pt-member [data-pt-kind="partner"] { display: none; }
