/**
 * ═══════════════════════════════════════════════════════════════
 * SPLURJJ UNIVERSAL TRUST SCORE  —  css/trust-score.css  v1.0
 * ═══════════════════════════════════════════════════════════════
 *
 * Styles for:
 *   .splurjj-trust-block   — inline trust panel (sidebar/main)
 *   #splTrustModal          — full breakdown modal
 *
 * Design language: dark, gold, minimal. Consistent with Splurjj.
 * ═══════════════════════════════════════════════════════════════
 */

/* ── Variables (inherits from host page :root when available) ── */
.splurjj-trust-block,
#splTrustModal {
  --ts-gold:    #d4af37;
  --ts-green:   #10b981;
  --ts-red:     #ef4444;
  --ts-amber:   #f59e0b;
  --ts-bg:      #0f0f0f;
  --ts-surface: #161616;
  --ts-surface2:#1c1c1c;
  --ts-border:  rgba(255,255,255,.07);
  --ts-border2: rgba(255,255,255,.12);
  --ts-text:    rgba(255,255,255,.88);
  --ts-muted:   rgba(255,255,255,.42);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ════════════════════════════════════════════════════════════
   TRUST BLOCK  — inline card that lives in sidebars / sections
   ════════════════════════════════════════════════════════════ */
.splurjj-trust-block {
  background: var(--ts-surface);
  border: 1px solid var(--ts-border2);
  border-radius: 12px;
  padding: 18px 20px 14px;
  position: relative;
  overflow: hidden;
}

/* Subtle gold shimmer top border */
.splurjj-trust-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--ts-gold) 50%, transparent 100%);
  opacity: .5;
}

/* ── Header row ── */
.ts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}
.ts-label {
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ts-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ts-label i { color: var(--ts-gold); }

.ts-badge {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* ── Big score number ── */
.ts-score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.ts-score-num {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
  flex-shrink: 0;
}
.ts-score-num .ts-pct {
  font-size: 1.2rem;
  font-weight: 700;
  opacity: .7;
}
.ts-score-bar {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.ts-score-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ── Pillar rows ── */
.ts-pillars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.ts-pillar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
}
.ts-pillar-label {
  font-size: .7rem;
  color: var(--ts-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.ts-pillar-label i { width: 12px; text-align: center; opacity: .7; flex-shrink: 0; }
.ts-pillar-bar {
  width: 52px;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.ts-pillar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .5s ease;
}
.ts-pillar-pct {
  font-size: .65rem;
  font-weight: 700;
  min-width: 30px;
  text-align: right;
}

/* ── Footer ── */
.ts-footer {
  border-top: 1px solid var(--ts-border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ts-last-verified {
  font-size: .65rem;
  color: var(--ts-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.ts-last-verified i { opacity: .5; }

.ts-breakdown-btn {
  background: rgba(212,175,55,.06);
  border: 1px solid rgba(212,175,55,.18);
  color: var(--ts-gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 7px 12px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .15s;
  font-family: inherit;
  width: 100%;
  justify-content: center;
}
.ts-breakdown-btn:hover {
  background: rgba(212,175,55,.12);
  border-color: rgba(212,175,55,.35);
}


/* ════════════════════════════════════════════════════════════
   TRUST MODAL  — full-screen breakdown overlay
   ════════════════════════════════════════════════════════════ */
.stm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: stmFadeIn .18s ease;
}
@keyframes stmFadeIn { from { opacity:0; } to { opacity:1; } }

.stm-panel {
  background: #111;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: stmSlideUp .22s cubic-bezier(.4,0,.2,1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
@keyframes stmSlideUp { from { transform:translateY(24px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.stm-panel::-webkit-scrollbar { width: 4px; }
.stm-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

/* Top bar */
.stm-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.stm-eyebrow {
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d4af37;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.stm-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(255,255,255,.9);
  letter-spacing: -.02em;
}
.stm-close {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.stm-close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Hero score */
.stm-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.02);
}
.stm-hero-score {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: 1;
  flex-shrink: 0;
}
.stm-hero-score span {
  font-size: 1.6rem;
  font-weight: 700;
  opacity: .6;
}
.stm-hero-right { flex: 1; min-width: 0; }
.stm-hero-status {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}
.stm-hero-bar {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}
.stm-hero-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.stm-hero-id {
  font-size: .62rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Formula label */
.stm-formula-label {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 14px 22px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Pillar rows */
.stm-rows {
  padding: 0 22px 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.stm-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.stm-row:last-child { border-bottom: none; }
.stm-row-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  flex-shrink: 0;
}
.stm-row-body { flex: 1; min-width: 0; }
.stm-row-label {
  font-size: .8rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  margin-bottom: 3px;
}
.stm-weight {
  font-size: .65rem;
  font-weight: 500;
  color: rgba(255,255,255,.28);
}
.stm-row-tip {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  line-height: 1.5;
}
.stm-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  min-width: 60px;
  flex-shrink: 0;
}
.stm-row-score {
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.stm-row-bar {
  width: 56px;
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
}
.stm-row-fill {
  height: 100%;
  border-radius: 99px;
}

/* Summary */
.stm-summary {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  margin: 4px 22px 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stm-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: rgba(255,255,255,.55);
}
.stm-summary-row strong { color: rgba(255,255,255,.9); }

/* Verification legend */
.stm-legend {
  padding: 0 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(255,255,255,.05);
  padding-top: 14px;
}
.stm-leg-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stm-leg-badge {
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 120px;
  justify-content: center;
}
.stm-leg-desc {
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  line-height: 1.4;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .stm-panel { border-radius: 12px 12px 0 0; max-height: 85vh; }
  .stm-overlay { align-items: flex-end; padding: 0; }
  .stm-hero-score { font-size: 2.8rem; }
  .ts-pillar-bar { width: 36px; }
}
