/**
 * 批量删除素材弹窗样式
 * 符合代码规范：<500行
 */

/* 弹窗遮罩 */
.material-batch-delete-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.material-batch-delete-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: batchDeleteModalFadeIn 0.2s ease-out;
}

@keyframes batchDeleteModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 弹窗内容 */
.material-batch-delete-content {
    background: var(--bg-card, #1e1e1e);
    border-radius: var(--radius-lg, 8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: batchDeleteContentSlideIn 0.3s ease-out;
}

@keyframes batchDeleteContentSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 弹窗头部 */
.material-batch-delete-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary, #333);
}

.material-batch-delete-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary, #fff);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.material-batch-delete-close {
    color: var(--text-secondary, #aaa);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    user-select: none;
}

.material-batch-delete-close:hover {
    color: var(--text-primary, #fff);
}

/* 弹窗主体 */
.material-batch-delete-body {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 200px;
}

/* 加载状态 */
.batch-delete-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary, #aaa);
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-primary, #333);
    border-top-color: var(--accent-primary, #4a9eff);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 内容区域 */
.batch-delete-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 工具栏 */
.batch-delete-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-primary, #333);
}

.batch-delete-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-primary, #fff);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.batch-delete-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary, #4a9eff);
}

.checkbox-text {
    font-size: 14px;
}

.batch-delete-count {
    font-size: 14px;
    color: var(--text-secondary, #aaa);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

/* 列表容器 */
.batch-delete-list-container {
    flex: 1;
    overflow-y: auto;
    max-height: calc(85vh - 280px);
    min-height: 200px;
}

.batch-delete-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 列表项 */
.batch-delete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary, #252525);
    border: 1px solid var(--border-primary, #333);
    border-radius: var(--radius-md, 6px);
    transition: all 0.2s ease;
    cursor: pointer;
}

.batch-delete-item:hover {
    background: var(--bg-hover, #2a2a2a);
    border-color: var(--accent-primary, #4a9eff);
}

.batch-delete-item.selected {
    background: rgba(74, 158, 255, 0.1);
    border-color: var(--accent-primary, #4a9eff);
}

.batch-delete-item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary, #4a9eff);
    flex-shrink: 0;
}

.batch-delete-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.batch-delete-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #fff);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.batch-delete-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary, #aaa);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.batch-delete-item-id {
    font-family: 'Consolas', 'Courier New', monospace;
}

.batch-delete-item-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.batch-delete-tag {
    padding: 2px 6px;
    background: var(--bg-tertiary, #333);
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
}

/* 空状态 */
.batch-delete-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary, #aaa);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

/* 弹窗底部 */
.material-batch-delete-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary, #333);
    background: var(--bg-secondary, #252525);
}

.material-batch-delete-footer .btn {
    min-width: 100px;
    padding: 10px 20px;
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    border-radius: var(--radius-md, 6px);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.material-batch-delete-footer .btn-danger {
    background: #e74c3c;
    color: #fff;
}

.material-batch-delete-footer .btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.material-batch-delete-footer .btn-danger:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

.material-batch-delete-footer .btn-secondary {
    background: var(--bg-tertiary, #333);
    color: var(--text-primary, #fff);
}

.material-batch-delete-footer .btn-secondary:hover {
    background: var(--bg-hover, #2a2a2a);
}

/* 滚动条样式 */
.batch-delete-list-container::-webkit-scrollbar {
    width: 8px;
}

.batch-delete-list-container::-webkit-scrollbar-track {
    background: var(--bg-secondary, #252525);
    border-radius: 4px;
}

.batch-delete-list-container::-webkit-scrollbar-thumb {
    background: var(--border-primary, #333);
    border-radius: 4px;
}

.batch-delete-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary, #aaa);
}

