/**
 * 小墨美化插件 - 文章顶部下载卡片
 * 作用域统一限定在 .mzt-down-card 内，避免污染主题全局样式。
 * 配色/字体沿用 zibll 主题的 CSS 变量，无变量时提供回退值。
 */

/* ---------- PC / 移动端切换 ---------- */
.mzt-down-card .mzt-dc-mobile { display: none; }

/* ---------- 卡片外框 ---------- */
.mzt-down-card { margin-bottom: 20px; }

.mzt-down-card .mzt-dc-box {
    background-color: var(--main-bg-color, #fff);
    border-radius: 8px;
    box-shadow: 0 0 10px var(--main-shadow, rgba(0, 0, 0, .08));
    padding: 20px;
    overflow: hidden;
}

/* ---------- 顶部：图标 + 标题 + 标签 ---------- */
.mzt-down-card .mzt-dc-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.mzt-down-card .mzt-dc-thumb {
    width: 85px;
    height: 85px;
    flex: 0 0 85px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.mzt-down-card .mzt-dc-main { flex: 1; min-width: 0; }

.mzt-down-card .mzt-dc-title {
    color: var(--header-color, #333);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.mzt-down-card .mzt-dc-update {
    color: #999;
    font-size: 12px;
    font-weight: 400;
    margin-left: 8px;
}

.mzt-down-card .mzt-dc-tags { line-height: 1.8; }

/* ---------- 信息区：参数 + 下载地址按钮 ---------- */
.mzt-down-card .mzt-dc-body {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}

.mzt-down-card .mzt-dc-meta {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    gap: 2px 16px;
}

.mzt-down-card .mzt-dc-meta p {
    margin: 0;
    width: 25%;
    min-width: 140px;
    height: 30px;
    line-height: 30px;
    color: var(--header-color, #333);
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mzt-down-card .mzt-dc-meta span { color: #524d4d; margin-right: 4px; }

.mzt-down-card .mzt-dc-star { color: #f5a623; letter-spacing: 1px; }

/* 下载按钮 */
.mzt-down-card .mzt-dc-btn {
    flex: 0 0 180px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: #fff !important;
    background: #008ded;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: opacity .2s;
}

.mzt-down-card .mzt-dc-btn:hover { opacity: .85; }

/* ---------- 移动端卡片 ---------- */
.mzt-down-card .mzt-dc-mobile .mzt-dc-box { padding: 15px; }

.mzt-down-card .mzt-dc-mobile .mzt-dc-head { gap: 10px; }

.mzt-down-card .mzt-dc-mobile .mzt-dc-thumb {
    width: 66px;
    height: 66px;
    flex-basis: 66px;
    border-radius: 8px;
}

.mzt-down-card .mzt-dc-mobile .mzt-dc-title {
    font-size: 16px;
    margin-bottom: 4px;
}

.mzt-down-card .mzt-dc-mobile .mzt-dc-grid {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.mzt-down-card .mzt-dc-mobile .mzt-dc-grid > div {
    width: 50%;
    box-sizing: border-box;
    padding: 2px 0;
    font-size: 13px;
    color: var(--header-color, #333);
    line-height: 1.6;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mzt-down-card .mzt-dc-mobile .mzt-dc-grid span { color: #999; margin-right: 4px; }

.mzt-down-card .mzt-dc-mobile .mzt-dc-btn {
    width: 100%;
    height: 42px;
    line-height: 42px;
    font-size: 16px;
    margin-top: 14px;
}

/* ---------- 响应式：≤768px 切换为移动卡片 ---------- */
@media (max-width: 768px) {
    .mzt-down-card .mzt-dc-pc { display: none; }
    .mzt-down-card .mzt-dc-mobile { display: block; }
}
