/* صفحه‌ی «همکاری با بارو» — طرح ۳۴ بررسی رابط. اندازه‌ها همان نظام واحد پیشنهادی‌اند تا بعداً
   فرم‌های دیگر هم به آن برسند: ظرف ۱۱۸۴، عنوان ۳۲/۲۸، متن ۱۶، کنترل ۴۸ با قلم ۱۶ و گردی ۱۰،
   برچسب ۱۴ وزن ۵۰۰، فاصله‌ی فیلدها ۱۶ و گروه‌ها ۲۴، کارت ۲۴ (موبایل ۱۶) با گردی ۱۶. */

.co-page { padding-bottom: 64px; }
.co-wrap { position: relative; z-index: 1; max-width: 1184px; margin: 0 auto; padding: 32px 16px 0; }

.co-head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.co-head h1 { font-size: 32px; font-weight: 700; line-height: 1.5; color: var(--ink); margin: 16px 0 8px; }
.co-head p { font-size: 16px; line-height: 1.8; color: var(--body); margin: 0; }

/* ——— کارت گروه‌ها: هر کارت همان گزینه‌ی «نوع همکاری» فرم را انتخاب می‌کند ——— */
.co-roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.co-role {
  display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center;
  min-height: 48px; padding: 24px 16px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px;
  font-family: inherit; color: var(--body);
  box-shadow: 0 4px 16px rgba(15, 76, 69, .06);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.co-role:hover { transform: translateY(-3px); border-color: rgba(15, 76, 69, .35); box-shadow: 0 10px 28px rgba(15, 76, 69, .10); }
.co-role:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.co-role[aria-pressed="true"] { border: 2px solid var(--primary); padding: 23px 15px; background: rgba(15, 76, 69, .03); }
.co-ic {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(214, 164, 77, .12); color: #A8802F;
}
.co-ic svg { width: 26px; height: 26px; }
.co-role[aria-pressed="true"] .co-ic { background: var(--primary); color: #fff; }
.co-role-t { font-size: 18px; font-weight: 700; color: var(--ink); }
.co-role-d { font-size: 14px; line-height: 1.7; }

/* ——— چیدمان: فرم (راست) + فرایند (چپ) ——— */
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.co-card {
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px; padding: 24px;
  box-shadow: 0 4px 16px rgba(15, 76, 69, .06);
}
.co-h { font-size: 20px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.co-card h3 { font-size: 18px; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.co-sub { font-size: 14px; line-height: 1.8; color: var(--body); margin: 0 0 24px; }

.co-summary {
  margin: 0 0 24px; padding: 12px 16px; border-radius: 10px;
  background: rgba(179, 38, 30, .06); border-inline-start: 4px solid #B3261E; color: #8C1D18; font-size: 14px; line-height: 1.8;
}
.co-summary[hidden] { display: none; }

.co-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.co-full { grid-column: 1 / -1; }
/* پروانه فقط برای نقش‌های دارای پروانه دیده می‌شود؛ بی آن، لینک رزومه تمام عرض می‌شود تا خانه‌ی خالی نماند. */
#co-license-wrap[hidden] + .co-field { grid-column: 1 / -1; }
.co-field { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.co-field[hidden] { display: none; }
.co-field > label, .co-field > legend { font-size: 14px; font-weight: 500; color: var(--ink); padding: 0; }
.co-field > legend { margin-bottom: 8px; }
.co-field b { color: #B3261E; font-weight: 700; }
.co-opt { color: var(--muted); font-weight: 400; }

.co-field input:not([type="radio"]):not([type="checkbox"]), .co-field textarea {
  width: 100%; box-sizing: border-box; height: 48px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 10px; background: #fff;
  font-family: inherit; font-size: 16px; line-height: 1.5; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.co-field input[dir="ltr"] { text-align: right; }
.co-field input::placeholder, .co-field textarea::placeholder { color: #9AA6A2; }
.co-field textarea { height: auto; min-height: 120px; padding: 12px; resize: vertical; line-height: 1.8; }
.co-field input:focus-visible, .co-field textarea:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-color: var(--primary);
}
.co-help { font-size: 14px; line-height: 1.6; color: var(--body); }
.co-err { display: flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.6; color: #B3261E; }
.co-err::before {
  content: "!"; display: grid; place-items: center; width: 18px; height: 18px; flex-shrink: 0;
  border-radius: 50%; background: #B3261E; color: #fff; font-size: 12px; font-weight: 800;
}
.co-err[hidden] { display: none; }
.co-field.invalid input:not([type="radio"]):not([type="checkbox"]), .co-field.invalid textarea { border-color: #B3261E; box-shadow: 0 0 0 1px #B3261E; }

/* نوع همکاری: گزینه‌های رادیویی به شکل دکمه، هدف لمس ۴۸ */
.co-radios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.co-radio {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px; background: #fff;
  font-size: 15px; line-height: 1.5; color: var(--ink);
  transition: border-color .15s ease, background-color .15s ease;
}
.co-radio:hover { border-color: rgba(15, 76, 69, .35); }
.co-radio input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--primary); }
.co-radio:has(input:checked) { border: 2px solid var(--primary); padding: 7px 11px; background: rgba(15, 76, 69, .04); font-weight: 600; }
.co-radio:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.co-field.invalid .co-radio { border-color: rgba(179, 38, 30, .55); }

.co-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.8; color: var(--ink); cursor: pointer; }
.co-consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.co-field.invalid .co-consent span { color: #B3261E; }

/* گام دوم: کد تأیید */
.co-code { display: grid; gap: 8px; margin-top: 24px; padding: 16px; border-radius: 12px; background: rgba(15, 76, 69, .04); border: 1px solid var(--border-strong); }
.co-code[hidden] { display: none; }
.co-code .co-field { max-width: 320px; }
.co-code .co-field input { text-align: center !important; letter-spacing: .5em; font-size: 20px; font-weight: 700; }
.co-code-acts { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.co-link-btn {
  min-height: 44px; padding: 0 2px; border: 0; background: none; cursor: pointer;
  color: var(--primary); font-family: inherit; font-size: 14px; font-weight: 600;
}
.co-link-btn:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.co-link-btn:disabled { color: var(--muted); cursor: default; }
.co-link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.co-grid input:read-only:not([type="radio"]):not([type="checkbox"]), .co-grid textarea:read-only { background: #F4F6F5; color: var(--body); }

/* تله‌ی ربات: با clip پنهان می‌شود نه left منفی — در صفحه‌ی راست‌به‌چپ، بیرون‌زدگی به چپ اسکرول افقی می‌سازد. */
.co-hp { position: absolute !important; inset-inline-start: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

.co-note { margin: 24px 0 0; padding: 12px 16px; border-radius: 10px; font-size: 14px; line-height: 1.8; background: rgba(179, 38, 30, .06); color: #8C1D18; border-inline-start: 4px solid #B3261E; }
.co-note[hidden] { display: none; }

.co-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 48px; margin-top: 24px; padding: 0 24px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--primary); color: #fff; font-family: inherit; font-size: 16px; font-weight: 600;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.co-submit:hover { background: var(--hover); box-shadow: 0 6px 20px rgba(15, 76, 69, .22); }
.co-submit:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.co-submit:disabled { cursor: wait; }
.co-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: co-spin .8s linear infinite; }
.co-submit.sending .co-spin { display: inline-block; }
@keyframes co-spin { to { transform: rotate(360deg); } }

.co-after { margin: 8px 0 0; font-size: 14px; line-height: 1.8; color: var(--body); text-align: center; }
.co-back {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; min-height: 44px; margin-top: 8px; text-align: center;
  border-top: 1px solid var(--border); color: var(--body); font-size: 14px; text-decoration: none;
}
.co-back span { color: var(--primary); font-weight: 600; }
.co-back:hover span, .co-back:focus-visible span { text-decoration: underline; text-underline-offset: 4px; }

.co-done { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 32px 8px; }
.co-done[hidden] { display: none; }
.co-done:focus { outline: none; }
.co-done-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: rgba(46, 139, 87, .12); color: var(--success); margin-bottom: 8px; }
.co-done-ic svg { width: 28px; height: 28px; }
.co-done h2 { font-size: 20px; font-weight: 600; color: var(--ink); margin: 0; }
.co-done p { font-size: 16px; line-height: 1.8; color: var(--body); margin: 0; }
.co-done .co-back { border-top: 0; color: var(--primary); font-weight: 600; }

/* ——— فرایند ——— */
.co-side { display: grid; gap: 24px; }
.co-steps { margin: 0; padding: 0; list-style: none; counter-reset: co; display: grid; gap: 16px; position: relative; }
.co-steps li { position: relative; padding-inline-start: 48px; counter-increment: co; min-height: 32px; }
.co-steps li::before {
  content: counter(co, persian); position: absolute; inset-inline-start: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(15, 76, 69, .08); color: var(--primary); font-weight: 700; font-size: 15px;
}
.co-steps li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: 15px; top: 36px; bottom: -14px; width: 2px; background: rgba(15, 76, 69, .10);
}
.co-steps b { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.co-steps span { font-size: 14px; line-height: 1.8; color: var(--body); }
.co-info p { font-size: 14px; line-height: 1.8; color: var(--body); margin: 0; }

@media (max-width: 1100px) {
  .co-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .co-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
  .co-layout { grid-template-columns: 1fr; }
  .co-radios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .co-wrap { padding-top: 16px; }
  .co-head h1 { font-size: 28px; }
  .co-roles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .co-roles .co-role:last-child { grid-column: 1 / -1; }
  .co-role { padding: 16px 12px; }
  .co-role[aria-pressed="true"] { padding: 15px 11px; }
  .co-role-d { font-size: 13px; }
  .co-card { padding: 16px; }
  .co-grid { grid-template-columns: 1fr; }
  .co-radios { grid-template-columns: 1fr; }
  .co-code .co-field { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .co-role, .co-submit { transition: none; }
  .co-role:hover { transform: none; }
  .co-spin { animation: none; }
}
