/* vipkei.com 手机文章列表专用样式
 * source: templets/default/list_article_m.htm
 * version: 20260612-p1s5-article-list
 */

.m-article-list-template *,
    .m-article-list-template *::before,
    .m-article-list-template *::after {
      box-sizing: border-box;
    }

    .m-article-list-template .m-article-cate {
      width: 100%;
      margin-top: 0;
      color: #FFFFFF;
      background: #30B7EF;
    }

    .m-article-list-template .m-article-cate__toolbar {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      min-height: 48px;
      padding: 6px 54px;
    }

    .m-article-list-template .m-article-cate__title {
      min-width: 0;
      overflow: hidden;
      font-size: 16px;
      font-weight: 700;
      line-height: 1.4;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .m-article-list-template .m-article-cate__button {
      position: absolute;
      top: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      margin: 0;
      padding: 0;
      border: 0;
      border-radius: 4px;
      color: #FFFFFF;
      background: transparent;
      transform: translateY(-50%);
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }

    .m-article-list-template .m-article-cate__button--back {
      left: 8px;
    }

    .m-article-list-template .m-article-cate__button--toggle {
      right: 8px;
    }

    .m-article-list-template .m-article-cate__button:focus-visible {
      outline: 2px solid #FFFFFF;
      outline-offset: -2px;
    }

    .m-article-list-template .m-article-cate__back-icon {
      width: 10px;
      height: 10px;
      border-bottom: 2px solid currentColor;
      border-left: 2px solid currentColor;
      transform: rotate(45deg);
    }

    .m-article-list-template .m-article-cate__toggle-icon {
      width: 9px;
      height: 9px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(45deg) translate(-2px, -2px);
      transition: transform .2s ease;
    }

    .m-article-list-template .m-article-cate__button--toggle[aria-expanded="true"]
    .m-article-cate__toggle-icon {
      transform: rotate(225deg) translate(-1px, -1px);
    }

    .m-article-list-template .m-article-cate .box {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      width: 100%;
      margin: 0;
      padding: 10px 8px;
      border-bottom: 1px solid #E2E8EC;
      background: #FFFFFF;
    }

    .m-article-list-template .m-article-cate .box[hidden] {
      display: none;
    }

    .m-article-list-template .m-article-cate .box a {
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
      min-height: 42px;
      width: auto;
      height: auto;
      margin: 0;
      padding: 7px 8px;
      float: none;
      overflow: hidden;
      border: 1px solid #DDE5E9;
      border-radius: 4px;
      color: #555555;
      background: #FFFFFF;
      font-size: 14px;
      line-height: 1.35;
      text-align: center;
      text-decoration: none;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .m-article-list-template .m-article-cate .box a.on,
    .m-article-list-template .m-article-cate .box a[aria-current="page"] {
      border-color: #30B7EF;
      color: #FFFFFF;
      background: #30B7EF;
    }

    .m-article-list-template .m-article-cate .box a:focus-visible {
      outline: 2px solid #0B4B68;
      outline-offset: 2px;
    }

    .m-article-list-template .m-article-list-page .nyarc:first-child {
      margin-top: 0;
    }

    .m-article-list-template .m-article-list-page .nyarc:last-child {
      margin-bottom: 0;
    }

    .m-article-list-template .m-article-list-page .nyarc h2 a:focus-visible {
      outline: 2px solid #30B7EF;
      outline-offset: 3px;
      border-radius: 2px;
    }

    .m-article-list-template .m-article-empty {
      display: none;
      width: 100%;
      margin: 0;
      padding: 24px 14px;
      border: 1px solid #E4EAEE;
      border-radius: 8px;
      color: #666666;
      background: #FFFFFF;
      font-size: 14px;
      line-height: 1.7;
      text-align: center;
    }

    .m-article-list-template .m-article-empty.is-visible {
      display: block;
    }

    /*
     * Dede pagelist 直接输出 li；旧公共 CSS 同时给 li 和 a 绘制按钮，
     * 会形成双层边框，并让“上一页/下一页”在窄屏上明显凸出。
     * 这里以 li 作为唯一按钮外壳，a 只负责填满点击区域。
     */
    body.m-article-list-template .m-article-list-page #pager.m-pager-clean {
      width: 100%;
      margin: 0;
      padding: 12px 0 14px;
      overflow: visible;
      float: none !important;
      box-sizing: border-box;
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw {
      display: flex !important;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      margin: 0 !important;
      padding: 0 !important;
      list-style: none;
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw > li {
      display: inline-flex !important;
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      min-width: 40px !important;
      height: 40px !important;
      margin: 0 !important;
      padding: 0 !important;
      overflow: hidden;
      float: none !important;
      border: 1px solid #D8E1E6 !important;
      border-radius: 6px !important;
      color: #4F5B62 !important;
      background: #FFFFFF !important;
      font-size: 14px !important;
      font-weight: 500;
      line-height: 1 !important;
      text-align: center;
      white-space: nowrap;
      box-sizing: border-box !important;
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw > li > a {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      width: 100%;
      min-width: 40px !important;
      height: 100%;
      margin: 0 !important;
      padding: 0 10px !important;
      float: none !important;
      border: 0 !important;
      border-radius: 0 !important;
      color: inherit !important;
      background: transparent !important;
      font: inherit;
      line-height: 1 !important;
      text-align: center;
      text-decoration: none !important;
      white-space: nowrap;
      box-sizing: border-box !important;
      -webkit-tap-highlight-color: transparent;
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw > li.thisclass {
      border-color: #08B8DF !important;
      color: #FFFFFF !important;
      background: #08B8DF !important;
      font-weight: 700;
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw > li:not(.thisclass):focus-within {
      border-color: #30B7EF !important;
      box-shadow: 0 0 0 2px rgba(48, 183, 239, .18);
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw > li > a:focus-visible {
      outline: 2px solid #0B4B68;
      outline-offset: -3px;
    }

    body.m-article-list-template .m-article-list-page
    #pager.m-pager-clean .pager-raw .pageinfo {
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      min-height: 40px !important;
      margin: 0 !important;
      padding: 0 10px !important;
      float: none !important;
      border: 1px solid #D8E1E6 !important;
      border-radius: 6px !important;
      color: #66737A !important;
      background: #FFFFFF !important;
      font-size: 13px !important;
      line-height: 1.35 !important;
      box-sizing: border-box !important;
    }

    @media (max-width: 360px) {
      .m-article-list-template .m-article-cate__toolbar {
        padding-right: 50px;
        padding-left: 50px;
      }

      .m-article-list-template .m-article-cate .box {
        gap: 6px;
        padding-right: 6px;
        padding-left: 6px;
      }

      .m-article-list-template .m-article-cate .box a {
        font-size: 13px;
      }

      body.m-article-list-template .m-article-list-page
      #pager.m-pager-clean .pager-raw {
        gap: 6px;
      }

      body.m-article-list-template .m-article-list-page
      #pager.m-pager-clean .pager-raw > li {
        min-width: 38px !important;
        height: 38px !important;
        font-size: 13px !important;
      }

      body.m-article-list-template .m-article-list-page
      #pager.m-pager-clean .pager-raw > li > a {
        min-width: 38px !important;
        padding-right: 8px !important;
        padding-left: 8px !important;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .m-article-list-template .m-article-cate__toggle-icon {
        transition: none;
      }
    }
