/* presets.css (presetsrank-20261103-1; presetpage-20261103-1): the two «کراد» cards of «رتبه‌بندی کانال‌های سیگنال»
   (copytrade.js draws them as source cards: these are their own chips and lines only), their page (a source's own page,
   .ct-ps-pf: the small detail window is gone), their «کپی» popup (a native
   <dialog> with copybasket.css's cb-* parts inside) and their row in «سبد کپی ترید» (mychoices.js). Only the site's
   tokens (--g-*): a theme switch needs nothing more. Every class here starts with ps- or ct-ps-, or sits under one
   (my-preset). Loaded after ctauth.css on the four copy-trade files. */

/* ---- the card and the list row (copytrade.js presetCardHtml / presetLineHtml) ---- */
/* «لایو ترید»: green, with the live dot (W1's colour); «۱:۰٫۷۵» the card's own ratio (never .ct-fixed-tag or
   .ct-pin-tag, which phones hide: both stay on phones). */
.ct-tag.ct-ps-live {
  display:inline-flex; align-items:center; gap:5px;
  background:color-mix(in srgb, var(--g-up) 12%, var(--g-card)); color:var(--g-up);
}
.ct-tag.ct-ps-live .ct-live-dot { width:6px; height:6px; }
.ct-tag.ct-ps-rr {
  display:inline-flex; align-items:center; background:var(--g-card); color:var(--g-teal-ink);
  box-shadow:inset 0 0 0 1px var(--g-teal-line);
}
.ct-tag.ct-ps-rr bdi { unicode-bidi:isolate; }
.ct-since.ct-ps-rule { color:var(--g-ink-2); font-weight:700; }
/* fix-20261103 (review U2): one line on the card in every language (the full words in its title), so the chips and the
   figure sit level with the source card beside it. */
