@charset "utf-8";
/**
 * 前台门户 BS3/BS4 → BS5 兼容层
 * -----------------------------------------------------------------------------
 * 用途：前台 frontendlayout* 系列布局使用 Bootstrap 5.2.2（cqgm/cqpue/cqu/cqyu/demo）
 *       或 Bootstrap 4.6.1（cqgyzy/cqipc/cqtbi/ctbu），
 *       而页面模板仍保留大量 BS3/BS4 的写法。本文件补齐这些已删除/改名的类，
 *       使页面标记不必逐个改写即可正常显示。
 *
 * 保留策略：下列映射不是临时补丁，需长期保留。表单设计器生成的 HTML 存放在
 *       数据库中（formmeta/fillform 等页面直接渲染），其中同样使用 form-group /
 *       control-label / col-xs-* 等旧类，模板层的批量替换无法覆盖这部分内容。
 *       如需回潮检查，请自行统计模板中这些旧类的 token 用量（仓库不再保留审计脚本）。
 *
 * 与后台 layout/bs4 使用的 bs4-compat.css 分开维护：
 *   bs4-compat.css   面向后台 Nifty 体系（含 pad-/mar-* 等 Nifty 工具类）
 *   frontend-compat.css 面向前台门户（Unify/layui 体系），只补 Bootstrap 语义
 *
 * 加载要求：必须放在各模块 theme.css / app.css / common.css 之前，
 *           保证模块自身样式可以覆盖本兼容层。
 *
 * 本文件只做 CSS 映射，不提供任何 JS 行为（modal/collapse/dropdown 请用原生）。
 */

/* ===========================================================================
 * 一、BS3 组件
 * =========================================================================== */

/* BS3 面板 → 卡片外观 */
.panel {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: .25rem;
    margin-bottom: 1rem;
}

.panel-heading {
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    border-top-left-radius: calc(.25rem - 1px);
    border-top-right-radius: calc(.25rem - 1px);
    background-color: rgba(0, 0, 0, .03);
}

.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 500;
}

.panel-body {
    padding: 1rem;
}

.panel-body::before,
.panel-body::after {
    display: table;
    content: " ";
}

.panel-body::after {
    clear: both;
}

.panel-footer {
    padding: .75rem 1rem;
    background-color: rgba(0, 0, 0, .03);
    border-top: 1px solid rgba(0, 0, 0, .125);
    border-bottom-left-radius: calc(.25rem - 1px);
    border-bottom-right-radius: calc(.25rem - 1px);
}

.panel-group .panel {
    margin-bottom: 0;
    border-radius: .25rem;
}

.panel-group .panel + .panel {
    margin-top: .5rem;
}

/* BS3 缩略图 */
.thumbnail {
    display: block;
    padding: .25rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: .25rem;
    transition: border .2s ease-in-out;
}

.thumbnail > img,
.thumbnail a > img {
    max-width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: auto;
}

a.thumbnail:hover,
a.thumbnail:focus {
    border-color: #0d6efd;
}

/* BS3 well 提示块 */
.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: .25rem;
}

/* ===========================================================================
 * 二、BS3 栅格（col-xs-* 在 BS4/BS5 中已删除）
 * =========================================================================== */

.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6,
.col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
    position: relative;
    width: 100%;
    padding-right: .75rem;
    padding-left: .75rem;
}

.col-xs-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-xs-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-xs-3 { flex: 0 0 25%; max-width: 25%; }
.col-xs-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-xs-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-xs-6 { flex: 0 0 50%; max-width: 50%; }
.col-xs-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-xs-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-xs-9 { flex: 0 0 75%; max-width: 75%; }
.col-xs-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-xs-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-xs-12 { flex: 0 0 100%; max-width: 100%; }

/* ===========================================================================
 * 三、BS3 工具类与组件小类
 * =========================================================================== */

/* 浮动：BS4 改 float-*，BS5 改 float-start/end，这里保留 BS3 名称 */
.pull-left { float: left !important; }
.pull-right { float: right !important; }

.center-block {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

/* 响应式图片：BS4 起改为 .img-fluid */
.img-responsive {
    display: block;
    max-width: 100%;
    height: auto;
}

.img-rounded { border-radius: .3rem; }
.img-circle { border-radius: 50%; }

/* 下拉箭头：BS4 起由 .dropdown-toggle::after 生成，.caret 已删除 */
.caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: .25em;
    vertical-align: middle;
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-left: .3em solid transparent;
}

/* 下拉按钮（如 bootstrap-table 分页的“每页显示”选择器）在 BS4 下还会由 .dropdown-toggle::after
   再画一个箭头，与上面的 .caret 叠加会出现两个箭头，这里只保留 BS4 生成的箭头 */
.dropdown-toggle .caret {
    display: none;
}

/* 按钮：BS4 起 .btn-default → .btn-secondary；.btn-xs 已删除 */
.btn-default {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.btn-default:hover,
.btn-default:focus {
    color: #212529;
    background-color: #e2e6ea;
    border-color: #dae0e5;
}

.btn-default:disabled,
.btn-default.disabled {
    opacity: .65;
    pointer-events: none;
}

.btn-xs {
    padding: .125rem .3rem;
    font-size: .75rem;
    line-height: 1.2;
    border-radius: .2rem;
}

/* 表单标签：BS4 起 .control-label 已删除 */
.control-label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: .5rem;
    font-weight: 500;
}

