/* 
 * Zib Smart Download Styles
 * Version: 1.9.0
 */

/* 智能下载区块核心样式 - 极致紧凑版 */
.zib-download-block-wrapper { margin: 6px 0; }
.zib-minimal-download-block-wrapper { margin: 6px 0; }

.zib-download-card { 
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%); 
    border: 1px solid #e8edf2; 
    border-radius: 4px; 
    padding: 8px; 
    margin: 6px 0; 
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05); 
    transition: all 0.2s ease; 
    position: relative;
    overflow: hidden;
}
.zib-download-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.zib-download-card:hover { 
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); 
    transform: translateY(-1px); 
}

.zib-download-header { 
    display: flex; 
    align-items: center; 
    margin-bottom: 4px; 
}
.zib-download-icon { 
    font-size: 18px; 
    margin-right: 8px; 
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.zib-download-title { 
    font-size: 16px; 
    font-weight: 700; 
    color: #1e293b; 
    margin: 0; 
    line-height: 1.3;
}
.zib-download-desc { 
    color: #64748b; 
    text-align: center;
    font-size: 15px; 
    font-weight: 600; 
    line-height: 1.4; 
    margin-bottom: 8px; 
    padding: 8px 0; 
    border-top: 1px solid #f1f5f9; 
    border-bottom: 1px solid #f1f5f9; 
}
.zib-download-footer { 
    text-align: center; 
}

/* 按钮基础样式 */
.zib-download-btn { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px; 
    color: white; 
    text-decoration: none; 
    padding: 4px 4px; 
    border-radius: 8px; 
    font-weight: 600; 
    font-size: 16px; 
    border: none; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1); 
    position: relative; 
    overflow: hidden; 
    min-width: 120px;
}
.zib-download-btn::before { 
    content: ""; 
    position: absolute; 
    top: 0; 
    left: -100%; 
    width: 100%; 
    height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); 
    transition: left 0.4s; 
}
.zib-download-btn:hover::before { 
    left: 100%; 
}
.zib-download-btn:hover { 
    transform: translateY(-1px); 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); 
}
.zib-download-btn:active { 
    transform: translateY(0); 
}

/* 默认按钮样式 */
.zib-download-btn:not([class*="zib-download-"]) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* 预设样式 */
.zib-download-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.zib-download-secondary { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.zib-download-success { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.zib-download-warning { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }

.zib-download-btn-icon { font-size: 6px; }

/* 超紧凑版样式 */
.zib-download-super-compact .zib-download-card {
    padding: 6px;
    margin: 8px 0;
}
.zib-download-super-compact .zib-download-header {
    margin-bottom: 8px;
}
.zib-download-super-compact .zib-download-title {
    font-size: 15px;
}
.zib-download-super-compact .zib-download-desc {
    font-size: 6px;
    padding: 6px 0;
    margin-bottom: 4px;
    line-height: 1.3;
}
.zib-download-super-compact .zib-download-btn {
    padding: 8px 8px;
    font-size: 13px;
    min-width: 100px;
}

/* 内联版本 */
.zib-download-inline {
    display: inline-block;
    margin: 4px;
}
.zib-download-inline .zib-download-card {
    padding: 4px 14px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.zib-download-inline .zib-download-header {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.zib-download-inline .zib-download-title {
    font-size: 14px;
    margin: 0;
}
.zib-download-inline .zib-download-desc {
    display: none;
}
.zib-download-inline .zib-download-footer {
    margin: 0;
}
.zib-download-inline .zib-download-btn {
    padding: 6px 6px;
    font-size: 6px;
    min-width: auto;
}

/* 错误状态 */
.zib-download-error { 
    background: #fef2f2; 
    border: 1px solid #fecaca; 
    color: #dc2626; 
    padding: 8px 6px; 
    border-radius: 6px; 
    font-size: 6px; 
    text-align: center; 
    border-left: 2px solid #dc2626;
    margin: 8px 0;
}

/* 智能链接样式 */
.zib-smart-download-link { 
    color: #667eea !important; 
    text-decoration: none !important; 
    border-bottom: 1px solid #c7d2fe; 
    padding-bottom: 1px; 
    transition: all 0.2s ease; 
    font-weight: 500; 
    font-size: 13px;
}
.zib-smart-download-link:hover { 
    color: #764ba2 !important; 
    border-bottom-color: #667eea; 
    background: rgba(102, 126, 234, 0.05); 
    padding: 1px 3px; 
    border-radius: 3px; 
}

@media (max-width: 768px) {
    .zib-download-card { padding: 14px; margin: 4px 0; }
    .zib-download-title { font-size: 15px; }
    .zib-download-btn { padding: 9px 18px; font-size: 13px; width: 100%; min-width: auto; }
    .zib-download-desc { font-size: 13px; padding: 7px 0; }
    
    .zib-download-super-compact .zib-download-card {
        padding: 4px;
        margin: 6px 0;
    }
}

/* 极简版本 */
.zib-download-minimal .zib-download-card {
    background: transparent;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    padding: 4px;
}
.zib-download-minimal .zib-download-card::before {
    display: none;
}
.zib-download-minimal .zib-download-card:hover {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    transform: none;
}