/* 贴片机文件转换工具样式 */

body {
  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f7fa;
  color: #333;
}
.el-header {
  background-color: #316fae;
  color: white;
  text-align: center;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
}
.logo {
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  line-height: 16px;
  text-align: left;
  padding-right: 12px;
}
.logo div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.logo p {
  font-size: 12px;
  margin: 0;
}

.el-main {
  padding: 20px;
  padding-top: 50px;
}

.file-upload-card {
  margin-bottom: 20px;
}

.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 15px;
}

.mt-4 {
  margin-top: 20px;
}

.toolbar {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-input {
  width: 250px;
}

.custom-tree-node {
  flex: 1;
  display: flex;
  align-items: center;
  font-size: 14px;
  padding-right: 8px;
}

/* 表格样式优化 */
.el-table th {
  background-color: #f5f7fa;
}

.el-table--striped .el-table__body tr.el-table__row--striped td {
  background-color: #fafafa;
}

/* 对话框样式 */
.el-dialog__header {
  border-bottom: 1px solid #ebeef5;
  padding: 15px 20px;
}

.el-dialog__body {
  padding: 20px;
}

/* 树形控件样式 */
.el-tree-node__content {
  height: 32px;
}

.el-tree-node__label {
  font-size: 14px;
}

.el-input__prefix {
    line-height: 32px;
}
.el-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
}

.el-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 选中元器件行的高亮样式 */
.selected-component-row {
  background-color: #d1e9ff !important;
}
.selected-component-row td {
  background-color: #d1e9ff !important;
}

.text-input-section {
  flex: 2;
  display: flex;
  flex-direction: column;
}

.el-upload-dragger {
  width: 220px !important;
  height: 50px;
  display: flex;
  align-items: center;
  margin-right: 12px;
}
.el-upload-dragger .el-icon-upload {
    margin-top: 10px;
}
.el-tree-node__content {
    font-weight: bold;
}
.el-tree-node__children .el-tree-node__content {
    font-weight: normal;
}
/* 响应式调整 */
@media (max-width: 768px) {
  .search-input {
    width: 150px;
  }
  
  .el-dialog {
    width: 95% !important;
  }
}

.pcbName {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  position: absolute; right: 20px;top:8px;
  z-index: 2;
}

.pcbName:hover {
  /* background-color: #f5f7fa; */
  /* border-color: #dcdfe6; */
}

.pcbName:focus {
  /* background-color: #fff; */
  border-color: #409eff;
  outline: none;
}

/* 效果图样式 */
.svg-preview {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  pointer-events: none;
  transform: scaleY(-1);
}

.svg-preview img {
  position: absolute;
}
.preview-container {
  padding: 0px;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.preview-board-wrap {
  position: relative;
  border: 1px solid #dcdfe6;
  background-color: #fff;
  min-height: 65vh;
  overflow: auto;
}
.preview-board {
  /* Y轴翻转 */
  transform: scaleY(-1);
}

.mount-item {
  position: absolute;
  border: 1px solid #dcdfe6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.3s;
  cursor: pointer;
  transform: scaleY(-1);
  opacity: 0.6;
}

.mount-item.inactive {
  background-color: #909399;
  color: #fff;
}

.mount-item.active {
  background-color: #67c23a;
  color: #fff;
}

.mount-item:hover {
  z-index: 2;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.1);
  opacity: 1;
}