/* ============================================================
   Shared site footer — single source of truth.

   Symmetric to site-header.css. Linked from BOTH:
     - `client-app/public/plugin/index.html` (static landing in iframe)
     - `client-app/src/index.html` (Angular main document — /account,
       /plugin-auth)

   Same recipe across all consumers (Angular templates mirror the landing
   markup byte-for-byte):

     <footer class="site-footer">
       <div class="footer-brand">© Midee <span data-year>YYYY</span></div>
       <nav class="footer-links">
         <a href="..." target="_blank" rel="noopener noreferrer">Terms of Service</a>
         <a href="..." target="_blank" rel="noopener noreferrer">Privacy Policy</a>
       </nav>
     </footer>

   Source-of-truth pre-merge: inline `<style>` block в
   `client-app/public/plugin/index.html:717-756` (landing). Этот файл
   ровно копирует те правила plus font-rendering enforcement (см. site-header).
   Inline блок на лендинге УДАЛЁН — оба контекста теперь читают только
   этот файл.

   Plain CSS (не SCSS) — lives as static asset, не проходит build.
   ============================================================ */

/* Force opsz axis on the footer subtree — same recipe as site-header.css.
   Variable DM Sans inherits `auto` от одного browsing context (Angular
   main document) и какой-то другой axis от другого (static landing iframe)
   → разные глифы на одном и том же `font-family + weight + size`. Здесь
   opsz 12 (vs header's 14) потому что base footer font-size is 12px —
   оптическая axis matches physical size. */
.site-footer,
.site-footer * {
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 12;
  text-rendering: optimizeLegibility;
}

.site-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  gap: 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  /* Explicit line-height — без него naследуется от body, а на /account
     body имеет class="mat-typography" которая задаёт другой line-height
     чем default browser на статическом лендинге → footer вырастал на
     ~2.5px на /account (51px vs 48.5px). Те же грабли что у headers:
     любое inheritable text-metric свойство должно быть pinned in this
     file, не наследоваться. */
  line-height: 1;
  color: rgba(240, 238, 245, 0.7);
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Reset default margin/padding на потомках. На лендинге body чистый —
   <div>, <nav>, <a>, <span> идут с browser default (0/0). На /account
   body имеет mat-typography которая может добавить margin к inline /
   block элементам через universal selectors. Explicit zeros в shared
   гарантируют одинаковую baseline в обоих контекстах. */
.site-footer .footer-brand,
.site-footer .footer-links,
.site-footer .footer-links a {
  margin: 0;
  padding: 0;
}

.site-footer .footer-brand {
  flex-shrink: 0;
}

.site-footer .footer-links {
  display: inline-flex;
  gap: 24px;
}

.site-footer .footer-links a {
  color: rgba(240, 238, 245, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer .footer-links a:hover {
  color: rgba(240, 238, 245, 0.85);
}

@media (max-width: 480px) {
  .site-footer {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    text-align: center;
  }
  .site-footer .footer-links {
    gap: 16px;
  }
}
