/* 重绘项目对话框样式，负责表单分组、选项卡片和错误提示布局。 */
.redraw-project-form {
  min-height: 0;
}

:global(.redraw-project-dialog.el-dialog) {
  height: min(720px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
}

:global(.redraw-project-dialog.el-dialog .el-dialog__header),
:global(.redraw-project-dialog.el-dialog .el-dialog__footer) {
  flex: 0 0 auto;
}

:global(.redraw-project-dialog.el-dialog .el-dialog__body) {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.redraw-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs) var(--space-lg);
}

.redraw-project-form :deep(.el-form-item) {
  margin-bottom: var(--space-lg);
}

.redraw-project-form :deep(.el-form-item__label) {
  padding-bottom: var(--space-sm);
  color: var(--web-text-secondary);
  font-size: 12px;
}

.redraw-project-form :deep(.el-input__wrapper),
.redraw-project-form :deep(.el-textarea__inner) {
  background: var(--web-surface-soft);
  border: 1px solid var(--web-line-strong);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.redraw-project-form :deep(.el-input__wrapper) {
  min-height: var(--control-height-lg);
}

.redraw-project-form :deep(.el-input-number) {
  width: 100%;
}

.redraw-project-form :deep(.el-textarea__inner) {
  padding: 10px 12px;
  color: var(--web-text);
  line-height: 1.6;
}

.redraw-project-form :deep(.el-input__wrapper:hover),
.redraw-project-form :deep(.el-textarea__inner:hover) {
  border-color: var(--web-line-emphasis);
}

.field-error {
  margin-top: 5px;
  color: var(--web-accent-dark);
  font-size: 12px;
  line-height: 1.25;
}

.field-invalid :deep(.el-input__wrapper),
.field-invalid :deep(.el-textarea__inner) {
  border-color: var(--web-invalid-line);
}

.cast-editor {
  padding: var(--space-lg);
  background: var(--web-surface-soft);
  border: 1px solid var(--web-line-strong);
  border-radius: var(--radius-md);
}

.cast-editor > header {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cast-editor > header > div {
  display: flex;
  align-items: baseline;
  gap: 9px;
}

.cast-editor > header strong {
  color: var(--web-text);
  font-size: 14px;
}

.cast-editor > header span {
  color: var(--web-project-tooltip-label);
  font-size: 11px;
}

.cast-editor button {
  min-height: var(--control-height-md);
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--web-project-badge-text);
  background: var(--web-surface);
  border: 1px solid var(--web-line-emphasis);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.cast-editor button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.cast-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
  align-items: start;
  gap: 10px;
}

.cast-row + .cast-row {
  padding-top: 11px;
  border-top: 1px solid var(--web-project-tooltip-line);
}

.cast-row :deep(.el-form-item) {
  margin-bottom: 11px;
}

.cast-row .remove-cast {
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  margin-top: 36px;
  color: var(--web-accent-dark);
}

.cast-empty {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  color: var(--web-accent-dark);
  font-size: 12px;
}

@media (max-width: 620px) {
  .redraw-form-grid,
  .cast-row {
    grid-template-columns: 1fr;
  }

  .cast-editor > header,
  .cast-editor > header > div {
    align-items: stretch;
    flex-direction: column;
  }

  .cast-editor > header > div {
    gap: 3px;
  }

  .cast-row .remove-cast {
    width: 100%;
    margin: 0 0 11px;
  }
}
