/* ============ Theme ============ */

:root{
  --white:#fff;
  --primary:#090A1A;     /* page/background */
  --secondary:#14111F;   /* inner surfaces/containers */
  --helping:rgba(255,255,255,.08);  /* subtle borders */
  --text:#D6D6D6;        /* primary text */
  --muted:#858585;       /* secondary text */
  --accent:#999EE7;      /* hover/focus accent */
  --focus:#7AA2FF66;     /* focus ring shadow */
  --radius:14px;
  --container:1200px;
}

/* ===== Frame (same constraints as your ConstrainedBox) ===== */
.legal-frame{
  min-width:393px;  max-width:1440px;
  min-height:852px; max-height:1024px;

  width:100%;
  height:100dvh;
  margin-inline:auto;
  background:var(--primary);
  display:flex; flex-direction:column;
  overflow:hidden;
}

/* ===== Top bar (142px, bordered) ===== */
.legal-topbar{
  height:142px;
  padding:20px;
  border:1px solid var(--helping);
  background:var(--primary);
  display:flex; align-items:center; justify-content:space-between;
  gap:100px;
}
/* left group (back button) */
.top-left{ display:flex; align-items:center; gap:12px; }
/* center column (title + subtitle) */
.top-center{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  margin-inline:auto;               /* keeps the center actually centered */
}
.top-right{ width:50px; height:50px; } /* symmetry box */

/* title & subtitle sizes exactly like your Figma */
.legal-title{
  margin:0; color:#fff; font-family:"Cairo",system-ui;
  font-weight:700; font-size:31.25px; letter-spacing:.2px;
}
.legal-sub{
  color:#fff; font-family:"Cairo",system-ui; font-weight:600; font-size:16px; opacity:.9;
}

/* ===== Circle Button (Flutter-like) ===== */
.circle-btn{
  --size:50px;
  --bg:var(--primary);
  --shadow: var(--secondary); /* 0xFF14111F fit your theme */

  width:var(--size); height:var(--size);
  border-radius:999px;
  background:var(--bg);
  border:1px solid var(--helping);
  display:grid; place-items:center;
  /* normal: drop shadow down (offset 0,5 / blur 15 / spread 1) */
  box-shadow: 0 5px 15px 1px var(--shadow);
  transition: transform .11s ease, box-shadow .14s ease, background .2s ease, opacity .2s ease;
  cursor:pointer;
}
.circle-btn svg{ width:24px; height:24px; color:#fff; }

/* pressed: scale + flip shadow upward (like your _pressed) */
.circle-btn.pressed{ transform:scale(.96); box-shadow: 0 -5px 15px 1px var(--shadow); }

/* locked: white glow upward + disabled */
.circle-btn.locked{
  cursor:not-allowed;
  box-shadow: 0 -5px 15px 1px #fff;
  opacity:.95;
}

/* ===== Content (scrollable) ===== */
.legal-body{
  flex:1 1 auto;
  padding:30px;
  overflow:auto;
}
.legal-text{
  width:min(1370px, 100%);
  margin-inline:auto;
  white-space:pre-wrap; word-wrap:break-word;
  font-family:"Cairo",system-ui; font-size:16px; line-height:1.5; color:#fff;
}

/* responsive niceties */
@media (max-width:600px){
  .legal-topbar{ gap:24px; }
}

/* ===== Styled scrollbar for the legal content area ===== */

/* Chrome / Edge / Safari */
.legal-body::-webkit-scrollbar{
  width: 10px;               /* vertical */
  height: 10px;              /* horizontal (if any) */
}
.legal-body::-webkit-scrollbar-track{
  background: transparent;   /* or var(--primary) */
}
.legal-body::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.12);      /* base thumb */
  border: 2px solid transparent;          /* creates a gap around thumb */
  background-clip: padding-box;
  border-radius: 999px;                    /* pill */
}
.legal-body::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,.22);
}
.legal-body::-webkit-scrollbar-corner{
  background: transparent;
}

/* Firefox */
.legal-body{
  scrollbar-width: thin;                             /* auto | thin | none */
  scrollbar-color: rgba(255,255,255,.22) transparent;/* thumb | track */
}

/* Optional: show a subtle track line */
.legal-body::-webkit-scrollbar-track {
  background: linear-gradient(transparent, transparent) padding-box,
              linear-gradient(90deg, transparent, var(--helping), transparent) border-box;
  border-left: 1px solid transparent; /* enables the gradient line */
}
