
/* 长期项目：添加对比模块 - 横向布局 + 封面图，搜索复用 tang_search_input 组件 */
.cpk-add-module {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-card, 0 2px 12px rgba(0,0,0,0.05));
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.cpk-add-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    flex-wrap: wrap;
}
.cpk-add-label {
    font-size: 13px;
    font-weight: 700;
    color: #6c5ce7;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* 长期项目：CPU 卡片（缩略图 + 名称 + 概要） */
.cpk-add-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #c4b8ff;
    border-radius: 10px;
    padding: 6px 12px 6px 6px;
    min-width: 0;
    max-width: 240px;
    flex-shrink: 0;
}
.cpk-add-card-img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.cpk-add-card-img-fallback {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a39bff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.cpk-add-card-body {
    min-width: 0;
    flex: 1;
}
.cpk-add-card-tag {
    display: inline-block;
    background: #10b981;
    color: #fff;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    margin-right: 4px;
    vertical-align: middle;
}
.cpk-add-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cpk-add-card-name a { color: inherit; text-decoration: none; }
.cpk-add-card-name a:hover { color: #6c5ce7; }
.cpk-add-card-summary {
    font-size: 10px;
    color: #64748b;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* + 分隔符 */
.cpk-add-plus {
    font-size: 18px;
    font-weight: 700;
    color: #94a3b8;
    flex-shrink: 0;
}

/* 槽位 - 包裹 tang_search_input 组件 */
.cpk-add-slot {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 240px;
}
.cpk-add-slot > .tang_search_input {
    width: 100%;
}
.cpk-add-card-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ====================================================================
   移动端：两张卡并排 50% 宽
   长期项目说明：
     - 参考 q/post 对比页风格：当前 CPU + 槽位(input) 各占 50% 宽
     - 卡片改 column 布局：缩略图在上，名称居中
     - + 分隔符在移动端隐藏（两张卡紧贴 + 视觉等价）
     - input 槽位在移动端也呈现卡片样式（白底虚线框 + 🔍 icon）
   ==================================================================== */
@media screen and (max-width: 760px) {
    .cpk-add-row {
        padding: 12px 14px;
        gap: 10px;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
    }
    .cpk-add-label {
        text-align: center;
        font-size: 12px;
    }

    /* 容器：两张卡并排 50% */
    .cpk-add-card-container {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    /* 当前 CPU 卡片：column 布局，缩略图在上 */
    .cpk-add-card {
        flex: 1 1 50%;
        min-width: 0;
        max-width: calc(50% - 4px);
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px 8px 8px;
        gap: 4px;
    }
    .cpk-add-card-img,
    .cpk-add-card-img-fallback {
        width: 60px;
        height: 60px;
        margin: 0 auto 4px;
    }
    .cpk-add-card-img-fallback { font-size: 22px; }
    .cpk-add-card-body { width: 100%; }
    .cpk-add-card-name {
        justify-content: center;
        font-size: 12px;
    }
    .cpk-add-card-name a { word-break: break-word; }
    .cpk-add-card-summary { display: none; }   /* 概要隐藏，省空间 */

    /* 槽位 input：50% 宽 + 卡片样式 */
    .cpk-add-slot {
        flex: 1 1 50%;
        min-width: 0;
        max-width: calc(50% - 4px);
        /* 模仿卡片样式 */
        background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
        border: 2px dashed #c4b8ff;
        border-radius: 10px;
        padding: 10px 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 102px;  /* 跟 .cpk-add-card 等高 */
    }
    .cpk-add-slot .tang_search_input {
        width: 100%;
    }
    .cpk-add-slot .sp-search-wrapper {
        background: #fff;
        border-radius: 6px;
        padding: 4px 6px;
    }
    .cpk-add-slot .sp-search-input {
        padding: 7px 6px;
        font-size: 11px;
        text-align: center;
    }
    .cpk-add-slot .sp-search-input::placeholder {
        font-size: 11px;
    }
}
