﻿/* ==========================================================================
   TaiQi SearchList — Search.aspx 结果页样式
   --------------------------------------------------------------------------
   承接原 Search.aspx 内联 <style> 的存活规则，并把 css/search.css（Bootstrap +
   Metronic 大表）的亮青视觉统一到 /css/tokens.css 的蓝白体系。

   继承自 master.css 的铁律：
   1. 本文件在 head 占位符内最后加载（晚于 css/search.css），所有规则带
      .tq-shell 前缀（+1 类特异度）。
   2. 绝不给 body / .tq-shell 设 font-size。
   3. 绝不写任何 .container 规则——版心只动 .search_left。

   本页专属注意：
   - search.css 里 .btn_blue / .card-itemx / .pagination 的部分声明带 !important，
     覆盖时对应属性也必须带 !important。
   - 结果行由服务器侧 CmnAjax.DataPaging 克隆 .card-itemx.Js_FileList 模板生成，
     选择器只针对模板里已有的类。
   - JS 会对 .Js_FreeView 等 span 写内联 display，CSS 不给它们设 display。
   ========================================================================== */

/* ---------- S1. 版心：左右两栏（分类树 + 结果列表） ---------- */
.tq-shell #context.iw {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-6);
    width: calc(100% - 2 * var(--shell-pad));
    max-width: var(--shell-max);
    margin: var(--sp-6) auto 0;
}

    .tq-shell #context.iw::after {
        content: none;
    }

