/* CADdy-Hub legal footer links: the Terms · Privacy · Accessibility · Legal row on the login page footer and
   the legal pages' own footer (.ch-legal-footer). The footer sits on the header bar's gray, as the login
   footer does, so its words use the tokens built for that gray: --rail-fg (the rail's labels, same surface)
   and --table-head-fg (the deep header blue in light, a light blue in dark). Tokens only. */

/* Hidden until the legal documents are turned on (login.js reads APP_CONFIG.legalDocs). */
[data-legal-docs][hidden] { display: none !important; }

.ch-legal-footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  padding: var(--sp-5) 10%;
  background: var(--header-bar-bg);
  border-top: 1px solid var(--header-bar-border);
}
.ch-legal-footer__who { display: flex; flex-direction: column; gap: var(--sp-1); }
.ch-legal-footer__who strong { color: var(--table-head-fg); font-weight: 800; }
.ch-legal-footer__who span { color: var(--rail-fg); font-size: var(--fs-small); }

.ch-legal-footer__links {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4);
}
.ch-legal-footer__links a {
  color: var(--table-head-fg); font-size: var(--fs-small); font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
  padding: var(--sp-1) 0;
}
.ch-legal-footer__links a:hover { color: var(--table-head-fg); text-decoration-thickness: 2px; }
.ch-legal-footer__links a:focus-visible { outline: 2px solid var(--focus-ring-color); outline-offset: 2px; border-radius: var(--radius-sm); }

/* The login footer's right half: the links, then its "Internal tool" line. */
.footer-right.ch-legal-footer__end { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); }

/* The one line under the company sign-in button. */
.login-legal-note {
  margin: 0; padding: var(--sp-3) var(--sp-5) var(--sp-4);
  font-size: var(--fs-small); color: var(--secondary-color); line-height: 1.45;
}
.login-legal-note a { text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 768px) {
  .ch-legal-footer { padding: var(--sp-5) 5%; }
}
