/**
 * driver-download.css
 * 驱动搜索页布局样式
 * 对应 pages/driver-download.php [mokeling_driver_download]
 *
 * CSS 单一来源铁律：
 * - 弹窗样式 → modules/download-modal.php 内嵌 <style>
 * - 本文件只负责驱动搜索页布局
 */

/* ── 页面宽度变量（覆盖全局 fallback 780px → 驱动页规范宽度）── */
/* 内容区最大宽度：1200px（规范 min=1200，max=1600） */
:root {
    --mkl-content-max-width: 1000px;
}

/* ── Hero 搜索区 ── */
/* 背景色 #F5F8FC，宽度撑满，内容区对齐 --mkl-content-max-width */
.mkl-dd-hero {
    background: #F5F8FC;
    padding: 64px 24px 48px;
}
.mkl-dd-hero-inner {
    max-width: var(--mkl-content-max-width, 780px);
    margin: 0 auto;
}
.mkl-dd-hero-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #1D1D1F;
    letter-spacing: 0.1em;
    margin: 0 0 8px;
}
.mkl-dd-hero-sub {
    text-align: center;
    font-size: 16px;
    color: #86868B;
    margin: 0 0 32px;
}

/* 搜索框容器 */
.mkl-dd-search-wrap {
    max-width: 676px;   /* 约 60-70% 内容区宽度，1000px基准 */
    margin: 0 auto;
    position: relative;
}
.mkl-dd-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #AEAEB2;
}

