/*
 * zib-uploader.css — FilePond 主题覆盖
 * 适配网站 A（粉色 .zib-app）和网站 B（深色 .nude2-app）
 *
 * 两种模式：
 *   默认模式 — 拖拽区（upload.html 等大面积上传区）
 *   紧凑模式 .zib-uploader-compact — 按钮外观（faceswap 等多按钮并排布局）
 */

/* ===== 共享基础 ===== */
.filepond--root {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", Helvetica, Arial, sans-serif;
    font-size: 15px;
    margin-bottom: 0;
}
.filepond--root * {
    font-family: inherit;
}
.filepond--panel-root {
    border-radius: 16px;
}
.filepond--drop-label {
    min-height: 100px;
    cursor: pointer;
}
.filepond--drop-label label {
    cursor: pointer;
    padding: 20px 16px;
    line-height: 1.5;
    font-size: 14px;
    font-weight: 500;
}
.filepond--label-action {
    text-decoration: none;
    font-weight: 700;
}
.filepond--file-info-main,
.filepond--file-info-sub {
    font-size: 13px;
}
.filepond--item-panel {
    border-radius: 10px;
}

/* ===== 网站 A：粉色主题（默认拖拽区）===== */
.zib-app .filepond--panel-root {
    background-color: #fff0f5;
    border: 2px dashed #ffb3c6;
}
.zib-app .filepond--root:hover .filepond--panel-root,
.zib-app .filepond--root[data-hopper-state="drag-over"] .filepond--panel-root {
    border-color: #ff6b9d;
    background-color: #fce4ec;
}
.zib-app .filepond--drop-label label {
    color: #333;
}
.zib-app .filepond--label-action {
    color: #e91e63;
}
.zib-app .filepond--label-action:hover {
    color: #c2185b;
}
.zib-app .filepond--item-panel {
    background-color: #ff6b9d;
}
.zib-app .filepond--file-action-button {
    cursor: pointer;
}
.zib-app .filepond--drip-blob {
    background-color: #ff6b9d;
}

/* ===== 网站 B：深色主题（默认拖拽区）===== */
.nude2-app .filepond--panel-root {
    background-color: rgba(139, 92, 246, 0.06);
    border: 2px dashed rgba(139, 92, 246, 0.3);
}
.nude2-app .filepond--root:hover .filepond--panel-root,
.nude2-app .filepond--root[data-hopper-state="drag-over"] .filepond--panel-root {
    border-color: #8b5cf6;
    background-color: rgba(139, 92, 246, 0.1);
}
.nude2-app .filepond--drop-label label {
    color: #e2e8f0;
}
.nude2-app .filepond--label-action {
    color: #a78bfa;
}
.nude2-app .filepond--label-action:hover {
    color: #c4b5fd;
}
.nude2-app .filepond--item-panel {
    background-color: #8b5cf6;
}
.nude2-app .filepond--file-action-button {
    cursor: pointer;
}
.nude2-app .filepond--drip-blob {
    background-color: #8b5cf6;
}

/* ================================================================
   紧凑模式 .zib-uploader-compact
   让 FilePond 看起来像一个实心按钮，而非拖拽区域。
   用于 faceswap、tushengshipin 等多按钮并排布局。

   核心原理：
   - 移除 FilePond root 的 size containment，允许根据子元素自动调整大小
   - 将 drop-label 从 position:absolute 改为 relative，使其参与父元素高度计算
   - 隐藏文件列表和拖拽水滴效果，只保留点击标签和背景面板
   ================================================================ */
.zib-uploader-compact .filepond--root {
    margin-bottom: 0;
    height: auto !important;
    contain: layout style !important;
}
.zib-uploader-compact .filepond--drop-label {
    position: relative !important;
    min-height: 44px !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.zib-uploader-compact .filepond--drop-label label {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
.zib-uploader-compact .filepond--panel-root {
    border: none !important;
    border-radius: 14px;
}
.zib-uploader-compact .filepond--list-scroller,
.zib-uploader-compact .filepond--drip {
    display: none !important;
}
.zib-uploader-compact .filepond--drop-label label small,
.zib-uploader-compact .filepond--drop-label label br {
    display: none;
}

/* --- 粉色紧凑 --- */
.zib-app .zib-uploader-compact .filepond--panel-root {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.3);
}
.zib-app .zib-uploader-compact .filepond--drop-label label {
    color: #fff;
}
.zib-app .zib-uploader-compact .filepond--label-action {
    color: #fff;
    text-decoration: underline;
}
.zib-app .zib-uploader-compact .filepond--root:hover .filepond--panel-root {
    background: linear-gradient(135deg, #ff5a8a 0%, #ff7ea0 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

/* --- 深色紧凑 --- */
.nude2-app .zib-uploader-compact .filepond--panel-root {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
.nude2-app .zib-uploader-compact .filepond--drop-label label {
    color: #fff;
}
.nude2-app .zib-uploader-compact .filepond--label-action {
    color: #fff;
    text-decoration: underline;
}
.nude2-app .zib-uploader-compact .filepond--root:hover .filepond--panel-root {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

/* ================================================================
   紧凑模式在 #actions 内：与 submit/download 按钮保持视觉一致
   去掉发光效果，匹配边框/圆角/尺寸
   ================================================================ */
#actions .zib-uploader-compact {
    min-width: 120px;
    flex: 1;
}
.zib-app #actions .zib-uploader-compact .filepond--root {
    height: 100% !important;
    position: relative !important;
    min-height: 72px;
}
/* 与并排「开始换脸/下载」同高时，drop-label 需铺满根节点，否则文案会贴顶 */
.zib-app #actions .zib-uploader-compact .filepond--drop-label {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.zib-app #actions .zib-uploader-compact .filepond--drop-label label {
    padding: 14px 12px;
    font-size: 15px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.25 !important;
    margin: 0 !important;
}
.zib-app #actions .zib-uploader-compact .filepond--panel-root {
    box-shadow: none !important;
}
.nude2-app #actions .zib-uploader-compact .filepond--drop-label label {
    padding: 0.95rem 1.35rem;
    font-size: 1rem;
    font-weight: 700;
}
.nude2-app #actions .zib-uploader-compact .filepond--panel-root {
    border-radius: 14px !important;
    border: 2px solid rgba(139, 92, 246, 0.25) !important;
    box-shadow: none !important;
}
.nude2-app #actions .zib-uploader-compact .filepond--root:hover .filepond--panel-root {
    border-color: #8b5cf6 !important;
    box-shadow: none !important;
}

/* ================================================================
   绿色紧凑按钮变体 .zib-uploader-green
   用于 nude2 wenshengtu 的操作区上传按钮
   ================================================================ */
.zib-uploader-green .filepond--panel-root {
    background: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%) !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
    border-radius: 14px;
}
.zib-uploader-green .filepond--drop-label label {
    color: #fff !important;
}

/* ================================================================
   upload-boxes 内 FilePond 宽度保证
   ================================================================ */
.upload-boxes .filepond--root {
    width: 100%;
}
.upload-boxes > div {
    width: 100%;
}

/* ===== 响应式 ===== */
@media screen and (max-width: 768px) {
    .filepond--drop-label {
        min-height: 80px;
    }
    .filepond--drop-label label {
        font-size: 13px;
        padding: 14px 12px;
    }
    .zib-app #actions .zib-uploader-compact .filepond--root {
        min-height: 68px;
    }
}
@media screen and (max-width: 480px) {
    .filepond--drop-label {
        min-height: 60px;
    }
    .filepond--drop-label label {
        font-size: 12px;
        padding: 10px 8px;
    }
}
