/**
 * 照片合成功能样式(g8008)
 * @company  云蓝图科技 <www.yunlantu.com>
 * @author   王立国 <qq/email:474780888@qq.com>
 * @date     2026年1月16日
 * @notes    手机端照片合成功能专用样式
 */

/* ========== 基础样式 ========== */
.zphc-page { padding-bottom: 20px; background: #f5f5f5; min-height: 100vh; }
.zphc-container { padding: 0 15px;margin: 0 auto; }

/* ========== 首页样式 ========== */
.zphc-closed { padding: 60px 20px; text-align: center; background: #fff; margin: 15px 0; border-radius: 8px; }
.zphc-closed-icon { font-size: 48px; margin-bottom: 15px; }
.zphc-closed-text { color: #999; font-size: 14px; }

.zphc-guide { background: #fff; padding: 20px; margin: 15px 0; border-radius: 8px; }
.zphc-guide-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; }
.zphc-guide-desc { color: #666; font-size: 14px; line-height: 1.6; }
.zphc-guide-tips { margin-top: 15px; padding: 10px; background: #f0f9ff; border-radius: 6px; color: #1890ff; font-size: 13px; }

.zphc-preview-area { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-area-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.zphc-area-title { font-size: 16px; font-weight: bold; }
.zphc-area-tips { color: #999; font-size: 12px; }
.zphc-area-count { color: #1890ff; font-size: 13px; }
.zphc-clear-btn { color: #ff4d4f; font-size: 13px; cursor: pointer; }

.zphc-photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zphc-photo-item { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #f0f0f0; }
.zphc-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.zphc-photo-num { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 10px; }
.zphc-photo-del { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }

.zphc-empty { padding: 40px 20px; text-align: center; }
.zphc-empty-icon { font-size: 48px; margin-bottom: 10px; }
.zphc-empty-text { color: #999; font-size: 14px; }

.zphc-actions { padding: 15px; display: flex; gap: 10px; }
.zphc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border-radius: 6px; font-size: 15px; text-decoration: none; border: none; cursor: pointer; transition: all 0.3s; }
.zphc-btn-primary { background: #1890ff; color: #fff; }
.zphc-btn-primary:active { background: #096dd9; }
.zphc-btn-success { background: #52c41a; color: #fff; }
.zphc-btn-success:active { background: #389e0d; }
.zphc-btn-default { background: #f0f0f0; color: #333; }
.zphc-btn-default:active { background: #d9d9d9; }
.zphc-btn-lg { flex: 1; padding: 14px 20px; font-size: 16px; }
.zphc-btn-disabled { opacity: 0.5; pointer-events: none; }

/*合成记录*/
.zphc-quick{ background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-quick .zphc-quick-item { display: flex;}


.zphc-recent-list { margin-top: 10px; }
.zphc-recent-item { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.zphc-recent-item:last-child { border-bottom: none; }
.zphc-recent-thumb { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; margin-right: 12px; background: #f0f0f0; }
.zphc-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.zphc-recent-info { flex: 1; }
.zphc-recent-title { font-size: 14px; margin-bottom: 4px; }
.zphc-recent-time { color: #999; font-size: 12px; }
.zphc-recent-status { font-size: 12px; padding: 2px 8px; border-radius: 10px; }

.zphc-stats { display: flex; gap: 10px; margin: 15px 0; }
.zphc-stat-item { flex: 1; background: #fff; padding: 15px; border-radius: 8px; text-align: center; }
.zphc-stat-num { font-size: 24px; font-weight: bold; color: #1890ff; }
.zphc-stat-label { color: #999; font-size: 12px; margin-top: 4px; }

/* ========== 选择页样式 ========== */
.zphc-select-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; background: #fff; margin: 0 -15px; padding: 12px 15px; }
.zphc-back-btn { color: #1890ff; font-size: 14px; text-decoration: none; }
.zphc-header-title { font-size: 17px; font-weight: bold; }
.zphc-header-right { color: #1890ff; font-size: 14px; min-width: 50px; text-align: right; }

.zphc-tabs { display: flex; background: #fff; margin: 0 -15px; border-bottom: 1px solid #f0f0f0; }
.zphc-tab { flex: 1; padding: 12px; text-align: center; font-size: 14px; color: #666; position: relative; cursor: pointer; }
.zphc-tab.active { color: #1890ff; }
.zphc-tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background: #1890ff; }

.zphc-filter { padding: 10px 0; }
.zphc-filter select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; }

.zphc-select-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 0; }
.zphc-select-item { position: relative; aspect-ratio: 1; border-radius: 4px; overflow: hidden; cursor: pointer; }
.zphc-select-item img { width: 100%; height: 100%; object-fit: cover; }
.zphc-select-item.selected::after { content: '✓'; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(24,144,255,0.5); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.zphc-select-check { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 2px solid #fff; border-radius: 50%; background: rgba(0,0,0,0.3); }
.zphc-select-item.selected .zphc-select-check { background: #1890ff; border-color: #1890ff; }
.zphc-select-item.selected .zphc-select-check::after { content: '✓'; color: #fff; font-size: 14px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }

.zphc-upload-area { padding: 20px; }
.zphc-upload-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; border: 2px dashed #ddd; border-radius: 8px; cursor: pointer; }
.zphc-upload-icon { font-size: 48px; color: #999; margin-bottom: 10px; }
.zphc-upload-text { color: #666; font-size: 14px; }
.zphc-upload-tips { color: #999; font-size: 12px; margin-top: 8px; }

.zphc-upload-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.zphc-upload-item { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.zphc-upload-item img { width: 100%; height: 100%; object-fit: cover; }
.zphc-upload-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; background: rgba(255,77,79,0.9); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }

.zphc-bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; padding: 10px 15px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 10px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: space-between; z-index: 100; }
.zphc-selected-count { font-size: 14px; color: #666; }
.zphc-selected-count span { color: #1890ff; font-weight: bold; }

/* ========== 预览页样式 ========== */
.zphc-preview-box { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-preview-container { display: grid; gap: 4px; border-radius: 8px; overflow: hidden; }
.zphc-preview-container[data-template="grid_4"] { grid-template-columns: repeat(2, 1fr); }
.zphc-preview-container[data-template="grid_6"] { grid-template-columns: repeat(2, 1fr); }
.zphc-preview-container[data-template="grid_9"] { grid-template-columns: repeat(3, 1fr); }
.zphc-preview-container[data-template="long_v"] { grid-template-columns: 1fr; }
.zphc-preview-container[data-template="long_h"] { grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); }
.zphc-preview-item { position: relative; aspect-ratio: 1; overflow: hidden; }
.zphc-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.zphc-preview-num { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 10px; }

.zphc-thumb-area { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-thumb-list { display: flex; gap: 8px; overflow-x: auto; padding: 5px 0; }
.zphc-thumb-item { position: relative; width: 60px; height: 60px; flex-shrink: 0; border-radius: 6px; overflow: hidden; cursor: grab; }
.zphc-thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.zphc-thumb-item.dragging { opacity: 0.5; transform: scale(1.1); }
.zphc-thumb-num { position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,0.6); color: #fff; font-size: 10px; padding: 1px 4px; border-radius: 8px; }

.zphc-template-area { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-template-list { display: flex; gap: 12px; overflow-x: auto; padding: 5px 0; }
.zphc-template-item { flex-shrink: 0; width: 80px; text-align: center; padding: 10px; border: 2px solid transparent; border-radius: 8px; cursor: pointer; transition: all 0.3s; }
.zphc-template-item.active { border-color: #1890ff; background: #e6f7ff; }
.zphc-template-item.disabled { opacity: 0.4; pointer-events: none; }
.zphc-template-icon { font-size: 32px; margin-bottom: 6px; }
.zphc-template-name { font-size: 12px; color: #666; }

/* ========== 结果页样式 ========== */
.zphc-result-status { padding: 30px; text-align: center; }
.zphc-status-pending, .zphc-status-loading { color: #1890ff; }
.zphc-status-success { color: #52c41a; }
.zphc-status-failed { color: #ff4d4f; }
.zphc-status-text { font-size: 16px; margin-top: 10px; }
.zphc-success-icon, .zphc-failed-icon { font-size: 48px; }
.zphc-failed-reason { color: #999; font-size: 13px; margin-top: 8px; }

.zphc-progress-bar { width: 200px; height: 6px; background: #f0f0f0; border-radius: 3px; margin: 15px auto 0; overflow: hidden; }
.zphc-progress-inner { height: 100%; background: #1890ff; border-radius: 3px; transition: width 0.3s; }
.zphc-progress-text { color: #1890ff; font-size: 14px; margin-top: 8px; }

.zphc-result-image { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; text-align: center; }
.zphc-image-wrapper { border-radius: 8px; overflow: hidden; }
.zphc-image-wrapper img { max-width: 100%; display: block; margin: 0 auto; }
.zphc-image-tips { color: #999; font-size: 12px; margin-top: 10px; }

.zphc-result-info { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-info-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.zphc-info-item:last-child { border-bottom: none; }
.zphc-info-label { color: #999; font-size: 14px; }
.zphc-info-value { color: #333; font-size: 14px; }

.zphc-source-photos { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-source-list { display: flex; gap: 8px; flex-wrap: wrap; }
.zphc-source-item { width: 60px; height: 60px; border-radius: 6px; overflow: hidden; }
.zphc-source-item img { width: 100%; height: 100%; object-fit: cover; }

.zphc-result-actions { padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.zphc-result-error { padding: 60px 20px; text-align: center; background: #fff; margin: 15px 0; border-radius: 8px; }
.zphc-error-icon { font-size: 48px; color: #ff4d4f; margin-bottom: 15px; }
.zphc-error-text { color: #666; font-size: 14px; margin-bottom: 20px; }

.zphc-preview-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.9); z-index: 999; align-items: center; justify-content: center; }
.zphc-preview-overlay img { max-width: 95%; max-height: 90%; object-fit: contain; }
.zphc-preview-close { position: absolute; top: 20px; right: 20px; color: #fff; font-size: 32px; cursor: pointer; }

/* ========== 记录页样式 ========== */
.zphc-logs-list { padding: 15px 0; }
.zphc-log-card { background: #fff; border-radius: 8px; margin-bottom: 10px; overflow: hidden; position: relative; transition: transform 0.3s; }
.zphc-log-card.zphc-log-swiped { transform: translateX(-80px); }
.zphc-log-link { display: flex; padding: 12px; text-decoration: none; color: inherit; }
.zphc-log-thumb { width: 70px; height: 70px; border-radius: 6px; overflow: hidden; margin-right: 12px; background: #f0f0f0; flex-shrink: 0; }
.zphc-log-thumb img { width: 100%; height: 100%; object-fit: cover; }
.zphc-log-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 24px; background: #f5f5f5; }
.zphc-log-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.zphc-log-title { font-size: 15px; margin-bottom: 6px; }
.zphc-log-count { color: #999; font-size: 12px; margin-left: 8px; }
.zphc-log-time { color: #999; font-size: 12px; margin-bottom: 6px; }
.zphc-log-status { display: flex; align-items: center; gap: 6px; }
.zphc-log-arrow { color: #ccc; font-size: 20px; display: flex; align-items: center; }
.zphc-log-delete { position: absolute; right: 0; top: 0; bottom: 0; width: 80px; background: #ff4d4f; color: #fff; display: flex; align-items: center; justify-content: center; transform: translateX(100%); }
.zphc-log-card.zphc-log-swiped .zphc-log-delete { transform: translateX(0); }

.zphc-status-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.zphc-status-pending { background: #f0f0f0; color: #999; }
.zphc-status-loading { background: #e6f7ff; color: #1890ff; }
.zphc-status-success { background: #f6ffed; color: #52c41a; }
.zphc-status-failed { background: #fff2f0; color: #ff4d4f; }
.zphc-saved-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: #fff7e6; color: #fa8c16; }

.zphc-load-more { text-align: center; padding: 20px; }
.zphc-load-text { color: #1890ff; cursor: pointer; }
.zphc-load-end { color: #999; font-size: 13px; }

.zphc-empty-state { padding: 60px 20px; text-align: center; }

/* ========== Toast提示 ========== */
.zphc-toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8); background: rgba(0,0,0,0.75); color: #fff; padding: 12px 24px; border-radius: 6px; font-size: 14px; z-index: 9999; opacity: 0; transition: all 0.3s; }
.zphc-toast-show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ========== 动画效果 ========== */
.zphc-loading-icon { width: 40px; height: 40px; border: 3px solid #f0f0f0; border-top-color: #1890ff; border-radius: 50%; margin: 0 auto; }
.zphc-loading-spin { animation: zphc-spin 1s linear infinite; }

@keyframes zphc-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.zphc-result-fade { animation: zphc-fade-in 0.5s ease-out; }
@keyframes zphc-fade-in {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.zphc-bounce { animation: zphc-bounce 0.6s ease-out; }
@keyframes zphc-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.zphc-transition-fade { transition: opacity 0.3s ease; }
.zphc-transition-slide { transition: transform 0.3s ease; }

/* ========== 抽屉样式 ========== */
.zphc_draw {max-width:960px;width:100%;height:70%;margin:20px auto 0px auto;}
.zphc_draw .el-drawer__header { padding: 15px 20px; margin-bottom: 0; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.zphc_draw .el-drawer__header h4 { margin: 0; font-size: 16px; font-weight: bold; }
.zphc_draw .el-drawer__body { padding: 0; }
.zphc_draw .el-drawer__footer { padding: 12px 20px; border-top: 1px solid #f0f0f0; }

.zphc-draw-count { color: #1890ff; font-size: 14px; }
.zphc-draw-body { height: 100%; overflow-y: auto; }
.zphc-draw-footer { display: flex; justify-content: flex-end; gap: 10px; }

/* 抽屉内选项卡 */
.zphc_draw .zphc-tabs { display: flex; background: #fff; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; z-index: 10; }
.zphc_draw .zphc-tab { flex: 1; padding: 12px; text-align: center; font-size: 14px; color: #666; position: relative; cursor: pointer; transition: color 0.3s; }
.zphc_draw .zphc-tab.active { color: #1890ff; font-weight: 500; }
.zphc_draw .zphc-tab.active::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background: #1890ff; }

/* 抽屉内筛选区 */
.zphc_draw .zphc-filter-area { padding: 10px 15px; background: #fafafa; }
.zphc_draw .zphc-album-select { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; }

/* 抽屉内照片网格 */
.zphc_draw .zphc-select-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 15px; min-height: 200px; }
.zphc_draw .zphc-select-item { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; cursor: pointer; background: #f5f5f5; }
.zphc_draw .zphc-select-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.zphc_draw .zphc-select-item:active img { transform: scale(0.95); }
.zphc_draw .zphc-select-item .zphc-check-mark { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 2px solid rgba(255,255,255,0.8); border-radius: 50%; background: rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; color: transparent; font-size: 12px; transition: all 0.3s; }
.zphc_draw .zphc-select-item.selected .zphc-check-mark { background: #1890ff; border-color: #1890ff; color: #fff; }
.zphc_draw .zphc-select-item.selected::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(24,144,255,0.3); pointer-events: none; }

/* 抽屉内加载状态 */
.zphc_draw .zphc-load-more { text-align: center; padding: 15px; }
.zphc_draw .zphc-load-text { color: #1890ff; font-size: 14px; }
.zphc_draw .zphc-load-end { color: #999; font-size: 13px; }

/* 抽屉内空状态 */
.zphc_draw .zphc-empty-area { padding: 40px 20px; text-align: center; }
.zphc_draw .zphc-empty-icon { font-size: 48px; margin-bottom: 10px; }
.zphc_draw .zphc-empty-text { color: #999; font-size: 14px; margin-bottom: 6px; }
.zphc_draw .zphc-empty-tips { color: #ccc; font-size: 12px; }

/* 抽屉内上传区域 */
.zphc_draw .zphc-upload-area { padding: 20px 15px; }
.zphc_draw .zphc-upload-tips { text-align: center; margin-bottom: 15px; }
.zphc_draw .zphc-upload-tips p { color: #999; font-size: 12px; margin: 4px 0; }
.zphc_draw .zphc-upload-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; border: 2px dashed #ddd; border-radius: 8px; cursor: pointer; background: #fafafa; transition: all 0.3s; }
.zphc_draw .zphc-upload-btn:active { border-color: #1890ff; background: #f0f9ff; }
.zphc_draw .zphc-upload-icon { font-size: 36px; margin-bottom: 8px; }
.zphc_draw .zphc-upload-text { color: #666; font-size: 14px; }

/* 抽屉内已选照片预览 */
.zphc_draw .zphc-uploaded-preview { padding: 15px; }
.zphc_draw .zphc-uploaded-preview .zphc-area-header { margin-bottom: 10px; }
.zphc_draw .zphc-upload-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.zphc_draw .zphc-upload-item { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; }
.zphc_draw .zphc-upload-item img { width: 100%; height: 100%; object-fit: cover; }
.zphc_draw .zphc-upload-remove { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(255,77,79,0.9); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }

/* ========== 首页操作按钮区 ========== */
.zphc-action-area { display: flex; gap: 10px; padding: 15px 0; }
.zphc-btn-select { flex: 1; background: #f0f0f0; color: #333; display: flex; align-items: center; justify-content: center; gap: 6px; }
.zphc-btn-select:active { background: #e0e0e0; }

/* ========== 首页引导区 ========== */
.zphc-guide-area { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 20px; margin: 15px 0; border-radius: 12px; }
.zphc-guide-text { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.zphc-guide-tips { display: flex; gap: 15px; font-size: 13px; opacity: 0.9; }

/* ========== 首页照片移除按钮 ========== */
.zphc-photo-remove { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; transition: background 0.3s; }
.zphc-photo-remove:active { background: rgba(255,77,79,0.9); }

/* ========== 首页最近合成区域 ========== */
.zphc-recent-area { background: #fff; padding: 15px; margin: 15px 0; border-radius: 8px; }
.zphc-more-link { color: #1890ff; font-size: 13px; text-decoration: none; }

/* ========== 首页统计区域 ========== */
.zphc-stat-area { display: flex; gap: 10px; margin: 15px 0; }

/* 空状态点击样式 */
.zphc-empty { cursor: pointer; transition: background 0.3s; border-radius: 8px; }
.zphc-empty:active { background: #f5f5f5; }
.zphc-empty-tips { color: #bbb; font-size: 12px; margin-top: 6px; }
