/* SMRbot's trust page (trust.html, trust.js), on the legal pages' layout (legal.css): the bot's state now, the
   permissions with their Discord names, and the changelog. Loads after legal.css. RTL first (logical properties),
   holds at 360px. The pulse plays even when the device asks for less motion: the owner wants the site to move.
   The state's colours are the dashboard's: teal is on (--ok), coral is off (--bad). */

/* ---- the state now ---- */
.tr-status { display: grid; gap: 18px; margin-top: 6px; padding: clamp(18px, 2.4vw, 24px); border-radius: var(--r-lg); }
.lg-sec .tr-state { margin: 0; }
.tr-pill { gap: 9px; padding: 7px 15px; font-size: 14.5px; background: var(--cream-300); color: var(--teal-800); }
.tr-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--cream-600); flex: none; }
.tr-pill[data-state="on"] { background: var(--teal-100); color: var(--teal-800); }
.tr-pill[data-state="on"] .tr-dot { background: var(--teal-600); }
.tr-pill[data-state="on"] .tr-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--teal-500);
  animation: tr-ring 1.9s var(--ease-out) infinite;
}
.tr-pill[data-state="off"] { background: var(--coral-100); color: var(--coral-800); }
.tr-pill[data-state="off"] .tr-dot { background: var(--coral-600); }
@keyframes tr-ring { from { opacity: .9; scale: .6; } to { opacity: 0; scale: 1.9; } }

.tr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.tr-stats > div { padding: 12px 14px; border-radius: var(--r-md); background: var(--lt-card-2); box-shadow: inset 0 0 0 1px var(--lt-line); min-width: 0; }
.tr-stats dt { color: var(--lt-muted); font: 600 13.5px/1.3 var(--f-body); }
.tr-stats dd { margin: 6px 0 0; color: var(--lt-text); font: 800 18px/1.35 var(--f-display); overflow-wrap: anywhere; }
.lg-sec .tr-hint { margin-top: 12px; color: var(--lt-muted); font-size: 14.5px; line-height: 1.8; }

/* ---- the permissions: the Arabic name, then Discord's English name (the English page shows its own name only) ---- */
.tr-perms strong { display: inline; }
.tr-en {
  display: inline-block; margin-inline-start: 8px; padding: 1px 8px; border-radius: var(--r-pill); vertical-align: 1px;
  background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--lt-line); color: var(--teal-700); font: 600 12.5px/1.6 var(--f-latin);
}
html[lang="en"] .tr-en { display: none; }
.tr-why { display: block; }

/* ---- the changelog: a line down the start side, a dot and the date for each change ---- */
.tr-log { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.tr-log-i { position: relative; padding-inline-start: 26px; padding-bottom: 20px; }
.tr-log-i::before { content: ""; position: absolute; inset-inline-start: 5px; top: 10px; bottom: -8px; width: 2px; background: var(--lt-line-2); }
.tr-log-i:last-child::before { display: none; }
.tr-log-i::after {
  content: ""; position: absolute; inset-inline-start: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--coral-500); box-shadow: 0 0 0 3px var(--lt-page);
}
.tr-log-i time { display: block; color: var(--coral-text); font: 700 13.5px/1.4 var(--f-body); }
.lg-sec .tr-log-i h3 { margin: 2px 0 4px; font-size: 17px; }
.lg-sec .tr-log-i p { margin: 0; font-size: 15.5px; line-height: 1.85; }

/* the two «اقرأ أيضًا» cards one under the other */
.lg-next + .tr-next { margin-top: 14px; }

@media (max-width: 720px) {
  .tr-stats { grid-template-columns: minmax(0, 1fr); }
}