.tq-shell .search_left {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.tq-shell .search_list {
    min-height: 0;
    background: transparent;
    border: 0;
}

.tq-shell .search_list .portlet {
    margin: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.tq-shell .Js_noData {
    padding: var(--sp-16) 0;
    font-size: var(--fs-14);
    color: hsl(var(--ink-500));
    text-align: center;
}

/* ---------- S1b. 左侧分类树 ---------- */
.tq-shell .search-tree {
    position: sticky;
    top: calc(var(--nav-h) + var(--sp-4));
    flex: 0 0 232px;
    max-height: calc(100vh - var(--nav-h) - 2 * var(--sp-4));
    overflow: auto;
    padding: var(--sp-3);
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--line-soft));
    border-radius: var(--r-md) !important;
    box-shadow: 0 1px 2px hsl(var(--ink-900) / .04);
}

    .tq-shell .search-tree .tree-hd {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: var(--sp-2);
        padding: var(--sp-1) var(--sp-2) var(--sp-3);
        border-bottom: 1px solid hsl(var(--line-soft));
        font-size: var(--fs-15);
        font-weight: 600;
        color: hsl(var(--ink-900));
    }

        .tq-shell .search-tree .tree-hd svg {
            flex: none;
            width: 16px;
            height: 16px;
            stroke: hsl(var(--brand-600));
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

    .tq-shell .search-tree .tree-ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .tq-shell .search-tree .tree-sub {
        display: none;
        margin: 2px 0 4px 12px;
        padding-left: 6px;
        border-left: 1px solid hsl(var(--line-soft));
    }

    .tq-shell .search-tree .tree-li.is-open > .tree-sub {
        display: block;
    }

    .tq-shell .search-tree .tree-row {
        display: flex;
        align-items: center;
    }

    .tq-shell .search-tree .tree-link {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        padding: 7px var(--sp-2);
        border-radius: var(--r-sm) !important;
        font-size: var(--fs-14);
        line-height: 1.5;
        color: hsl(var(--ink-700));
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
    }

    /* 子级基础样式必须在 hover/active 之前，否则同特异度会把选中态颜色盖掉 */
    .tq-shell .search-tree .tree-sub .tree-link {
        padding: 6px var(--sp-2);
        font-size: var(--fs-13);
        color: hsl(var(--ink-600));
    }

        .tq-shell .search-tree .tree-link:hover {
            background: hsl(var(--brand-50));
            color: hsl(var(--brand-600));
        }

        .tq-shell .search-tree .tree-link.is-active {
            background: hsl(var(--brand-600));
            font-weight: 500;
            color: hsl(var(--surface));
        }

            .tq-shell .search-tree .tree-link.is-active:hover {
                background: hsl(var(--brand-700));
                color: hsl(var(--surface));
            }

    .tq-shell .search-tree .tree-caret {
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 28px;
        margin: 0;
        padding: 0;
        background: none;
        border: 0;
        border-radius: var(--r-sm) !important;
        color: hsl(var(--ink-400));
        cursor: pointer;
        transition: color var(--dur-fast) var(--ease-out);
    }

        .tq-shell .search-tree .tree-caret:hover {
            color: hsl(var(--brand-600));
        }

        .tq-shell .search-tree .tree-caret svg {
            width: 14px;
            height: 14px;
            stroke: currentColor;
            stroke-width: 2;
            fill: none;
            stroke-linecap: round;
            stroke-linejoin: round;
            transition: transform var(--dur-fast) var(--ease-out);
        }

    .tq-shell .search-tree .tree-li.is-open > .tree-row .tree-caret svg {
        transform: rotate(90deg);
    }

/* ---------- S2. 结果行卡片 ---------- */
/* 模板行只供脚本克隆，不参与展示（无刷新加载后由页面 JS 渲染数据行） */
.tq-shell .Js_FileList {
    display: none !important;
}

.tq-shell .card-itemx {
    display: flex;
    align-items: stretch;
    margin: 0 0 var(--sp-4);
    background: hsl(var(--surface));
    border: 1px solid hsl(var(--line-soft));
    border-radius: var(--r-md) !important;
    box-shadow: 0 1px 2px hsl(var(--ink-900) / .04);
    transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

    .tq-shell .card-itemx:hover {
        border-color: hsl(var(--brand-200));
        box-shadow: 0 12px 28px -14px hsl(var(--brand-950) / .35);
        transform: translateY(-2px);
    }

.tq-shell .card-itemx .ceo_app_img {
    flex: 0 0 135px;
    float: none;
    width: 135px;
    margin: 0;
}

.tq-shell .card-itemx .cover {
    position: relative;
    display: block;
    height: 132px;
    margin: var(--sp-3);
    background: hsl(var(--surface-muted));
    border: 1px solid hsl(var(--line));
    border-radius: var(--r-sm);
    overflow: hidden;
}

    .tq-shell .card-itemx .cover img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        object-fit: cover;
        transition: transform var(--dur) var(--ease-out);
    }

    .tq-shell .card-itemx:hover .cover img {
        transform: scale(1.04);
    }

/* 文字列垂直居中 + 标题固定两行行高：行高由内容决定，
   避免封面撑高后日期/页码下方留下大片空白 */
.tq-shell .card-itemx .ceo-padding-remove {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    float: none;
    min-width: 0;
    padding: var(--sp-3) 0 !important;
}

.tq-shell .card-itemx .title {
    display: -webkit-box;
    max-width: 100%;
    min-height: 48px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: var(--fs-16);
    font-weight: 600;
    line-height: 1.5;
    color: hsl(var(--ink-900));
    transition: color var(--dur-fast) var(--ease-out);
}

    .tq-shell .card-itemx:hover .title {
        color: hsl(var(--brand-600));
    }

.tq-shell .card-itemx .card-item-foot {
    padding: 0;
}

/* ---------- S3. 关键词标签：亮青实心块 -> 浅底药丸 ---------- */
.tq-shell .card-itemx .tagst {
    float: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin: var(--sp-2) 0 0;
}

    .tq-shell .card-itemx .tagst .btn_blue {
        display: inline-block;
        max-width: 100%;
        padding: 3px 10px;
        background-color: hsl(var(--brand-50));
        background-image: none;
        border: 0 !important;
        border-radius: var(--r-full) !important;
        box-shadow: none;
        font-size: var(--fs-12);
        line-height: 1.5;
        color: hsl(var(--brand-700)) !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transition: background-color var(--dur-fast) var(--ease-out);
    }

        .tq-shell .card-itemx .tagst .btn_blue:hover {
            background-color: hsl(var(--brand-100));
        }

/* ---------- S4. meta 行 ---------- */
.tq-shell .card-itemx .item-foot {
    padding: 0;
    color: hsl(var(--ink-400));
}

.tq-shell .card-itemx .post {
    float: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-4);
    margin: var(--sp-2) 0 0;
    font-size: var(--fs-12);
    line-height: 1.5;
    color: hsl(var(--ink-400));
    text-align: left;
}

    .tq-shell .card-itemx .post span {
        float: none;
        display: inline-flex;
        align-items: center;
        padding-right: 0;
    }

    .tq-shell .card-itemx .post svg {
        flex: none;
        width: 14px;
        height: 14px;
        margin-right: 5px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .tq-shell .card-itemx .post label {
        margin: 0;
        font-weight: 400;
        color: inherit;
    }

/* ---------- S5. 行内操作按钮 ---------- */
.tq-shell .card-itemx .subtitle {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: var(--sp-2);
    float: none;
    width: auto;
    padding: var(--sp-4) var(--sp-5) var(--sp-4) var(--sp-3);
    font-size: var(--fs-13);
    color: hsl(var(--ink-500));
}

.tq-shell .card-itemx .subtitle .downbtn-wr {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    width: 132px;
    margin: 0;
}

.tq-shell .card-itemx .subtitle .downbtn {
    float: none;
    width: auto;
    margin: 0;
}

    .tq-shell .card-itemx .subtitle .downbtn a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 36px;
        padding: 0 var(--sp-4);
        background-color: hsl(var(--brand-600));
        background-image: none;
        border: 0;
        border-radius: var(--r-input) !important;
        box-shadow: none;
        font-size: var(--fs-13);
        font-weight: 500;
        line-height: 36px;
        color: hsl(var(--surface));
        white-space: nowrap;
        transition: background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
    }

        .tq-shell .card-itemx .subtitle .downbtn a:hover {
            background-color: hsl(var(--brand-700));
            box-shadow: var(--shadow-btn);
            color: hsl(var(--surface));
        }

    .tq-shell .card-itemx .subtitle .downbtn a svg {
        flex: none;
        width: 14px;
        height: 14px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* 在线浏览：描边次按钮（display 由 JS 写内联，CSS 不设） */
    .tq-shell .card-itemx .subtitle .Js_FreeView a {
        background-color: hsl(var(--surface));
        border: 1px solid hsl(var(--line));
        color: hsl(var(--ink-600));
    }

        .tq-shell .card-itemx .subtitle .Js_FreeView a:hover {
            background-color: hsl(var(--brand-50));
            border-color: hsl(var(--brand-300));
            box-shadow: none;
            color: hsl(var(--brand-600));
        }

/* ---------- S6. 分页 ---------- */
.tq-shell .search-pagination {
    padding: var(--sp-5) 0 var(--sp-2);
}

.tq-shell .pagination {
    margin: 0 auto;
    display: table;
}

    .tq-shell .pagination > li > a {
        float: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        height: 36px;
        margin: 0 4px;
        padding: 0 var(--sp-2);
        background: hsl(var(--surface));
        border: 1px solid hsl(var(--line));
        border-radius: var(--r-sm) !important;
        font-size: var(--fs-13);
        line-height: 1;
        color: hsl(var(--ink-600));
        cursor: pointer;
        transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
    }

        .tq-shell .pagination > li > a:hover {
            background: hsl(var(--brand-50));
            border-color: hsl(var(--brand-200));
            color: hsl(var(--brand-600));
        }

    .tq-shell .pagination > .active > a,
    .tq-shell .pagination > .active > a:hover {
        background: hsl(var(--brand-600));
        background-image: none;
        border-color: transparent;
        box-shadow: none;
        color: hsl(var(--surface));
    }

    .tq-shell .pagination > li.disabled > a {
        opacity: .45;
        pointer-events: none;
    }

    .tq-shell .pagination > li.pagMore > a {
        pointer-events: none;
        border-color: transparent;
        background: transparent;
    }

/* ---------- S7. 底部广告轮播圆点 ---------- */
.tq-shell .search_ad {
    position: relative;
    margin: var(--sp-6) 0 0;
}

    .tq-shell .search_ad img {
        display: block;
        width: 100%;
        border-radius: var(--r-md);
    }

    .tq-shell .search_ad ol {
        position: absolute;
        bottom: 10px;
        left: 0;
        z-index: 10;
        width: 100%;
        margin: 0;
        padding: 0;
        text-align: center;
    }

    .tq-shell .search_ad ol li {
        display: inline-block;
        width: 10px;
        height: 10px;
        margin: 0 2px;
        border-radius: 5px;
        background-color: hsl(0 0% 100% / .6);
        font-size: 0;
        line-height: 0;
        cursor: pointer;
        transition: background-color var(--dur-fast) var(--ease-out);
    }

        .tq-shell .search_ad ol li:hover {
            background-color: hsl(0 0% 100% / .9);
        }

        .tq-shell .search_ad ol li.unslider-active {
            background-color: hsl(var(--brand-600));
        }

/* 从原内联 <style> 迁来的存活规则 */
.tq-shell .Js_page li > a {
    cursor: pointer;
}

.tq-shell .unslider-nav {
    display: none;
}

/* ---------- S8. 断点 ---------- */
@media screen and (max-width: 980px) {
    .tq-shell #context.iw {
        flex-direction: column;
    }

    .tq-shell .search-tree {
        position: static;
        flex: none;
        width: 100%;
        max-height: none;
        overflow: visible;
    }

    .tq-shell .card-itemx .subtitle {
        padding-right: var(--sp-4);
    }

    .tq-shell .card-itemx .subtitle .downbtn-wr {
        width: 116px;
    }
}