/* 输入框前后缀：BS4 起 .input-group-addon → .input-group-text */
.input-group-addon {
    display: flex;
    align-items: center;
    padding: .375rem .75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: .25rem;
}

/* 紧凑表格：BS4 起 .table-condensed → .table-sm */
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
    padding: .3rem;
}

/* 标签：BS3 .label → BS4 起用 .badge */
.label {
    display: inline-block;
    padding: .25em .5em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25rem;
}

.label-success { background-color: #198754; }
.label-info { background-color: #0dcaf0; color: #000; }
.label-warning { background-color: #ffc107; color: #000; }
.label-danger { background-color: #dc3545; }
.label-primary { background-color: #0d6efd; }
.label-default { background-color: #6c757d; }

/* BS3 响应式显隐工具类（BS4 起改为 d-* 系列）
   注意：BS3 的 .hidden-* 在「未命中」断点不声明任何样式，元素保持自身 display；
   这里不能给默认 display:block，否则会把原本 inline/inline-block 的元素改成块级 */
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
    display: none !important;
}

@media (max-width: 767.98px) {
    .hidden-xs { display: none !important; }
    .visible-xs { display: block !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .hidden-sm { display: none !important; }
    .visible-sm { display: block !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .hidden-md { display: none !important; }
    .visible-md { display: block !important; }
}

@media (min-width: 1200px) {
    .hidden-lg { display: none !important; }
    .visible-lg { display: block !important; }
}

/* ===========================================================================
 * 四、BS4 → BS5 改名/删除的类（前台为 BS5 的模块需要）
 * =========================================================================== */

/* BS5 删除了 .form-group / .form-inline / .form-row */
.form-group {
    margin-bottom: 1rem;
}

.form-inline {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}

.form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -.75rem;
    margin-left: -.75rem;
}

.form-row > [class*="col-"] {
    padding-right: .75rem;
    padding-left: .75rem;
}

/* BS5 删除了 .input-group-prepend / .input-group-append */
.input-group-prepend,
.input-group-append {
    display: flex;
}

.input-group-prepend > .btn,
.input-group-append > .btn,
.input-group-prepend > .input-group-text,
.input-group-append > .input-group-text {
    border-radius: .25rem;
}

/* 间距与浮动、文本对齐：BS4 名称在 BS5 中改名 */
.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }
.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }
.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: .25rem !important; }
.pl-2 { padding-left: .5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: .25rem !important; }
.pr-2 { padding-right: .5rem !important; }
.pr-3 { padding-right: 1rem !important; }

.float-left { float: left !important; }
.float-right { float: right !important; }

.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Nifty 字重工具类：BS4/BS5 均无同名类（BS5 用 .fw-bold/.fw-semibold），
   定义与后台 bs4-compat.css 保持一致，避免前后台字重不一致 */
.text-thin { font-weight: 300; }
.text-normal { font-weight: 400; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }
.text-bolder { font-weight: 800; }

/* Nifty 居中容器：容器内文本居中，直接子元素转为行内块 */
.element-center {
    text-align: center;
}

.element-center > * {
    display: inline-block;
}

.no-gutters {
    margin-right: 0;
    margin-left: 0;
}

.no-gutters > .col,
.no-gutters > [class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* BS5 用 .visually-hidden 取代 .sr-only */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* BS5 删除了 .close / .badge-pill */
.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    opacity: .75;
}

.badge-pill {
    padding-right: .6em;
    padding-left: .6em;
    border-radius: 10rem;
}

/* ===========================================================================
 * 五、Nifty 组件类（门户列表页仍在用）
 * =========================================================================== */

/* 列表分组标题（新闻列表、附件列表的“相关附件下载”一类）
   取值来自 nifty.min.css；BS4/BS5 的 .list-group-item 只是普通表项，
   少了这条分组标题会和内容条目完全同款，看不出层级。
   注意：ctbu 等模块的 custom.css 已自带同名规则，模块样式在本文件之后加载，
   按“后加载覆盖”的既有约定不会冲突。 */
.list-header {
    position: relative;
    padding: 10px 15px;
    font-weight: 300;
}

/* ===========================================================================
 * 六、bootstrap-table 分页“每页显示 xx 条”下拉按钮高度
 * ===========================================================================
 * Unify 主题的 .btn 上下内边距偏大（约 8px），套在 bootstrap-table 的 page-list
 * 按钮上会比同一行的页码按钮（.page-link ≈ 2.25rem）高出近 10px，显得特别高。
 * 这里压到与 .page-link 同高，左右内边距同时收敛。
 */
.bootstrap-table .fixed-table-pagination .page-list .btn {
    height: 2.25rem;
    padding: 0 .75rem;
    line-height: 1;
    align-items: center;
}

/* ===========================================================================
 * 七、页面级横向溢出兜底
 * ===========================================================================
 * 1) AOS 的 fade-left / fade-right 在元素进入视口前会把自身平移 ±100px，
 *    页面右侧的区块因此会撑出水平滚动条（滚到该区块后滚动条才消失）；
 * 2) 个别模板（如招生首页 .footer-box）用负外边距做整宽出血，宽度超出视口。
 * 这里统一按视口裁掉横向溢出。只加在 html 上（不加 body），这样纵向滚动与
 * 元素级 position:sticky 都不受影响。
 */
html {
    overflow-x: hidden;
}
