.field-text-range {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* 允许错误信息换到下一行 */
  width: 100%;
  min-width: 0;
  /* 允许在 flex 父容器内收缩，避免超出列宽 */
  /**
     * 保留 showOverflowTooltip 时，@deppon/deppon-ui 会给 Input 外层包一层 div，
     * 且带内联 style: width: 100%; display: inline-block; 在 flex-wrap 下会强制换行。
     * 这里在 range 布局中将其改为可伸缩的 flex item，保证两个输入框同一行。
     */
  /* 错误信息 tooltip 在 flex 下独占一行 */
}
.field-text-range div[style*='display: inline-block'][style*='width: 100%'] {
  width: auto !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
}
.field-text-range .range-input-start,
.field-text-range .range-input-end {
  flex: 1;
  min-width: 0;
  /* 允许输入框收缩，避免超出宽度 */
}
.field-text-range .range-input-start .el-input__wrapper,
.field-text-range .range-input-end .el-input__wrapper {
  min-width: 0;
}
.field-text-range .range-input-start .el-input__inner,
.field-text-range .range-input-end .el-input__inner {
  min-width: 0;
}
.field-text-range .range-separator {
  flex-shrink: 0;
  color: var(--el-text-color-placeholder, #c0c4cc) !important;
  font-size: 14px;
  padding: 0 2px;
}
.field-text-range .field-text-error {
  flex: 0 0 100%;
  width: 100%;
}
/* 数组文本类型样式 */
.field-text-array {
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* 减小间距从 8px 到 4px */
  width: 100%;
  padding: 2px 0;
  /* 减小内边距从 4px 到 2px */
}
.field-text-array .array-item-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}
.field-text-array .array-item-wrapper .array-item-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  /* 减小间距从 8px 到 6px */
  width: 100%;
}
.field-text-array .array-item-wrapper .array-item-input-row .array-item-label {
  flex-shrink: 0;
  min-width: 70px;
  /* 减小最小宽度从 80px 到 70px */
  text-align: right;
  color: var(--el-text-color-regular, #606266) !important;
  font-size: 13px;
  /* 减小字体从 14px 到 13px */
  line-height: 1.2;
}
.field-text-array .array-item-wrapper .array-item-input-row .array-input {
  flex: 1;
  min-width: 0;
}
.field-text-array .array-item-wrapper .array-item-input-row .array-input .el-input__wrapper {
  border-radius: 4px;
  min-height: 28px;
  /* 设置最小高度，使输入框更紧凑 */
}
.field-text-array .array-item-wrapper .array-item-input-row .array-input .el-input__inner {
  padding: 2px 8px;
  /* 减小垂直内边距，使输入框更紧凑 */
  font-size: 13px;
  /* 减小字体 */
  line-height: 1.4;
  height: 24px;
  /* 设置固定高度 */
}
.field-text-array .array-item-wrapper .array-item-input-row .array-input .array-item-suffix {
  color: var(--el-text-color-regular, #606266) !important;
  font-size: 13px;
  /* 减小字体从 14px 到 13px */
  padding: 0 6px;
  /* 减小内边距从 8px 到 6px */
}
.field-text-array .array-item-wrapper .array-item-error {
  width: 100%;
  margin-top: 2px;
  padding-left: 76px;
  /* label 宽度 + gap，使错误信息与输入框对齐 */
}
.field-text-array .array-divider {
  display: none;
  /* 不需要分隔线，使用 gap 来控制间距 */
}
/* 只读模式下的数组文本样式 */
.field-text-array-readonly {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  /* 减小间距从 8px 到 4px */
  width: 100%;
}
.field-text-array-readonly .array-item-readonly {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* 减小间距从 8px 到 6px */
  width: auto;
}
.field-text-array-readonly .array-item-readonly .array-item-label {
  flex-shrink: 0;
  min-width: 70px;
  /* 减小最小宽度从 80px 到 70px */
  text-align: right;
  color: var(--el-text-color-primary, #303133) !important;
  font-size: 13px;
  /* 减小字体从 14px 到 13px */
  line-height: 1.2;
}
.field-text-array-readonly .array-item-readonly .array-item-value {
  flex: 0 1 auto;
  color: var(--el-text-color-primary, #303133) !important;
  font-size: 13px;
  /* 减小字体从 14px 到 13px */
  line-height: 1.4;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.field-text-array-readonly .array-item-readonly .array-item-suffix {
  flex-shrink: 0;
  min-width: 50px;
  text-align: left;
  color: var(--el-text-color-primary, #303133) !important;
  font-size: 13px;
  /* 减小字体从 14px 到 13px */
  padding: 0 4px;
}
.field-text-array-readonly .array-divider {
  display: none;
  /* 不需要分隔线，使用 gap 来控制间距 */
}
/* 只读模式下的范围显示样式 */
.range-separator {
  flex-shrink: 0;
  color: var(--el-text-color-placeholder, #c0c4cc) !important;
  font-size: 14px;
  padding: 0 2px;
  margin: 0;
}
/* 禁用状态下显示 tooltip 的包装器样式 */
.field-text-tooltip-wrapper {
  width: 100%;
}
.field-text-tooltip-wrapper .el-input {
  width: 100%;
}
.field-text-tooltip-wrapper .el-input .el-input__wrapper {
  width: 100%;
}
.field-text-tooltip-wrapper .el-input .el-input__inner {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
}
/* 普通输入框样式 */
.field-text-single {
  width: 100%;
  display: flex;
  flex-direction: column;
}
/* 错误状态样式：当有错误时，输入框边框变红 */
.field-text-array .array-item-wrapper.has-error .array-input .el-input__wrapper,
.field-text-range.has-error .el-input__wrapper,
.field-text-single.has-error .el-input__wrapper {
  box-shadow: 0 0 0 1px var(--el-color-danger) inset !important;
}
.field-text-array .array-item-wrapper.has-error .array-input .el-input__inner,
.field-text-range.has-error .el-input__inner,
.field-text-single.has-error .el-input__inner {
  box-shadow: none;
}
/* 错误信息显示样式 */
.field-text-error {
  font-size: 12px;
  color: var(--el-color-danger, #f56c6c) !important;
  line-height: 1.2;
  padding-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 只读模式下的内容样式：初始渲染时立即应用单行省略，避免闪烁 */
.field-readonly-content {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
  vertical-align: bottom;
}
