/* ============================================================
   امرتات استور — Terms & Conditions (قوانین و شرایط)
   Legal page · sticky TOC + content articles · RTL
   ============================================================ */

/* page-head extras */
.page-head .head-meta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; font-size: 13px; color: var(--text-2);
  background: #fff; border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 100px; box-shadow: var(--shadow-sm);
}
.page-head .head-meta i { font-size: 16px; color: var(--primary); }
.page-head .head-meta b { color: var(--text); font-weight: 700; }

/* ============================================================
   Layout
   ============================================================ */
.legal { padding-block: 64px 96px; }
.legal-grid {
  display: grid; grid-template-columns: 248px 1fr; gap: 48px;
  align-items: start;
}

/* ---- Table of contents ---- */
.toc {
  position: sticky; top: 98px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 22px 20px;
  box-shadow: var(--shadow-sm);
}
.toc-title {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; color: var(--text-3);
  letter-spacing: .02em; margin-bottom: 16px;
}
.toc-title i { font-size: 17px; color: var(--primary); }
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--text-2);
  line-height: 1.5; transition: color .2s, background .2s;
}
.toc-list a .tnum {
  font-size: 13.5px; font-weight: 700;
  color: var(--text-3); min-width: 18px; transition: color .2s;
}
.toc-list a:hover { color: var(--text); background: var(--surface); }
.toc-list a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.toc-list a.active .tnum { color: var(--primary); }

.toc-help {
  margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border);
}
.toc-help p { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 12px; }
.toc-help .btn { width: 100%; font-size: 13.5px; padding: 10px 14px; }

/* ---- Content column ---- */
.legal-body { min-width: 0; }

/* acceptance banner */
.accept-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(120deg, var(--primary-soft), rgba(139,92,246,0.06));
  border: 1px solid var(--border-strong); border-radius: var(--r-lg);
  padding: 20px 22px; margin-bottom: 40px;
}
.accept-banner .ab-ico {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-primary);
}
.accept-banner .ab-ico i { font-size: 24px; }
.accept-banner h2 { font-size: 16px; margin-bottom: 5px; }
.accept-banner p { font-size: 14.5px; color: var(--text-2); line-height: 1.85; }

/* section */
.legal-section { scroll-margin-top: 96px; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.legal-section:last-of-type { border-bottom: none; margin-bottom: 0; }
.ls-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ls-ico {
  width: 48px; height: 48px; border-radius: 13px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border);
  display: grid; place-items: center;
}
.ls-ico i { font-size: 26px; color: var(--primary); }
.ls-head .ls-num {
  font-size: 13.5px; font-weight: 700;
  color: var(--primary); display: block; margin-bottom: 3px;
}
.ls-head h2 { font-size: 22px; letter-spacing: -0.02em; }

.legal-section > p {
  font-size: 15.5px; line-height: 2; color: var(--text-2); margin-bottom: 16px;
}
.legal-section > p:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--text); font-weight: 700; }

/* itemized rules list */
.rule-list { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.rule-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; line-height: 1.95; color: var(--text);
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); padding: 15px 17px;
  transition: border-color .2s, box-shadow .2s;
}
.rule-list li:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.rule-list li i {
  font-size: 21px; flex-shrink: 0; margin-top: 1px; color: var(--primary);
}
/* allow / deny tints */
.rule-list li.allow i { color: var(--green); }
.rule-list li.deny i { color: var(--text-3); }

/* callout (refund / warning) */
.legal-callout {
  display: flex; align-items: flex-start; gap: 15px;
  border-radius: var(--r-lg); padding: 20px 22px; margin: 6px 0 0;
}
.legal-callout .co-ico { flex-shrink: 0; font-size: 28px; margin-top: 1px; }
.legal-callout .co-body h3 { font-size: 16px; margin-bottom: 6px; }
.legal-callout .co-body p { font-size: 14.5px; line-height: 1.9; margin: 0; }
.legal-callout.warn {
  background: rgba(217,119,6,0.07); border: 1px solid rgba(217,119,6,0.25);
}
.legal-callout.warn .co-ico, .legal-callout.warn h3 { color: var(--amber); }
.legal-callout.warn p { color: #9a6207; }

.legal-callout.note {
  background: var(--surface); border: 1px solid var(--border);
}
.legal-callout.note .co-ico { color: var(--primary); }
.legal-callout.note p { color: var(--text-2); }

/* paired allow/deny blocks for training section */
.pair { display: grid; gap: 14px; margin-top: 4px; }
.pair-card {
  border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px;
  background: #fff;
}
.pair-card .pc-head {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; margin-bottom: 8px;
}
.pair-card .pc-head i { font-size: 19px; }
.pair-card.yes .pc-head { color: var(--green); }
.pair-card.no  .pc-head { color: var(--text-3); }
.pair-card p { font-size: 14.5px; line-height: 1.9; color: var(--text-2); margin: 0; }

/* foot note inside last section */
.legal-foot-note {
  margin-top: 28px; font-size: 13px; color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}
.legal-foot-note i { font-size: 16px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .legal-grid { grid-template-columns: 1fr; gap: 28px; }
  .toc { position: static; }
  .toc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .toc-help { display: none; }
  .legal-body { max-width: none; }
}
@media (max-width: 560px) {
  .toc-list { grid-template-columns: 1fr; }
  .ls-head h2 { font-size: 19px; }
  .accept-banner { flex-direction: row; }
}
