/**
 * 脚本工具批量管理弹窗样式
 * 符合代码规范：<400行
 * 使用独立前缀 script-tool-batch-manage-，确保面板独立性
 * 样式与素材市场保持一致
 */

/* 弹窗遮罩 */
.script-tool-batch-manage-modal {
    display: none;
    position: fixed;
    z-index: 10000 !important;
    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;
}

.script-tool-batch-manage-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    animation: script-tool-batch-manage-modal-fade-in 0.2s ease-out;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes script-tool-batch-manage-modal-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 弹窗内容 */
.script-tool-batch-manage-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    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: script-tool-batch-manage-content-slide-in 0.3s ease-out;
}

@keyframes script-tool-batch-manage-content-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 弹窗头部 */
.script-tool-batch-manage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
}

.script-tool-batch-manage-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.script-tool-batch-manage-close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    user-select: none;
}

.script-tool-batch-manage-close:hover {
    color: var(--text-primary);
}

/* 弹窗主体 */
.script-tool-batch-manage-body {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 200px;
}

/* 加载状态 */
.script-tool-batch-manage-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.script-tool-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-primary);
    border-top-color: var(--text-accent);
    border-radius: 50%;
    animation: script-tool-spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes script-tool-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 内容区域 */
.script-tool-batch-manage-content-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 工具栏 */
.script-tool-batch-manage-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

.script-tool-batch-manage-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.script-tool-batch-manage-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--text-accent);
}

.script-tool-checkbox-text {
    font-size: 14px;
}

.script-tool-batch-manage-count {
    font-size: 14px;
    color: var(--text-secondary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

/* 列表容器 */
.script-tool-batch-manage-list-container {
    flex: 1;
    overflow-y: auto;
    max-height: calc(85vh - 280px);
    min-height: 200px;
}

.script-tool-batch-manage-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 列表项 */
.script-tool-batch-manage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
}

.script-tool-batch-manage-item:hover {
    background: var(--bg-hover);
    border-color: var(--text-accent);
}

.script-tool-batch-manage-item.script-tool-selected {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--text-accent);
}

.script-tool-batch-manage-item-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--text-accent);
    flex-shrink: 0;
}

.script-tool-batch-manage-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.script-tool-batch-manage-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.script-tool-batch-manage-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.script-tool-batch-manage-item-id {
    font-family: 'Consolas', 'Courier New', monospace;
}

.script-tool-batch-manage-item-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.script-tool-batch-manage-tag {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 11px;
}

/* 空状态 */
.script-tool-batch-manage-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.script-tool-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.script-tool-empty-text {
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

/* 弹窗底部 */
.script-tool-batch-manage-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

.script-tool-batch-manage-footer .script-tool-btn {
    min-width: 100px;
    padding: 10px 20px;
    font-size: 14px;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.script-tool-batch-manage-footer .script-tool-btn-danger {
    background: #e74c3c;
    color: #fff;
}

.script-tool-batch-manage-footer .script-tool-btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.script-tool-batch-manage-footer .script-tool-btn-danger:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

.script-tool-batch-manage-footer .script-tool-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.script-tool-batch-manage-footer .script-tool-btn-secondary:hover {
    background: var(--bg-hover);
}

/* 滚动条样式 */
.script-tool-batch-manage-list-container::-webkit-scrollbar {
    width: 8px;
}

.script-tool-batch-manage-list-container::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.script-tool-batch-manage-list-container::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 4px;
}

.script-tool-batch-manage-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