@media screen and (max-width: 768px) {
    .tq-shell .card-itemx {
        flex-wrap: wrap;
    }

    .tq-shell .card-itemx .ceo_app_img {
        flex: 0 0 100%;
        width: 100%;
    }

    .tq-shell .card-itemx .cover {
        height: 160px;
        margin: var(--sp-3);
    }

    .tq-shell .card-itemx .subtitle {
        flex: 1 1 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        padding: 0 var(--sp-3) var(--sp-3);
    }

    .tq-shell .card-itemx .subtitle .downbtn-wr {
        flex-direction: row;
        width: auto;
    }
}

/* ---------- S9. 骨架屏（加载占位，代替全屏 loading） ---------- */
@keyframes tq-sk-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.tq-shell .sk {
    background: linear-gradient(90deg, hsl(var(--surface-muted)) 25%, hsl(var(--line-soft)) 37%, hsl(var(--surface-muted)) 63%);
    background-size: 400% 100%;
    animation: tq-sk-shimmer 1.4s ease infinite;
    border-radius: var(--r-sm) !important;
}

.tq-shell .sk-row {
    pointer-events: none;
}

    .tq-shell .sk-row:hover {
        border-color: hsl(var(--line-soft));
        box-shadow: 0 1px 2px hsl(var(--ink-900) / .04);
        transform: none;
    }

    .tq-shell .sk-row .sk-cover {
        height: 132px;
        margin: var(--sp-3);
    }

    .tq-shell .sk-row .sk-line {
        height: 16px;
        margin: 8px var(--sp-3) 0;
    }

    .tq-shell .sk-row .sk-w60 {
        width: 60%;
    }

    .tq-shell .sk-row .sk-w40 {
        width: 38%;
    }

    .tq-shell .sk-row .sk-tags {
        display: flex;
        gap: var(--sp-2);
        margin: var(--sp-3) var(--sp-3) 0;
    }

        .tq-shell .sk-row .sk-tags .sk {
            width: 64px;
            height: 22px;
            border-radius: var(--r-full) !important;
        }

    .tq-shell .sk-row .sk-btns {
        display: flex;
        flex-direction: column;
        gap: var(--sp-2);
        width: 132px;
    }

        .tq-shell .sk-row .sk-btns .sk {
            height: 36px;
            border-radius: var(--r-input) !important;
        }

@media screen and (max-width: 768px) {
    .tq-shell .sk-row .sk-btns {
        flex-direction: row;
        width: auto;
    }

        .tq-shell .sk-row .sk-btns .sk {
            width: 116px;
        }
}

@media (prefers-reduced-motion: reduce) {
    .tq-shell .sk {
        animation: none;
    }
}
