/* ============================================================
   批量素材编辑组件样式 — BatchMaterialDrawer
   命名空间：.bmd-*（batch-material-drawer）
   复用：material-use-new.css 中的 .GX_* 样式
   ============================================================ */

/* ==================== 抽屉容器 ==================== */

.bmd-drawer {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bmd-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ==================== 左侧面板 ==================== */

.bmd-left {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f5f6fa;
    display: flex;
    flex-direction: column;
}

.bmd-left-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eef0f5;
}

.bmd-left-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.bmd-left-title b {
    color: #1890ff;
}

/* ==================== 素材卡片列表 ==================== */

.bmd-material-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* ==================== 单张素材卡片 ==================== */
/* 布局：标题(上) → 内容预览(中) → 图片区(下) → 修图按钮(底) */

.bmd-material-card {
    border: 1px solid #eef0f5;
    border-radius: 10px;
    padding: 14px;
    background: #fafbfd;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bmd-material-card:hover {
    border-color: #1890ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
}

.bmd-material-card.active {
    border-color: #1890ff;
    background: #e6f7ff;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.15);
}

/* ---- 卡片标题（上）---- */
.bmd-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

/* ---- 卡片内容预览（中）---- */
.bmd-card-content {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    margin-bottom: 10px;
}

/* ---- 图片区域（下）---- */
.bmd-card-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

/* 单张图片缩略图 */
.bmd-img-item {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    border: 1px solid #eef0f5;
    flex-shrink: 0;
}

.bmd-img-item img.bmd-img-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 图片右上角删除按钮 */
.bmd-img-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    line-height: 17px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 2;
}

.bmd-img-item:hover .bmd-img-delete {
    opacity: 1;
}

.bmd-img-delete:hover {
    background: rgba(255, 77, 79, 0.85);
}

/* ---- 上传按钮（图片列表末尾的 + 图标）---- */
.bmd-img-upload-btn {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    border: 1px dashed #c0c4cc;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bmd-img-upload-btn:hover {
    border-color: #1890ff;
    background: #e6f7ff;
}

.bmd-upload-icon {
    font-size: 28px;
    color: #999;
    font-weight: 300;
    line-height: 1;
    transition: color 0.2s;
}

.bmd-img-upload-btn:hover .bmd-upload-icon {
    color: #1890ff;
}

/* ---- 卡片底部操作区（一键修图）---- */
.bmd-card-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
}

/* 一键修图按钮 */
.bmd-photo-edit-btn {
    font-size: 12px;
    color: #3F57D5;
    background: #F2F4FF;
    border-radius: 5px;
    padding: 5px 14px;
    cursor: pointer;
    border: none;
    display: inline-block;
    transition: all 0.2s;
    user-select: none;
    line-height: 21px;
}

.bmd-photo-edit-btn:hover {
    background: #dbe0ff;
    color: #2a44c8;
}

.bmd-photo-edit-btn:active {
    transform: scale(0.96);
}

.bmd-photo-edit-btn.bmd-btn-disabled {
    color: #bbb;
    background: #f5f5f5;
    cursor: not-allowed;
}

/* ==================== 底部全部保存按钮 ==================== */

.bmd-bottom-save {
    flex-shrink: 0;
    padding: 12px 0 0 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.bmd-btn-save-all {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
    letter-spacing: 0.5px;
}

.bmd-btn-save-all:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(24, 144, 255, 0.4);
}

.bmd-btn-save-all:active {
    transform: translateY(0);
}

.bmd-btn-save-all:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==================== 预览导航（手机框上方覆盖层）==================== */

.bmd-preview-nav {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    padding: 3px 10px;
    z-index: 5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.bmd-preview-arrow {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s;
    padding: 0;
    user-select: none;
}

.bmd-preview-arrow:hover {
    color: #1890ff;
    background: rgba(24, 144, 255, 0.1);
}

.bmd-preview-arrow.bmd-hidden {
    display: none;
}

.bmd-preview-page {
    font-size: 11px;
    color: #888;
    min-width: 40px;
    text-align: center;
    user-select: none;
    white-space: nowrap;
}

/* ==================== 右侧配图展示 ==================== */

.bmd-right-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bmd-right-img-item {
    width: 70px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #f0f0f0;
    border: 1px solid #eef0f5;
}

.bmd-right-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==================== 空状态 ==================== */

.bmd-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}
