:root {
  --filing-footer-height: 32px;
}

body {
  padding-bottom: var(--filing-footer-height) !important;
  box-sizing: border-box;
}

html[data-emeng-canvas-page] {
  --filing-footer-height: 0px;
}

html[data-emeng-canvas-page] body {
  padding-bottom: 0 !important;
}

/* Keep the sidebar's last action above the fixed ICP footer. */
body .app > .sidebar {
  padding-bottom: calc(12px + var(--filing-footer-height)) !important;
}

#filing-compliance-footer {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #d8d8dd;
  background: #111114;
  border-color: #2e2e34;
  font: 12px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .02em;
}

#filing-compliance-footer {
  bottom: 0;
  min-height: var(--filing-footer-height);
  padding: 6px 12px;
  border-top-style: solid;
  border-top-width: 1px;
}

#filing-compliance-footer a {
  color: #8b8b91;
  text-decoration: none;
  text-shadow: none;
  background: none;
  transition: none;
}

#filing-compliance-footer a:hover,
#filing-compliance-footer a:focus-visible {
  color: #8b8b91;
  text-decoration: none;
  outline: 1px solid #66666c;
  outline-offset: 2px;
}

.emeng-icp-link {
  color: #8b8b91 !important;
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  text-decoration: none !important;
  transition: none !important;
  animation: none !important;
}

.emeng-icp-link:hover,
.emeng-icp-link:active,
.emeng-icp-link:visited {
  color: #8b8b91 !important;
  text-decoration: none !important;
}

@media (max-width: 800px) {
  :root {
    --filing-footer-height: 24px;
  }

  body .app > .sidebar {
    padding-bottom: calc(8px + var(--filing-footer-height)) !important;
  }

  #filing-compliance-footer {
    padding: 3px 10px;
    font-size: 10px;
    line-height: 1.2;
  }
}

@media (prefers-color-scheme: light) {
  #filing-compliance-footer {
    color: #45454d;
    background: #f7f7f9;
    border-color: #dedee4;
  }

  #filing-compliance-footer a {
    color: #66666c;
  }

  .emeng-icp-link,
  .emeng-icp-link:hover,
  .emeng-icp-link:active,
  .emeng-icp-link:visited {
    color: #66666c !important;
  }
}
