/*
 * 站点公用样式：Bootstrap、图标字体和跨页面复用的基础规则。
 * 页面专属样式仍在各 HTML 中单独引用，并放在本文件之后覆盖这里的规则。
 */
@import url("/static/vendor/bootstrap/css/bootstrap.min.css");
@import url("/static/vendor/bootstrap/css/icons/font/bootstrap-icons.min.css");

/* 供应商图标 CSS 的字体路径是相对 static 根目录的，这里改成站点绝对路径。 */
@font-face {
  font-display: block;
  font-family: "bootstrap-icons";
  src: url("/static/vendor/bootstrap/css/icons/font/fonts/bootstrap-icons.woff2?dd67030699838ea613ee6dbda90effa6") format("woff2"),
    url("/static/vendor/bootstrap/css/icons/font/fonts/bootstrap-icons.woff?dd67030699838ea613ee6dbda90effa6") format("woff");
}

/* 词典内容中的自定义条目元素 */
d\:entry * {
  font-size: 1.01em;
}

/* 认证类页面（登录、注册、找回/修改密码、邮箱验证）共用布局 */
body.auth-page {
  min-height: 100vh;
}

.auth-card {
  max-width: 560px;
}

#verifyCodeImg {
  width: 100px;
  height: 48px;
  cursor: pointer;
  object-fit: cover;
}

/* ============================ Modal 弹出位置 ============================ */
/* Bootstrap 5 没有“底部对齐”工具类，这里只加项目级样式，不修改 vendor 源码。 */
.modal-dialog.modal-dialog-bottom {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 100%;
  max-width: var(--bs-modal-width);
  height: auto;
  max-height: calc(100dvh - var(--bs-modal-margin) * 2);
  margin: 0 0 var(--bs-modal-margin);
  transform: translate(-50%, 0);
}

/* 从底部滑入：覆盖 Bootstrap 默认的 translate(0, -50px) 淡入方向。 */
.modal.fade .modal-dialog.modal-dialog-bottom {
  transform: translate(-50%, 100%);
}

.modal.show .modal-dialog.modal-dialog-bottom {
  transform: translate(-50%, 0);
}
