/* 用户中心 / 教师中心 / 课堂中心：手机端表格纵向卡片展示 */



@media screen and (max-width: 767px) {

  .zhsl-member-center-wrap .table-responsive,

  .zhsl-classroom-wrap .table-responsive {

    overflow: visible;

    border: 0;

    margin-bottom: 0;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked,

  .zhsl-classroom-wrap table.zhsl-table-stacked {

    width: 100%;

    border: 0;

    background: transparent;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked thead,

  .zhsl-classroom-wrap table.zhsl-table-stacked thead {

    display: none;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody {

    display: block;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody tr,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody tr {

    display: block;

    margin-bottom: 12px;

    padding: 12px 14px;

    border: 1px solid #ebeef5;

    border-radius: 10px;

    background: #fff;

    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody tr:last-child,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody tr:last-child {

    margin-bottom: 0;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 10px;

    width: 100% !important;

    max-width: 100%;

    padding: 7px 0;

    border: 0 !important;

    border-bottom: 1px dashed #eef2f7 !important;

    text-align: right;

    white-space: normal;

    word-break: break-word;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td:last-child,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td:last-child {

    border-bottom: 0 !important;

    padding-bottom: 0;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td::before,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td::before {

    content: attr(data-label);

    flex: 0 0 36%;

    max-width: 42%;

    font-size: 12px;

    font-weight: 600;

    color: #606266;

    text-align: left;

    line-height: 1.4;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td:not([data-label])::before,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td:not([data-label])::before {

    content: none;

  }



  /* 空数据行 */

  .zhsl-member-center-wrap table.zhsl-table-stacked tbody tr.zhsl-table-stacked-empty td,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody tr.zhsl-table-stacked-empty td {

    display: block;

    text-align: center;

    padding: 16px 8px;

  }



  .zhsl-member-center-wrap table.zhsl-table-stacked tbody tr.zhsl-table-stacked-empty td::before,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody tr.zhsl-table-stacked-empty td::before {

    display: none;

  }



  /* 操作列：按钮横向排列，空间不够再换行 */

  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions {

    align-items: center;

  }

  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions .zhsl-table-stacked-actions-inner,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions .zhsl-table-stacked-actions-inner {

    flex: 1 1 0;

    min-width: 0;

    display: flex;

    flex-direction: row;

    flex-wrap: wrap;

    justify-content: flex-end;

    align-items: center;

    gap: 6px;

    text-align: right;

  }

  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions .btn,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions .btn,

  .zhsl-member-center-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions .zhsl-table-stacked-actions-inner > a,

  .zhsl-classroom-wrap table.zhsl-table-stacked tbody td.zhsl-table-stacked-actions .zhsl-table-stacked-actions-inner > a {

    display: inline-block;

    margin: 0 !important;

    flex: 0 0 auto;

    white-space: nowrap;

    width: auto;

    float: none !important;

  }

}



/* 服务端判定为手机 UA 时（与 JS 叠加，窄屏桌面调试仍靠 max-width） */

body.zhsl-device-mobile .zhsl-member-center-wrap .table-responsive,

body.zhsl-device-mobile .zhsl-classroom-wrap .table-responsive {

  overflow: visible;

}


