/**
 * 前台页脚（layout/default 底部版权区域）站点级样式
 * 依赖：frontend.css 中已有 footer 结构类名 .footer
 * 说明：通过变量集中配色与间距，便于与顶栏变量一起在后续做全站主题
 */

/**
 * 粘性页脚：内容较少时版权区仍在视口底部可见（与 fixed 顶栏配合）
 * 覆盖 frontend.css 中 body height:100%、main.content 的固定 min-height
 */
body {
  height: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.content {
  flex: 1 1 auto;
  min-height: unset;
}

:root {
  --layout-footer-outer-bg: #555;
  --layout-footer-text: #aaa;
  --layout-footer-copyright-bg: #393939;
  --layout-footer-link-hover: #fff;
  --layout-footer-margin-top: 25px;
  --layout-footer-copyright-line-height: 50px;
}

footer.footer {
  width: 100%;
  flex-shrink: 0;
  color: var(--layout-footer-text);
  background: var(--layout-footer-outer-bg);
  margin-top: var(--layout-footer-margin-top);
}

footer.footer .copyright {
  line-height: var(--layout-footer-copyright-line-height);
  text-align: center;
  background: var(--layout-footer-copyright-bg);
  margin: 0;
}

footer.footer .copyright a {
  color: var(--layout-footer-text);
}

footer.footer .copyright a:hover {
  color: var(--layout-footer-link-hover);
}

@media (max-width: 767px) {
  footer.footer {
    position: inherit;
  }
  footer.footer .copyright {
    padding: 10px;
    line-height: 30px;
  }
}
