/**
 * 子比主题 - 自定义付费下载弹窗 前端样式
 * 适配子比主题原生 Modal UI 风格
 */

/* ============ 获取资源按钮美化 ============ */
.zcd-custom-box .zcd-trigger-btn {
    font-size: 15px !important;
    letter-spacing: 1px;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.zcd-custom-box .zcd-trigger-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ============ 弹窗内容区 ============ */
.zcd-modal-content {
    padding: 5px 0;
}

/* ============ 隐藏弹窗滚动条（保留滚动功能） ============ */
.modal-body::-webkit-scrollbar,
.zcd-modal-content::-webkit-scrollbar {
    display: none;
}
.modal-body,
.zcd-modal-content {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============ 下载列表容器 ============ */
.zcd-down-list {
    margin-bottom: 10px;
}

.zcd-down-title {
    font-size: 14px;
    font-weight: bold;
    color: var(--main-color, #ff4757);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--muted-border-color, #eee);
    display: flex;
    align-items: center;
    gap: 8px;
}

.zcd-down-title i {
    font-size: 16px;
}

/* ============ 下载项 ============ */
.zcd-down-item {
    padding: 12px 14px;
    margin-bottom: 8px;
    background: var(--muted-box-bg, #f8f9fa);
    border-radius: 10px;
    border: 1px solid var(--muted-border-color, #eee);
    transition: all 0.25s ease;
}

.zcd-down-item:last-child {
    margin-bottom: 0;
}

.zcd-down-item:hover {
    border-color: var(--main-color, #ff4757);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.08);
    transform: translateY(-1px);
}

/* ============ 下载行 ============ */
.zcd-down-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.zcd-pan-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.zcd-pan-icon svg {
    width: 28px;
    height: 28px;
}

.zcd-pan-icon .fa {
    font-size: 18px;
    color: var(--main-color, #ff4757);
}

.zcd-pan-name {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: var(--main-text-color, #333);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zcd-down-btn {
    flex-shrink: 0;
    font-size: 13px !important;
    padding: 5px 16px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.zcd-down-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* ============ 二维码按钮 ============ */
.zcd-qrcode-toggle {
    flex-shrink: 0;
    font-size: 16px !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    background: var(--muted-box-bg, #f0f0f0) !important;
    color: var(--muted-color, #666) !important;
    border: 1px solid var(--muted-border-color, #ddd) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
}

.zcd-qrcode-toggle:hover,
.zcd-qrcode-toggle.active {
    background: var(--main-color, #ff4757) !important;
    color: #fff !important;
    border-color: var(--main-color, #ff4757) !important;
}

/* ============ 二维码展示区 ============ */
.zcd-qrcode-wrap {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--muted-border-color, #e0e0e0);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zcdFadeIn 0.3s ease;
    position: relative;
}

.zcd-qrcode-wrap img,
.zcd-qrcode-wrap canvas {
    max-width: 180px;
    max-height: 180px;
    height: auto;
    border-radius: 6px;
    border: 1px solid var(--muted-border-color, #eee);
    padding: 4px;
    background: #fff;
    /* 防护：阻止浏览器解码二维码 */
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.zcd-qrcode-wrap .zcd-qrcode-tip {
    font-size: 11px;
    color: var(--muted-2-color, #999);
    margin-top: 6px;
}

.zcd-qrcode-wrap .zcd-qrcode-loading {
    color: var(--muted-2-color, #999);
    font-size: 13px;
    padding: 30px 0;
}

/* 透明遮罩：阻断浏览器悬停识别二维码 */
.zcd-qr-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: default;
    background: transparent;
}

@keyframes zcdFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ 额外信息（提取码 / more标签） ============ */
.zcd-down-extra {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.zcd-copy-btn {
    font-size: 12px !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    background: var(--muted-box-bg, #f0f0f0) !important;
    color: var(--muted-color, #666) !important;
    border: 1px solid var(--muted-border-color, #ddd) !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.zcd-copy-btn:hover {
    background: var(--main-color, #ff4757) !important;
    color: #fff !important;
    border-color: var(--main-color, #ff4757) !important;
}

.zcd-more-tag {
    font-size: 12px;
    color: var(--muted-2-color, #999);
    background: var(--muted-box-bg, #f0f0f0);
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--muted-border-color, #ddd);
}

/* =========================================================
   以下为弹窗各 Tab 内容区域的美化样式
   每种内容类型使用独立的配色方案（渐变背景 + 左侧彩条）
   ========================================================= */

/* ============ Tab: 解压密码 — 🔴 红橙配色 ============ */
.zcd-password-section,
.zcd-bottom-extra-hide {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff9f0 100%);
    border: 1px solid #ffd6d6;
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
    animation: zcdFadeIn 0.3s ease;
}

.zcd-password-section .zcd-password-label,
.zcd-bottom-extra-hide .zcd-password-label {
    font-size: 13px;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.zcd-password-section .zcd-password-label i,
.zcd-bottom-extra-hide .zcd-password-label i {
    font-size: 14px;
}

.zcd-password-section .zcd-password-value,
.zcd-bottom-extra-hide .zcd-password-value {
    font-size: 16px;
    font-weight: 700;
    color: #2d2d2d;
    word-break: break-all;
    user-select: all;
    letter-spacing: 1px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    border: 1px dashed #ffcccc;
}

.zcd-password-section .zcd-password-value p,
.zcd-bottom-extra-hide .zcd-password-value p {
    margin: 0;
    padding: 0;
}

/* 密码区自定义简介 */
.zcd-password-desc {
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--muted-color, #666);
    background: rgba(0,0,0,0.02);
    border-radius: 6px;
    line-height: 1.6;
}

/* ============ Tab: 简介说明 — 🔵 蓝色配色 ============ */
.zcd-doc-section,
.zcd-bottom-doc {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.8;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #c8e0f4;
    border-radius: 10px;
    border-left: 4px solid #5b9bd5;
    animation: zcdFadeIn 0.3s ease;
}

.zcd-doc-section p,
.zcd-bottom-doc p {
    margin: 0 0 8px 0;
}

.zcd-doc-section p:last-child,
.zcd-bottom-doc p:last-child {
    margin: 0;
}

/* ============ Tab: 更多内容 — 🟢 绿色配色 ============ */
.zcd-details-section,
.zcd-bottom-details {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.8;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0faf0 0%, #e6f7e6 100%);
    border: 1px solid #c8e6c8;
    border-radius: 10px;
    border-left: 4px solid #66bb6a;
    animation: zcdFadeIn 0.3s ease;
}

.zcd-details-section p,
.zcd-bottom-details p {
    margin: 0 0 8px 0;
}

.zcd-details-section p:last-child,
.zcd-bottom-details p:last-child {
    margin: 0;
}

/* ============ Tab: 商品属性 — 🟠 橙色配色 ============ */
.zcd-attr-section,
.zcd-bottom-attr {
    padding: 14px 16px;
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e6 100%);
    border: 1px solid #ffe0b2;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
    animation: zcdFadeIn 0.3s ease;
}

.zcd-attr-section table,
.zcd-bottom-attr table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.zcd-attr-section td,
.zcd-bottom-attr td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 152, 0, 0.08);
    vertical-align: top;
}

.zcd-attr-section tr:last-child td,
.zcd-bottom-attr tr:last-child td {
    border-bottom: none;
}

.zcd-attr-section td:first-child,
.zcd-bottom-attr td:first-child {
    color: #8d6e63;
    white-space: nowrap;
    font-weight: 600;
    width: 30%;
}

.zcd-attr-section td:last-child,
.zcd-bottom-attr td:last-child {
    color: #4a5568;
}

/* ============ 底部自定义内容 — 🟣 紫色配色 ============ */
.zcd-bottom-custom {
    padding: 14px 16px;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede4ff 100%);
    border: 1px solid #d7c8f0;
    border-radius: 10px;
    border-left: 4px solid #9c27b0;
    color: #4a3a5e;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: zcdFadeIn 0.3s ease;
}

.zcd-bottom-custom::before {
    content: "\f0eb";
    font-family: "Font Awesome 4.7", "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 15px;
    color: #9c27b0;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============ 演示地址按钮美化（Tab内独立显示时） ============ */
.zcd-tab-panel .but.c-yellow {
    border-radius: 8px !important;
    font-size: 14px !important;
    letter-spacing: 0.5px;
    transition: all 0.25s ease !important;
}

.zcd-tab-panel .but.c-yellow:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* ============ 多 Tab 导航栏 ============ */
.zcd-tabs-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    padding: 0 0 12px 0;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--muted-border-color, #eee);
}

.zcd-tab-nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--muted-border-color, #ddd);
    background: var(--muted-box-bg, #f5f5f5);
    color: var(--muted-color, #666);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.zcd-tab-nav-btn:hover {
    border-color: var(--main-color, #ff4757);
    color: var(--main-color, #ff4757);
    background: var(--muted-box-bg, #fff5f5);
}

.zcd-tab-nav-btn.active {
    background: var(--main-color, #ff4757);
    color: #fff !important;
    border-color: var(--main-color, #ff4757);
    box-shadow: 0 3px 10px rgba(255, 71, 87, 0.3);
}

/* Tab 面板切换动画 */
.zcd-tab-panel {
    animation: zcdTabFadeIn 0.25s ease;
}

@keyframes zcdTabFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============ 响应式适配 ============ */
@media (max-width: 480px) {
    .zcd-tab-nav-btn {
        padding: 5px 12px;
        font-size: 12px;
    }
    .zcd-tabs-nav {
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .zcd-down-row {
        gap: 8px;
    }

    .zcd-pan-name {
        font-size: 13px;
    }

    .zcd-down-btn {
        font-size: 12px !important;
        padding: 4px 12px !important;
    }

    .zcd-qrcode-toggle {
        width: 30px;
        height: 30px;
        font-size: 14px !important;
        padding: 4px 8px !important;
    }

    .zcd-down-item {
        padding: 10px 12px;
    }

    .zcd-password-section,
    .zcd-bottom-extra-hide,
    .zcd-doc-section,
    .zcd-bottom-doc,
    .zcd-details-section,
    .zcd-bottom-details,
    .zcd-attr-section,
    .zcd-bottom-attr,
    .zcd-bottom-custom {
        padding: 10px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    .zcd-password-section .zcd-password-value,
    .zcd-bottom-extra-hide .zcd-password-value {
        font-size: 14px;
    }
}