/* 搜索输入框：高 52px，圆角 12px，焦点蓝色 glow */
.mkl-dd-search-input {
    width: 100%;
    height: 56px;
    border-radius: 99px;
    border: 1.5px solid #D2D2D7;
    padding: 0 44px 0 48px;
    font-size: 16px;
    color: #1D1D1F;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.mkl-dd-search-input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}

/* 清除按钮（有内容时显示） */
.mkl-dd-search-clear {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #C7C7CC;
    color: #fff;
    font-size: 12px;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: inherit;
    transition: background .15s;
}
.mkl-dd-search-clear.is-visible { display: flex; }
.mkl-dd-search-clear:hover { background: #AEAEB2; }

/* ── 主体区（内容居中） ── */
.mkl-dd-main {
    padding: 32px 24px 64px;
}
.mkl-dd-wrap {
    max-width: var(--mkl-content-max-width, 780px);
    margin: 0 auto;
}

/* ── 搜索结果 meta 行 ── */
.mkl-dd-result-meta {
    font-size: 13px;
    color: #AEAEB2;
    margin-bottom: 16px;
}

/* ══ 产品条目（共用） ══ */
/* 态一（variant_level_drivers=0）和态二（=1）共用外层 .mkl-dd-item */
.mkl-dd-item {
    display: flex;
    gap: 32px;
    padding: 24px 0 24px 12px;  /* 左侧 12px 留缩略图阴影空间 */
    border-bottom: 1px solid #E5E5EA;
}
.mkl-dd-item:last-child { border-bottom: none; }

/* 缩略图：180×180，圆角 10px */
.mkl-dd-thumb {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: box-shadow .15s;
    background: #F5F5F7;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mkl-dd-thumb:hover { box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.mkl-dd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
/* 无图占位字符 */
.mkl-dd-thumb-placeholder {
    font-size: 38px;
    font-weight: 700;
    color: #8E8E93;
    letter-spacing: -0.02em;
    font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', monospace;
    user-select: none;
}

/* ── 态一：产品级信息列 ── */
.mkl-dd-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
}

/* 型号：18px semi-bold，可点击跳详情 */
.mkl-dd-model {
    font-size: 18px;
    font-weight: 600;
    color: #1D1D1F;
    letter-spacing: -0.01em;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 4px;
    transition: color .15s;
}
.mkl-dd-model:hover { color: #0071e3; }

/* 产品名：15px regular */
.mkl-dd-title {
    font-size: 15px;
    color: #6E6E73;
    line-height: 1.4;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color .15s;
}
.mkl-dd-title:hover { color: #1D1D1F; }

/* 变体型号列表（多变体才显示）：13px 灰色 */
.mkl-dd-variant-list {
    font-size: 13px;
    color: #AEAEB2;
    margin-bottom: 10px;
}

/* OS badge */
.mkl-dd-os-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.mkl-dd-os-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 99px;
    background: #F5F5F7;
    color: #6E6E73;
}

/* 按钮行 */
.mkl-dd-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 驱动下载按钮：#0071e3 蓝色 pill */
.mkl-dd-btn-driver {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #0071e3;
    border: none;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
    text-decoration: none;
}
.mkl-dd-btn-driver:hover { background: #0077ED; color: #fff; }

/* 说明书按钮：描边 pill，灰色 */
.mkl-dd-btn-manual {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 500;
    color: #6E6E73;
    background: transparent;
    border: 1px solid #D2D2D7;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.mkl-dd-btn-manual:hover { background: #F5F5F7; border-color: #C7C7CC; }

/* ── 态二：变体级（左列图 + 右列多块） ── */
/* 图片列：120px 宽，含图片 + 产品名小字 */
.mkl-dd-thumb-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 120px;
    flex-shrink: 0;
}
.mkl-dd-thumb-sub {
    font-size: 12px;
    color: #AEAEB2;
    text-align: center;
    line-height: 1.4;
    cursor: pointer;
}
.mkl-dd-thumb-sub:hover { color: #1D1D1F; }

/* 变体信息列（可含多个 block） */
.mkl-dd-variants-col {
    flex: 1;
    min-width: 0;
    padding: 2px 0;
}

/* 单个变体块 */
.mkl-dd-variant-block {
    padding: 8px 0;
}
/* 非首个 block：虚线分隔 */
.mkl-dd-variant-block + .mkl-dd-variant-block {
    border-top: 1px dashed #E5E5EA;
    padding-top: 12px;
    margin-top: 4px;
}

/* 变体型号行 */
.mkl-dd-variant-model-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}
.mkl-dd-variant-model-text {
    font-size: 16px;
    font-weight: 600;
    color: #1D1D1F;
}
.mkl-dd-variant-title-text {
    font-size: 13px;
    color: #AEAEB2;
}

/* ══ 分类浏览区 ══ */
.mkl-dd-browse-title {
    font-size: 20px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 16px;
}
.mkl-dd-cat-group {
    border-bottom: 1px solid #E5E5EA;
}
.mkl-dd-cat-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.mkl-dd-cat-header:hover .mkl-dd-cat-name { color: #0071e3; }
.mkl-dd-cat-name {
    font-size: 16px;
    font-weight: 600;
    color: #1D1D1F;
    transition: color .15s;
}
.mkl-dd-cat-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mkl-dd-cat-count {
    font-size: 13px;
    color: #AEAEB2;
}
/* 展开箭头（朝右，展开后转为朝下） */
.mkl-dd-cat-arrow {
    color: #C7C7CC;
    transition: transform .2s;
    flex-shrink: 0;
}
.mkl-dd-cat-arrow.is-open { transform: rotate(90deg); }

/* 分类内容折叠区 */
.mkl-dd-cat-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}

/* ══ 消费产品提示区 ══ */
.mkl-dd-consumer-block {
    margin-top: 40px;
    border-radius: 16px;
    background: #F5F5F7;
    padding: 40px 32px;
    text-align: center;
}
.mkl-dd-consumer-label {
    font-size: 13px;
    color: #AEAEB2;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}
.mkl-dd-consumer-desc {
    font-size: 15px;
    color: #6E6E73;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 24px;
}

/* 推荐标题 */
.mkl-dd-recs-title {
    font-size: 15px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 16px;
}

/* 推荐卡片网格（3列等宽） */
.mkl-dd-recs-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    justify-content: center;
}
.mkl-dd-rec-card {
    flex: 1;
    max-width: 300px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    text-decoration: none;
    transition: box-shadow .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #E5E5EA;
}
.mkl-dd-rec-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.mkl-dd-rec-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #FAFAFA;
}
.mkl-dd-rec-name {
    font-size: 13px;
    font-weight: 500;
    color: #1D1D1F;
    margin-bottom: 4px;
    line-height: 1.4;
}
.mkl-dd-rec-tagline {
    font-size: 12px;
    color: #6E6E73;
    line-height: 1.4;
}

/* 浏览消费产品链接 */
.mkl-dd-consumer-link {
    font-size: 15px;
    color: #0071e3;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: text-decoration .15s;
}
.mkl-dd-consumer-link:hover { text-decoration: underline; }

/* ══ FAQ 折叠手风琴 ══ */
.mkl-dd-faq-wrap {
    margin-top: 48px;
}
.mkl-dd-faq-title {
    font-size: 20px;
    font-weight: 600;
    color: #1D1D1F;
    margin-bottom: 16px;
}
.mkl-dd-faq-item {
    border-bottom: 1px solid #E5E5EA;
}
.mkl-dd-faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.mkl-dd-faq-q-text {
    font-size: 15px;
    font-weight: 500;
    color: #1D1D1F;
    line-height: 1.4;
}
/* + 号，展开后旋转 45° 变 × */
.mkl-dd-faq-icon {
    flex-shrink: 0;
    margin-left: 12px;
    font-size: 20px;
    line-height: 1;
    color: #86868B;
    transition: transform .2s;
}
.mkl-dd-faq-icon.is-open { transform: rotate(45deg); }
.mkl-dd-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}
.mkl-dd-faq-a-inner {
    font-size: 14px;
    color: #6E6E73;
    line-height: 1.7;
    padding-bottom: 16px;
    white-space: pre-line;
}

/* ── Autocomplete Dropdown ── */
.mkl-dd-suggest {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.04);
    overflow: hidden;
    max-height: 380px;
    overflow-y: auto;
}
.mkl-dd-suggest.is-open {
    display: block;
}

/* 单条建议 */
.mkl-dd-suggest-item {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.mkl-dd-suggest-item:last-child {
    border-bottom: none;
}
.mkl-dd-suggest-item:hover,
.mkl-dd-suggest-item.is-active {
    background: #F5F5F7;
}

/* 型号（加粗） */
.mkl-dd-suggest-model {
    font-weight: 600;
    font-size: 14px;
    color: #1D1D1F;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 产品名称 */
.mkl-dd-suggest-title {
    font-size: 13px;
    color: #6E6E73;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* 分类标签 */
.mkl-dd-suggest-cat {
    font-size: 11px;
    color: #86868B;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 8px;
}

/* 关键词高亮 */
.mkl-dd-suggest-hl {
    color: #0071E3;
    font-weight: inherit;
}

/* ══════════════════════════════════════════════════════════
   WebUSB 自动检测区域
   作用域：#mkl-webusb-detect
   位置：Hero 区副标题与搜索框之间
   ══════════════════════════════════════════════════════════ */

/* 容器：限宽居中，与搜索框对齐 */
#mkl-webusb-detect {
    max-width: 680px;
    margin: 0 auto 32px;
}

/* 卡片：白底圆角阴影 */
.mkl-detect-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    padding: 48px 40px;
    text-align: center;
}

/* ── 状态切换 ── */
.mkl-detect-state { display: none; }
.mkl-detect-state.active { display: block; animation: mklDetectFadeIn 0.25s ease; }

@keyframes mklDetectFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Icon ── */
.mkl-detect-icon {
    margin: 0 auto 24px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mkl-detect-icon svg { width: 80px; height: 80px; }

/* ── 标题 / 副标题 ── */
.mkl-detect-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #1D1D1F;
}
.mkl-detect-subtitle {
    font-size: 14px;
    color: #86868B;
    line-height: 1.6;
    margin-bottom: 28px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* ── 按钮通用 ── */
.mkl-detect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
    line-height: 1;
}
.mkl-detect-btn:active { transform: scale(0.97); }
.mkl-detect-btn svg { width: 20px; height: 20px; }

/* Primary 蓝色 */
.mkl-detect-btn--primary {
    background: #0571e3;
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 113, 227, 0.25);
}
.mkl-detect-btn--primary:hover { background: #0562c7; }

/* Success 绿色 */
.mkl-detect-btn--success {
    background: #34A853;
    color: #fff;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.25);
}
.mkl-detect-btn--success:hover { background: #2d9249; }

/* Ghost 透明 */
.mkl-detect-btn--ghost {
    background: transparent;
    color: #86868B;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
}
.mkl-detect-btn--ghost:hover { background: rgba(0,0,0,0.04); }

/* ── Spinner ── */
.mkl-detect-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mklDetectSpin 0.7s linear infinite;
    display: inline-block;
}
@keyframes mklDetectSpin { to { transform: rotate(360deg); } }

/* ── Success badge ── */
.mkl-detect-success-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #E8F5E9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.mkl-detect-success-badge svg { width: 28px; height: 28px; color: #34A853; }

/* ── Warning badge ── */
.mkl-detect-warn-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #FFF8E1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.mkl-detect-warn-badge svg { width: 28px; height: 28px; color: #E8910C; }

/* ── 安装提示 ── */
.mkl-detect-install-hint {
    font-size: 14px;
    color: #86868B;
    line-height: 1.6;
    margin-top: 20px;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* ── 重试链接行 ── */
.mkl-detect-retry { margin-top: 24px; }

/* ── 取消提示（淡入淡出） ── */
.mkl-detect-cancel-hint {
    font-size: 13px;
    color: #AEAEB2;
    margin-top: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    line-height: 1.5;
}
.mkl-detect-cancel-hint.visible { opacity: 1; }

/* ── 浏览器提示 ── */
.mkl-detect-browser-hint {
    font-size: 12px;
    color: #AEAEB2;
    margin-top: 14px;
}

/* ── 设备管理器快捷提示 ── */
.mkl-detect-devmgr-toggle {
    display: inline-block;
    margin-top: 16px;
    padding: 0;
    border: none;
    background: none;
    font-size: 13px;
    color: #0571e3;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
}
.mkl-detect-devmgr-toggle:hover { color: #0562c7; }
.mkl-detect-devmgr-toggle::after {
    content: ' ▸';
    display: inline-block;
    transition: transform 0.2s;
}
.mkl-detect-devmgr-toggle.is-open::after { transform: rotate(90deg); }

.mkl-detect-devmgr-tip {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease;
    font-size: 13px;
    color: #6E6E73;
    line-height: 1.6;
    text-align: center;
}
.mkl-detect-devmgr-tip.visible {
    max-height: 60px;
    opacity: 1;
    margin-top: 8px;
}
.mkl-detect-devmgr-tip kbd {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    background: #F5F5F7;
    border: 1px solid #D2D2D7;
    font-size: 12px;
    font-family: inherit;
    font-weight: 600;
    color: #1D1D1F;
}

/* ── Win7 补丁提示 ── */
.mkl-detect-win7-hint {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    text-align: center;
}
.mkl-detect-win7-icon {
    font-size: 20px;
    margin-bottom: 6px;
}
.mkl-detect-win7-text {
    font-size: 13px;
    color: #6E6E73;
    line-height: 1.6;
    margin-bottom: 12px;
}
.mkl-detect-btn--win7 {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #E8910C;
    text-decoration: none;
    transition: background 0.2s;
}
.mkl-detect-btn--win7:hover { background: #D17F0A; color: #fff; }

/* ===== 从 pages/driver-download.php <style> 迁移 TS-0411-01 ===== */

.mkl-serial-inline {
        display: inline-block;
        margin-top: 16px;
        padding: 12px 28px;
        background: #0571E3;
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: background .2s;
        animation: mkl-serial-fadein .4s ease;
    }
    .mkl-serial-inline:hover { background: #0460C7; color: #fff; }
    @keyframes mkl-serial-fadein {
        from { opacity: 0; transform: translateY(8px); }
        to { opacity: 1; transform: translateY(0); }
    }