.ct-card .ct-since.ct-ps-rule { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
.ct-name-row .ct-ps-live, .ct-name-row .ct-ps-rr { flex:none; }
/* A list row's name column can be narrow (wide rows of nine columns): the two chips stay inside it, as a name does. */
.ct-ps-line .ct-line-id > div { overflow:hidden; }
.ct-line .c-members.ct-ps-none { cursor:help; }
@media (max-width:760px) {
  /* fix-20261103 (review U1): a phone's list row hides its name row's tags (copytrade.css); the preset's two do too and
     are said at the head of its phone line instead («لایو ترید · ۱:۰٫۷۵ · …», copytrade.js presetLineHtml), as a source's
     origin moves into its line: the row is a source row's height and the name keeps its room. */
  .ct-ps-line .ct-name-row .ct-tag.ct-ps-live, .ct-ps-line .ct-name-row .ct-tag.ct-ps-rr { display:none; }
}

/* ---- a «کراد» card's page (presetpage-20261103-1): copytrade.js draws a source's own page (.ct-pf, copytrade.css) for
   it; only what it adds is styled here: the «لایو ترید» table's block and the head's chips (the .ct-tag rules above). ---- */
.ct-ps-pf .ct-pf-head .ct-tags .ct-tag.ct-ps-live, .ct-ps-pf .ct-pf-head .ct-tags .ct-tag.ct-ps-rr { flex:none; }
.ct-ps-pf .ct-since.ct-ps-rule { white-space:normal; }
.ct-ps-pf .ps-tbox { margin-top:2px; }
.ct-ps-pf .ct-ov-big b .ct-pip { white-space:nowrap; }
.ct-ps-pf .ct-about { white-space:normal; }
@media (max-width:760px) {
  .ct-ps-pf .ct-pf-actions .ps-copy { min-height:40px; height:auto; }
}
/* The header's strip holds four figures (a source's five): four a row on tablets, two by two on phones, none alone (review L2). */
@media (min-width:761px) and (max-width:960px) {
  .ct-ps-pf .ct-pf-strip:has(> .ct-pf-cell:nth-child(4):last-child) { grid-template-columns:repeat(4, minmax(0, 1fr)); }
  .ct-ps-pf .ct-pf-strip:has(> .ct-pf-cell:nth-child(4):last-child) > .ct-pf-cell:nth-child(4) { padding-inline-start:18px; border-inline-start:1px solid var(--g-line-soft); }
}
@media (max-width:760px) {
  .ct-ps-pf .ct-pf-strip:has(> .ct-pf-cell:nth-child(4):last-child) { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* ---- the two months: a table, the two blocks side by side at every width ---- */
.ps-tbox { border:1px solid var(--g-line-soft); border-radius:14px; overflow:hidden; background:var(--g-card); }
.ps-table { width:100%; border-collapse:collapse; table-layout:fixed; font-variant-numeric:tabular-nums; }
.ps-table col.ps-c0 { width:31%; }
.ps-table th, .ps-table td { padding:7px 8px; text-align:center; border-top:1px solid var(--g-line-soft); line-height:1.6; }
.ps-table thead th { border-top:0; background:var(--g-flat-soft); font-size:12px; font-weight:800; color:var(--g-ink-2); white-space:nowrap; }
.ps-table thead th.ps-corner { text-align:start; padding-inline-start:8px; }
.ps-table tbody th { text-align:start; font-size:12px; font-weight:700; color:var(--g-ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ps-table td { font-size:13.5px; font-weight:800; color:var(--g-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ps-table td.up { color:var(--g-up); }
.ps-table td.down { color:var(--g-down); }
.ps-table td .muted { font-weight:700; }
.ps-live { gap:5px; }
.ps-live .ct-live-dot { width:6px; height:6px; }
@media (max-width:760px) {
  .ps-table th, .ps-table td { padding:7px 6px; }
  .ps-table td { font-size:13px; }
  .ps-table col.ps-c0 { width:30%; }
}
@media (max-width:359.98px) {
  .ps-table thead th { font-size:11px; }
  .ps-table td { font-size:12.5px; }
  .ps-table tbody th { font-size:11.5px; }
}

/* ---- «کپی» of a preset: a source card's «کپی»; the ✓ of one in «سبد کپی ترید» comes from #psMarks (presets.js) ---- */
@media (max-width:760px) {
  .ct-card .ps-copy { min-height:40px; height:auto; }
}

/* ---- the «کپی» popup: a native modal dialog, copybasket.css's look (W1's, unchanged) ---- */
dialog.ps-dlg:not([open]) { display:none; }
dialog.ps-dlg {
  position:fixed; inset:0; margin:auto; padding:0; width:min(560px, calc(100vw - 32px)); max-width:none;
  height:fit-content; max-height:calc(100vh - 48px); max-height:calc(100dvh - 48px);
  flex-direction:column; min-height:0; overflow:hidden;
  background:var(--g-card); color:var(--g-ink); border:1px solid var(--g-line); border-radius:18px; box-shadow:var(--g-pop);
  font-family:'Vazirmatn','IRANSans',Tahoma,sans-serif; direction:rtl; text-align:start;
}
dialog.ps-dlg[open] { display:flex; }
dialog.ps-dlg::backdrop { background:rgba(15,27,45,.42); }
:root[data-theme="dark"] dialog.ps-dlg::backdrop { background:rgba(0,0,0,.6); }
dialog.ps-dlg:focus { outline:none; }
.ps-dlg :where(h2, h3, p, ol, ul, dl, dd) { margin:0; }
.ps-dlg :where(button, input, a) { font-family:inherit; }
.ps-dlg bdi { unicode-bidi:isolate; }
.ps-dlg .cb-head-row > .ct-avatar { width:46px; height:46px; }
.ps-dlg .cb-head-note { font-size:12px; color:var(--g-ink-2); }
.ps-dlg-live h3 { display:flex; }
body.ps-locked { overflow:hidden; }
body.ps-locked .ct-toast { z-index:96; }
@media (max-width:760px) {
  dialog.ps-dlg {
    inset:auto 0 0 0; margin:0; width:100%; max-width:100%;
    max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px);
    border-radius:18px 18px 0 0; border-bottom:0;
  }
}

/* ---- «سبد کپی ترید»: a preset's own row (mychoices.js) ---- */
.my-src.my-preset .my-ps-open {
  margin:0; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:start; cursor:pointer;
}
.my-src.my-preset .my-ps-open:hover .my-name { text-decoration:underline; text-underline-offset:3px; }
.my-src.my-preset .my-ps-open:focus-visible { outline:2px solid var(--g-teal); outline-offset:2px; border-radius:8px; }
.my-src.my-preset .my-line { white-space:normal; flex-wrap:wrap; }
.my-src.my-preset .my-line bdi { unicode-bidi:isolate; }
