/* 
 * Zib Download Styles
 * Version: 2.0.2
 * Author: 资源大师网
 */

/* ===== CSS变量定义（根据设置动态生成） ===== */
:root {
    --zib-button-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --zib-button-padding: 12px 28px;
    --zib-button-font-size: 15px;
}

/* ===== 授权状态样式 ===== */
.zib-license-status {
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: 500;
}

.zib-license-valid {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.zib-license-trial {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.zib-license-invalid {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ===== 智能下载卡片样式 ===== */
.zib-download-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin: 15px 0;
}

.zib-download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.zib-download-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.zib-download-icon {
    font-size: 24px;
    margin-right: 12px;
    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: 18px;
    color: #1e293b;
    font-weight: 700;
}

.zib-download-desc {
    color: #64748b;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    background: rgba(241, 245, 249, 0.3);
    border-radius: 6px;
}

.zib-download-footer {
    text-align: center;
}

/* ===== 按钮基础样式（使用CSS变量） ===== */
.zib-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    padding: var(--zib-button-padding, 12px 28px);
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--zib-button-font-size, 15px);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    text-align: center;
    background: var(--zib-button-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
}

.zib-download-btn::after {
    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.5s ease;
}

.zib-download-btn:hover::after {
    left: 100%;
}

.zib-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.zib-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

/* ===== 按钮颜色变体（覆盖CSS变量） ===== */
.zib-download-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.zib-download-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.zib-download-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.zib-download-warning {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%) !important;
}

/* ===== 按钮大小类（可选覆盖） ===== */
.zib-download-small {
    padding: 10px 20px !important;
    font-size: 14px !important;
}

.zib-download-large {
    padding: 14px 32px !important;
    font-size: 16px !important;
}

.zib-download-xlarge {
    padding: 16px 36px !important;
    font-size: 17px !important;
}

/* ===== 智能转换链接样式 ===== */
.zib-smart-download-link {
    color: #667eea !important;
    text-decoration: none !important;
    border-bottom: 2px solid #c7d2fe;
    padding-bottom: 2px;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 15px;
    position: relative;
}

.zib-smart-download-link:hover {
    color: #764ba2 !important;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
}

/* ===== 错误提示样式 ===== */
.zib-download-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border-left: 4px solid #dc2626;
    margin: 15px 0;
}

/* ===== 区块包装器 ===== */
.zib-download-block-wrapper,
.zib-minimal-download-block-wrapper {
    margin: 15px 0;
}

/* ===== 试用版样式 ===== */
.zib-trial-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
}

.zib-trial-notice strong {
    color: #856404;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .zib-download-card {
        padding: 16px;
    }
    
    .zib-download-title {
        font-size: 16px;
    }
    
    .zib-download-desc {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .zib-download-btn {
        padding: 10px 20px !important;
        font-size: 14px !important;
        width: 100%;
    }
    
    .zib-smart-download-link {
        font-size: 14px;
    }
}

/* ===== 区块编辑器中的预览样式 ===== */
.editor-styles-wrapper .zib-download-card {
    margin: 10px 0;
}

.editor-styles-wrapper .zib-download-btn {
    pointer-events: none;
}